sdahci 3.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157
  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 "\fLahci idprint "
  46. .TP
  47. .B ahci debug
  48. Toggle debug messages. Default is off.
  49. .TP
  50. .B ahci 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 ahci 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 or
  89. .BR sataii .
  90. .TP
  91. .B nop
  92. Send the ATA
  93. .B NOP
  94. command
  95. .RB ( 0 )
  96. if the device supports it. Per standard, the result is always an error.
  97. .TP
  98. .B smart
  99. Send the ATA/ATAPI
  100. .B SMART RETURN STATUS
  101. command
  102. .RB ( 0xda ).
  103. This will fail unless SMART is enabled on the drive.
  104. .TP
  105. .B smartdisable
  106. Disable SMART on the drive. SMART is a persistent property of the drive.
  107. .TP
  108. .B smartenable
  109. Enable SMART on the drive.
  110. .TP
  111. .BI "state " state
  112. Force a transition to the named
  113. .IR state .
  114. The states are:
  115. .RS
  116. .TF portreset
  117. .TP
  118. .B null
  119. ignored (may only be reached manually);
  120. .TP
  121. .B missing
  122. not detected;
  123. .TP
  124. .B new
  125. powered down or newly discovered;
  126. .TP
  127. .B ready
  128. ready for commands;
  129. .TP
  130. .B reset
  131. being reset gently;
  132. .TP
  133. .B portreset
  134. being fully reset;
  135. .TP
  136. .B offline
  137. device failed
  138. .B portreset
  139. (a port reset will be attempted periodically).
  140. .RE
  141. .PD
  142. .PP
  143. For devices present at boot, the transition is from state
  144. .B new
  145. to state
  146. .BR ready .
  147. .SH SOURCE
  148. .B /sys/src/9/pc/sdiahci.c
  149. .SH SEE ALSO
  150. .IR sd (3),
  151. .IR 9load (8)
  152. .br
  153. .BR http://download.intel.com/technology/serialata/pdf/rev1_2.pdf .
  154. .SH BUGS
  155. None of enclosure management, LED control and port multipliers are supported.
  156. .PP
  157. ATAPI devices may not be reset when they have outstanding commands.