sdahci 3.1 KB

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