/share/man/man4/ata.4

https://bitbucket.org/freebsd/freebsd-head/ · Forth · 280 lines · 278 code · 2 blank · 0 comment · 14 complexity · c4f44e51caaa32227b195d3df0732e34 MD5 · raw file

  1. .\" Copyright (c) 2011 Alexander Motin <mav@FreeBSD.org>
  2. .\" All rights reserved.
  3. .\"
  4. .\" Redistribution and use in source and binary forms, with or without
  5. .\" modification, are permitted provided that the following conditions
  6. .\" are met:
  7. .\" 1. Redistributions of source code must retain the above copyright
  8. .\" notice, this list of conditions and the following disclaimer.
  9. .\" 2. Redistributions in binary form must reproduce the above copyright
  10. .\" notice, this list of conditions and the following disclaimer in the
  11. .\" documentation and/or other materials provided with the distribution.
  12. .\"
  13. .\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
  14. .\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
  15. .\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
  16. .\" ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
  17. .\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
  18. .\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
  19. .\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
  20. .\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
  21. .\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
  22. .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
  23. .\" SUCH DAMAGE.
  24. .\"
  25. .\" $FreeBSD$
  26. .\"
  27. .Dd October 3, 2012
  28. .Dt ATA 4
  29. .Os
  30. .Sh NAME
  31. .Nm ata
  32. .Nd generic ATA/SATA controller driver
  33. .Sh SYNOPSIS
  34. To compile this driver into the kernel, place the following lines in your
  35. kernel configuration file:
  36. .Bd -ragged -offset indent
  37. .Cd "device scbus"
  38. .Cd "device ata"
  39. .Cd "options ATA_CAM"
  40. .Ed
  41. .Pp
  42. Alternatively, to load the driver as set of modules at boot time,
  43. place some of the following lines in
  44. .Xr loader.conf 5 :
  45. .Bd -literal -offset indent
  46. ata_load="YES"
  47. atacard_load="YES"
  48. ataisa_load="YES"
  49. atapci_load="YES"
  50. ataacard_load="YES"
  51. ataacerlabs_load="YES"
  52. ataadaptec_load="YES"
  53. ataahci_load="YES"
  54. ataamd_load="YES"
  55. ataati_load="YES"
  56. atacenatek_load="YES"
  57. atacypress_load="YES"
  58. atacyrix_load="YES"
  59. atahighpoint_load="YES"
  60. ataintel_load="YES"
  61. ataite_load="YES"
  62. atajmicron_load="YES"
  63. atamarvell_load="YES"
  64. atamicron_load="YES"
  65. atanational_load="YES"
  66. atanetcell_load="YES"
  67. atanvidia_load="YES"
  68. atapromise_load="YES"
  69. ataserverworks_load="YES"
  70. atasiliconimage_load="YES"
  71. atasis_load="YES"
  72. atavia_load="YES"
  73. .Ed
  74. .Pp
  75. The first line is for the common hardware independent code, and is a
  76. prerequisite for the other modules.
  77. The next three lines are generic bus-specific drivers.
  78. Of the rest, ataahci is the AHCI driver.
  79. The others are vendor-specific PCI drivers.
  80. The
  81. .Dv ATA_CAM
  82. option should always remain in the kernel configuration, to make
  83. the driver work as a
  84. .Xr CAM 4
  85. subsystem module.
  86. .Pp
  87. The following tunables are settable from the
  88. .Xr loader 8 :
  89. .Bl -ohang
  90. .It Va hw.ahci.force
  91. set to nonzero value for forcing drivers to attach to some known AHCI-capable
  92. chips even if they are configured for legacy IDE emulation (the default is 1,
  93. force the attach).
  94. .It Va hw.ata.ata_dma_check_80pin
  95. set to 0 to disable the 80pin cable check (the default is 1, check the cable).
  96. .It Va hint.atapci.X.msi
  97. set to 1 to allow Message Signalled Interrupts (MSI) to be used by the
  98. specified PCI ATA controller, if supported.
  99. .It Va hint.ata.X.devX.mode
  100. limits the initial ATA mode for the specified device on the specified channel.
  101. .It Va hint.ata.X.mode
  102. limits the initial ATA mode for every device on the specified channel.
  103. .It Va hint.ata.X.pm_level
  104. controls SATA interface Power Management for the specified channel,
  105. allowing some power savings at the cost of additional command latency.
  106. Possible values:
  107. .Pp
  108. .Bl -tag -width 4n -offset indent -compact
  109. .It 0
  110. Interface Power Management is disabled.
  111. This is the default value.
  112. .It 1
  113. The device is allowed to initiate a PM state change; the host is passive.
  114. .It 2
  115. The host initiates a PARTIAL PM state transition every time a port becomes idle.
  116. .It 3
  117. host initiates SLUMBER PM state transition every time port becomes idle.
  118. .El
  119. .Pp
  120. Modes 2 and 3 are only supported for AHCI.
  121. .It Va hint.ata. Ns Ar X Ns Va .dev Ns Ar X Ns Va .sata_rev
  122. limits the initial SATA revision (speed) for the specified device
  123. on the specified channel.
  124. Values 1, 2 and 3 are respectively 1.5, 3 and 6Gbps.
  125. .It Va hint.ata. Ns Ar X Ns Va .sata_rev
  126. Same, but for every device on the specified channel.
  127. .El
  128. .Sh DESCRIPTION
  129. The
  130. .Nm
  131. driver gives the
  132. .Xr CAM 4
  133. subsystem access to the ATA (IDE) and SATA ports
  134. of many generic controllers.
  135. Depending on the controller, each PATA (IDE)
  136. port or each one or two SATA ports are
  137. represented to CAM as a separate bus with one or two targets.
  138. Most of the bus-management details are handled by the ATA/SATA-specific
  139. transport of CAM.
  140. Connected ATA disks are handled by the ATA protocol disk peripheral driver
  141. .Xr ada 4 .
  142. ATAPI devices are handled by the SCSI protocol peripheral drivers
  143. .Xr cd 4 ,
  144. .Xr da 4 ,
  145. .Xr sa 4 ,
  146. etc.
  147. .Pp
  148. This driver supports ATA, and for the most of controllers, ATAPI devices.
  149. Command queuing and SATA port multipliers are not supported.
  150. Device hot-plug and SATA interface power management is supported only on
  151. some controllers.
  152. .Pp
  153. The
  154. .Nm
  155. driver can change the transfer mode when the system is up and running.
  156. See the
  157. .Cm negotiate
  158. subcommand of
  159. .Xr camcontrol 8 .
  160. .Pp
  161. The
  162. .Nm
  163. driver sets the maximum transfer mode supported by the hardware as default.
  164. However, the
  165. .Nm
  166. driver sometimes warns:
  167. .Dq Sy "DMA limited to UDMA33, non-ATA66 cable or device".
  168. This means that
  169. the
  170. .Nm
  171. driver has detected that the required 80 conductor cable is not present
  172. or could not be detected properly,
  173. or that one of the devices on the channel only accepts up
  174. to UDMA2/ATA33.
  175. The
  176. .Va hw.ata.ata_dma_check_80pin
  177. tunable can be set to 0 to disable this check.
  178. .Sh HARDWARE
  179. The currently supported ATA/SATA controller chips are:
  180. .Pp
  181. .Bl -tag -width "Silicon Image:" -compact
  182. .It Acard:
  183. ATP850P, ATP860A, ATP860R, ATP865A, ATP865R.
  184. .It ALI:
  185. M5228, M5229, M5281, M5283, M5287, M5288, M5289.
  186. .It AMD:
  187. AMD756, AMD766, AMD768, AMD8111, CS5536.
  188. .It ATI:
  189. IXP200, IXP300, IXP400, IXP600, IXP700, IXP800.
  190. .It CMD:
  191. CMD646, CMD646U2, CMD648, CMD649.
  192. .It Cypress:
  193. Cypress 82C693.
  194. .It Cyrix:
  195. Cyrix 5530.
  196. .It HighPoint:
  197. HPT302, HPT366, HPT368, HPT370, HPT371, HPT372, HPT372N, HPT374.
  198. .It Intel:
  199. 6300ESB, 31244, PIIX, PIIX3, PIIX4, ESB2, ICH, ICH0, ICH2, ICH3, ICH4, ICH5,
  200. ICH6, ICH7, ICH8, ICH9, ICH10, SCH, PCH.
  201. .It ITE:
  202. IT8211F, IT8212F, IT8213F.
  203. .It JMicron:
  204. JMB360, JMB361, JMB363, JMB365, JMB366, JMB368.
  205. .It Marvell
  206. 88SX5040, 88SX5041, 88SX5080, 88SX5081, 88SX6041, 88SX6042, 88SX6081, 88SE6101,
  207. 88SE6102, 88SE6111, 88SE6121, 88SE6141, 88SE6145, 88SX7042.
  208. .It National:
  209. SC1100.
  210. .It NetCell:
  211. NC3000, NC5000.
  212. .It nVidia:
  213. nForce, nForce2, nForce2 MCP, nForce3, nForce3 MCP, nForce3 Pro, nForce4,
  214. MCP51, MCP55, MCP61, MCP65, MCP67, MCP73, MCP77, MCP79, MCP89.
  215. .It Promise:
  216. PDC20246, PDC20262, PDC20263, PDC20265, PDC20267, PDC20268, PDC20269, PDC20270,
  217. PDC20271, PDC20275, PDC20276, PDC20277, PDC20318, PDC20319, PDC20371, PDC20375,
  218. PDC20376, PDC20377, PDC20378, PDC20379, PDC20571, PDC20575, PDC20579, PDC20580,
  219. PDC20617, PDC20618, PDC20619, PDC20620, PDC20621, PDC20622, PDC40518, PDC40519,
  220. PDC40718, PDC40719.
  221. .It ServerWorks:
  222. HT1000, ROSB4, CSB5, CSB6, K2, Frodo4, Frodo8.
  223. .It Silicon Image:
  224. SiI0680, SiI3112, SiI3114, SiI3124, SiI3132, SiI3512.
  225. .It SiS:
  226. SIS180, SIS181, SIS182, SIS5513, SIS530, SIS540, SIS550, SIS620, SIS630,
  227. SIS630S, SIS633, SIS635, SIS730, SIS733, SIS735, SIS745, SIS961, SIS962,
  228. SIS963, SIS964, SIS965.
  229. .It VIA:
  230. VT6410, VT6420, VT6421, VT82C586, VT82C586B, VT82C596, VT82C596B, VT82C686,
  231. VT82C686A, VT82C686B, VT8231, VT8233, VT8233A, VT8233C, VT8235, VT8237,
  232. VT8237A, VT8237S, VT8251, CX700, VX800, VX855, VX900.
  233. .El
  234. .Pp
  235. Some of above chips are also supported by the more featured
  236. .Xr ahci 4 ,
  237. .Xr mvs 4 ,
  238. and
  239. .Xr siis 4
  240. drivers.
  241. If both drivers are loaded at the same time, those will have precedence.
  242. .Pp
  243. Unknown ATA chipsets are supported in PIO modes, and if the standard
  244. busmaster DMA registers are present and contain valid setup, DMA is
  245. also enabled, although the max mode is limited to UDMA33, as it is
  246. not known what the chipset can do and how to program it.
  247. .Sh NOTES
  248. Please remember that in order to use UDMA4/ATA66 and above modes you
  249. .Em must
  250. use 80 conductor cables.
  251. Please assure that ribbon cables are no longer than 45cm.
  252. In case of rounded ATA cables, the length depends on the
  253. quality of the cables.
  254. SATA cables can be up to 1m long according to the specification.
  255. External SATA cables can be 2m long and more, but not all controllers
  256. work well on long cables, especially at high speeds.
  257. .Sh SEE ALSO
  258. .Xr ada 4 ,
  259. .Xr ahci 4 ,
  260. .Xr cam 4 ,
  261. .Xr camcontrol 8 ,
  262. .Xr cd 4 ,
  263. .Xr mvs 4 ,
  264. .Xr siis 4
  265. .Sh HISTORY
  266. The
  267. .Nm
  268. driver first appeared in
  269. .Fx 4.0 .
  270. It was turned into a
  271. .Xr CAM 4
  272. interface module in
  273. .Fx 9.0 .
  274. .Sh AUTHORS
  275. .An Alexander Motin
  276. .Aq mav@FreeBSD.org ,
  277. .An S\(/oren Schmidt
  278. .Aq sos@FreeBSD.org