]> git.lizzy.rs Git - plan9front.git/blob - sys/man/3/sdahci
arch(3): document msr
[plan9front.git] / sys / man / 3 / sdahci
1 .TH SDAHCI 3
2 .SH NAME
3 sdahci \- AHCI (Advanced Host Controller Interface) SATA (Serial ATA) storage device drivers
4 .SH SYNOPSIS
5 .nf
6 .B bind -a #S /dev
7 .sp 0.3v
8 .BI /dev/sdctl
9 .sp 0.3v
10 .BI /dev/sd En /ctl
11 .BI /dev/sd En /raw
12 .BI /dev/sd En /data
13 \&...
14 .fi
15 .SH DESCRIPTION
16 The
17 .I sdahci
18 driver provides access to AHCI devices via the
19 .IR sd (3)
20 interface.
21 The AHCI programming interface supports up to 32
22 hot-swappable ATAPI or hard disk-like devices per controller.
23 The legacy IDE interface provided by
24 .B sdata.c
25 supports up to four drives which are not hot-swappable.
26 Controller drive letters are assigned from
27 .L E
28 onward.
29 .PP
30 AHCI controllers are detected automatically.
31 Currently Intel and AMD controllers are detected.
32 Intel controllers need to have AHCI enabled in the BIOS.
33 For
34 .L ich
35 parts this typically means enabling
36 enhanced mode and AHCI.
37 For ESB (Enterprise South Bridge) -based
38 parts, only enhanced mode needs to be enabled.
39 Intel
40 .BR ich9 -based
41 AHCI does not support hot swapping and
42 drives must be connected to the lowest-numbered free port.
43 .PP
44 The top level control file,
45 .BR /dev/sdctl ,
46 supports the following control messages for
47 .IR sdahci :
48 .TF "\fLiahci idprint"
49 .TP
50 .B iahci debug
51 Toggle debug messages.  Default is off.
52 .TP
53 .B iahci idprint
54 Toggle printing of drive identification messages.  Default is on.
55 Prints short messages when a drive is identified or removed.
56 .TP
57 .B iahci aprint
58 Print verbose ATAPI debugging messages.  Default is off.
59 .PD
60 .PP
61 The device-level
62 .B ctl
63 file supports:
64 .TF \fLsmartdisable
65 .TP
66 .B flushcache
67 Send the ATA/ATAPI
68 .B FLUSH CACHE
69 command
70 .RB ( 0xe7
71 or
72 .BR 0xea ).
73 This command may take up to 60 seconds to complete.
74 .TP
75 .B identify
76 Send the ATA/ATAPI
77 .B IDENTIFY DEVICE
78 command
79 .RB ( 0xec ).
80 If device information has changed, the new size,
81 features and serial will be noted.
82 If changed, I/O on existing file
83 descriptors will result in the error string
84 .LR "media or partition has changed" .
85 .TP
86 .BI "mode " speed
87 Change the connection
88 .I speed
89 to one of
90 .BR auto ,
91 .BR satai
92 or
93 .BR sataii .
94 .TP
95 .B nop
96 Send the ATA
97 .B NOP
98 command
99 .RB ( 0 )
100 if the device supports it. Per standard, the result is always an error.
101 .TP
102 .B smart
103 Send the ATA/ATAPI
104 .B SMART RETURN STATUS
105 command
106 .RB ( 0xda ).
107 This will fail unless SMART is enabled on the drive.
108 .TP
109 .B smartdisable
110 Disable SMART on the drive.  SMART is a persistent property of the drive.
111 .TP
112 .B smartenable
113 Enable SMART on the drive.
114 .TP
115 .BI "state " state
116 Force a transition to the named
117 .IR state .
118 The states are:
119 .RS
120 .TF portreset
121 .TP
122 .B null
123 ignored (may only be reached manually);
124 .TP
125 .B missing
126 not detected;
127 .TP
128 .B new
129 powered down or newly discovered;
130 .TP
131 .B ready
132 ready for commands;
133 .TP
134 .B reset
135 being reset gently;
136 .TP
137 .B portreset
138 being fully reset;
139 .TP
140 .B offline
141 device failed
142 .B portreset
143 (a port reset will be attempted periodically).
144 .RE
145 .PD
146 .PP
147 For devices present at boot, the transition is from state
148 .B new
149 to state
150 .BR ready .
151 .SH SOURCE
152 .B /sys/src/9/pc/sdiahci.c
153 .SH SEE ALSO
154 .IR sd (3)
155 .br
156 .BR http://download.intel.com/technology/serialata/pdf/rev1_2.pdf .
157 .SH BUGS
158 None of enclosure management, LED control and port multipliers are supported.
159 .PP
160 ATAPI devices may not be reset when they have outstanding commands.