xref: /freebsd/share/man/man4/ata.4 (revision be8c7f2a51dbdae9a53b79476d980c55567fb6da)
1689701d8SJeroen Ruigrok van der Werven.\"
2688e92fcSSøren Schmidt.\" Copyright (c) 2003 S�ren Schmidt <sos@FreeBSD.org>
3689701d8SJeroen Ruigrok van der Werven.\" All rights reserved.
4689701d8SJeroen Ruigrok van der Werven.\"
5689701d8SJeroen Ruigrok van der Werven.\" Redistribution and use in source and binary forms, with or without
6689701d8SJeroen Ruigrok van der Werven.\" modification, are permitted provided that the following conditions
7689701d8SJeroen Ruigrok van der Werven.\" are met:
8689701d8SJeroen Ruigrok van der Werven.\" 1. Redistributions of source code must retain the above copyright
9688e92fcSSøren Schmidt.\"    notice, this list of conditions and the following disclaimer,
10688e92fcSSøren Schmidt.\"    without modification, immediately at the beginning of the file.
11689701d8SJeroen Ruigrok van der Werven.\" 2. Redistributions in binary form must reproduce the above copyright
12689701d8SJeroen Ruigrok van der Werven.\"    notice, this list of conditions and the following disclaimer in the
13689701d8SJeroen Ruigrok van der Werven.\"    documentation and/or other materials provided with the distribution.
14688e92fcSSøren Schmidt.\" 3. The name of the author may not be used to endorse or promote products
15688e92fcSSøren Schmidt.\"    derived from this software without specific prior written permission.
16689701d8SJeroen Ruigrok van der Werven.\"
17688e92fcSSøren Schmidt.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
18688e92fcSSøren Schmidt.\" IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
19688e92fcSSøren Schmidt.\" OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
20688e92fcSSøren Schmidt.\" IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
21688e92fcSSøren Schmidt.\" INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
22688e92fcSSøren Schmidt.\" NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
23688e92fcSSøren Schmidt.\" DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
24688e92fcSSøren Schmidt.\" THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
25688e92fcSSøren Schmidt.\" (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
26688e92fcSSøren Schmidt.\" THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
27689701d8SJeroen Ruigrok van der Werven.\"
28689701d8SJeroen Ruigrok van der Werven.\" $FreeBSD$
29689701d8SJeroen Ruigrok van der Werven.\"
307ce1f3e5SAlexander Motin.Dd July 3, 2010
318ea643adSJeroen Ruigrok van der Werven.Dt ATA 4
323d45e180SRuslan Ermilov.Os
33689701d8SJeroen Ruigrok van der Werven.Sh NAME
342d311b79SOllivier Robert.Nm ata ,
35688e92fcSSøren Schmidt.Nm ar ,
362d311b79SOllivier Robert.Nm acd ,
372d311b79SOllivier Robert.Nm ad ,
382d311b79SOllivier Robert.Nm afd ,
392d311b79SOllivier Robert.Nm ast
40eb083802SRuslan Ermilov.Nd generic ATA/ATAPI disk controller driver
41689701d8SJeroen Ruigrok van der Werven.Sh SYNOPSIS
42689701d8SJeroen Ruigrok van der WervenFor ISA based ATA/ATAPI support:
43689701d8SJeroen Ruigrok van der Werven.Cd device isa
44547d4262SKazutaka YOKOTA.Cd device ata
45547d4262SKazutaka YOKOTA.Pp
46547d4262SKazutaka YOKOTAIn
47547d4262SKazutaka YOKOTA.Pa /boot/device.hints :
48547d4262SKazutaka YOKOTA.Cd hint.ata.0.at="isa"
49547d4262SKazutaka YOKOTA.Cd hint.ata.0.port="0x1f0"
50547d4262SKazutaka YOKOTA.Cd hint.ata.0.irq="14"
51547d4262SKazutaka YOKOTA.Cd hint.ata.1.at="isa"
52547d4262SKazutaka YOKOTA.Cd hint.ata.1.port="0x170"
53547d4262SKazutaka YOKOTA.Cd hint.ata.1.irq="15"
54689701d8SJeroen Ruigrok van der Werven.Pp
558ba4488cSSøren SchmidtFor PC98 based ATA/ATAPI support:
568ba4488cSSøren Schmidt.Cd device isa
578ba4488cSSøren Schmidt.Cd device ata
588ba4488cSSøren Schmidt.Pp
598ba4488cSSøren SchmidtIn
608ba4488cSSøren Schmidt.Pa /boot/device.hints :
618ba4488cSSøren Schmidt.Cd hint.atacbus.0.at="isa"
628ba4488cSSøren Schmidt.Cd hint.atacbus.0.port="0x640"
638ba4488cSSøren Schmidt.Cd hint.atacbus.0.irq="9"
648ba4488cSSøren Schmidt.Pp
65689701d8SJeroen Ruigrok van der WervenFor PCI based ATA/ATAPI support:
66689701d8SJeroen Ruigrok van der Werven.Cd device pci
67689701d8SJeroen Ruigrok van der Werven.Cd device ata
68689701d8SJeroen Ruigrok van der Werven.Pp
69689701d8SJeroen Ruigrok van der WervenTo support ATA compliant disk drives:
70689701d8SJeroen Ruigrok van der Werven.Cd device atadisk
71689701d8SJeroen Ruigrok van der Werven.Pp
728ff5952aSSøren SchmidtTo support ATA software RAID's:
73688e92fcSSøren Schmidt.Cd device ataraid
74688e92fcSSøren Schmidt.Pp
758ff5952aSSøren SchmidtTo support ATAPI CDROM, DVD and CD/DVD burner drives:
76689701d8SJeroen Ruigrok van der Werven.Cd device atapicd
77689701d8SJeroen Ruigrok van der Werven.Pp
788ff5952aSSøren SchmidtTo support ATAPI floppy drives:
79689701d8SJeroen Ruigrok van der Werven.Cd device atapifd
80689701d8SJeroen Ruigrok van der Werven.Pp
81689701d8SJeroen Ruigrok van der WervenTo support ATAPI tape drives:
82689701d8SJeroen Ruigrok van der Werven.Cd device atapist
83689701d8SJeroen Ruigrok van der Werven.Pp
8439915804SAlexander MotinTo turn
8539915804SAlexander Motin.Xr ata 4
8639915804SAlexander Motinsubsystem controller drivers into cam(4) interface modules (disables all native
8739915804SAlexander Motin.Xr ata 4
88b06cfd40SJoel DahlAPIs and peripheral drivers):
8939915804SAlexander Motin.Cd options ATA_CAM
9039915804SAlexander Motin.Pp
91369bf356SMaxim KonovalovThe following tunables are settable from the loader:
92f4c4488aSRuslan Ermilov.Bl -ohang
93f4c4488aSRuslan Ermilov.It Va hw.ata.ata_dma
9437068be4SMurray Stokelyset to 1 for DMA access, 0 for PIO (default is DMA).
9519a71edbSPhilip Paeps.It Va hw.ata.ata_dma_check_80pin
9619a71edbSPhilip Paepsset to 0 to disable the 80pin cable check (default is 1, check the cable)
97f4c4488aSRuslan Ermilov.It Va hw.ata.atapi_dma
98e306ffcaSPeter Pentchevset to 1 for DMA access, 0 for PIO (default is DMA).
99f4c4488aSRuslan Ermilov.It Va hw.ata.wc
1002cc6cfc6SMax Khonset to 1 to enable Write Caching, 0 to disable (default is enabled).
1018ff5952aSSøren Schmidt.Em WARNING :
1021474c0cdSGiorgos Keramidascan cause data loss on power failures and crashes.
103f64d65b2SAlexander Motin.It Va hint.atapci.X.msi
104f64d65b2SAlexander Motinset to 1 to allow Message Signalled Interrupts (MSI) to be used by
105f64d65b2SAlexander Motinspecified PCI ATA controller, if supported.
1067ce1f3e5SAlexander Motin.It Va hint.ata.X.devX.mode
1077ce1f3e5SAlexander Motinlimits initial ATA mode for specified device on specified channel.
1087ce1f3e5SAlexander Motin.It Va hint.ata.X.mode
1097ce1f3e5SAlexander Motinlimits initial ATA mode for every device on specified channel.
110f64d65b2SAlexander Motin.It Va hint.ata.X.pm_level
111f64d65b2SAlexander Motincontrols SATA interface Power Management for specified channel,
112f64d65b2SAlexander Motinallowing to save some power by the cost of additional command latency.
113f64d65b2SAlexander MotinPossible values:
114f64d65b2SAlexander Motin.Bl -tag -compact
115f64d65b2SAlexander Motin.It 0
116f64d65b2SAlexander Motininterface Power Management is disabled, default value.
117f64d65b2SAlexander Motin.It 1
118f64d65b2SAlexander Motindevice is allowed to initiate PM state change, host is passive.
119f64d65b2SAlexander Motin.It 2
120f64d65b2SAlexander Motinhost initiates PARTIAL PM state transition every time port becomes idle.
121f64d65b2SAlexander Motin.It 3
122f64d65b2SAlexander Motinhost initiates SLUMBER PM state transition every time port becomes idle.
123f64d65b2SAlexander Motin.El
124f64d65b2SAlexander MotinModes 2 and 3 are implemented only for AHCI driver now.
125f4c4488aSRuslan Ermilov.El
126689701d8SJeroen Ruigrok van der Werven.Sh DESCRIPTION
127688e92fcSSøren SchmidtThe
128688e92fcSSøren Schmidt.Nm
129688e92fcSSøren Schmidtdriver provides access to ATA (IDE) and SerialATA disk drives,
130688e92fcSSøren SchmidtATAPI CDROM/DVD drives, ZIP/LS120 ATAPI drives and ATAPI tape drives
131688e92fcSSøren Schmidtconnected to controllers according to the ATA/ATAPI standards.
132689701d8SJeroen Ruigrok van der Werven.Pp
133688e92fcSSøren SchmidtThe currently supported ATA/SATA controller chips are:
134689701d8SJeroen Ruigrok van der Werven.Pp
135688e92fcSSøren Schmidt.Bl -tag -width "Silicon Image:" -compact
136688e92fcSSøren Schmidt.It Acard:
137c6fd52cbSJoel DahlATP850P, ATP860A, ATP860R, ATP865A, ATP865R.
138688e92fcSSøren Schmidt.It ALI:
13939915804SAlexander MotinM5228, M5229, M5281, M5283, M5287, M5288, M5289.
140688e92fcSSøren Schmidt.It AMD:
141da31a86aSChristian BruefferAMD756, AMD766, AMD768, AMD8111, CS5536.
1423a22b03dSJoel Dahl.It ATI:
1431f02c0f7SAlexander MotinIXP200, IXP300, IXP400, IXP600, IXP700, IXP800.
144688e92fcSSøren Schmidt.It CMD:
145c94b6c42SJoel DahlCMD646, CMD646U2, CMD648, CMD649.
146688e92fcSSøren Schmidt.It Cypress:
147688e92fcSSøren SchmidtCypress 82C693.
148d8f934daSChristian Brueffer.It Cyrix:
149d8f934daSChristian BruefferCyrix 5530.
150688e92fcSSøren Schmidt.It HighPoint:
151c94b6c42SJoel DahlHPT302, HPT366, HPT368, HPT370, HPT371, HPT372, HPT372N, HPT374.
152688e92fcSSøren Schmidt.It Intel:
15339915804SAlexander Motin6300ESB, 31244, PIIX, PIIX3, PIIX4, ESB2, ICH, ICH0, ICH2, ICH3, ICH4, ICH5,
15439915804SAlexander MotinICH6, ICH7, ICH8, ICH9, ICH10, SCH, PCH.
15539d1acc3SChristian Brueffer.It ITE:
156129e5ac6SChristian BruefferIT8211F, IT8212F, IT8213F.
157aed1a1f1SChristian Brueffer.It JMicron:
158dbd1ddacSChristian BruefferJMB360, JMB361, JMB363, JMB365, JMB366, JMB368.
159232c858fSChristian Brueffer.It Marvell
1601f02c0f7SAlexander Motin88SX5040, 88SX5041, 88SX5080, 88SX5081, 88SX6041, 88SX6042, 88SX6081, 88SX6101,
161c01cccb8SAlexander Motin88SX6102, 88SX6111, 88SX6121, 88SX6141, 88SX6145, 88SX7042.
162688e92fcSSøren Schmidt.It National:
163688e92fcSSøren SchmidtSC1100.
164cebf4a4eSChristian Brueffer.It NetCell:
165cebf4a4eSChristian BruefferNC3000, NC5000.
166688e92fcSSøren Schmidt.It nVidia:
1671f02c0f7SAlexander MotinnForce, nForce2, nForce2 MCP, nForce3, nForce3 MCP, nForce3 Pro, nForce4,
1681f02c0f7SAlexander MotinMCP51, MCP55, MCP61, MCP65, MCP67, MCP73, MCP77, MCP79, MCP89.
169688e92fcSSøren Schmidt.It Promise:
170*be8c7f2aSSergey KandaurovPDC20246, PDC20262, PDC20263, PDC20265, PDC20267, PDC20268, PDC20269, PDC20270,
171*be8c7f2aSSergey KandaurovPDC20271, PDC20275, PDC20276, PDC20277, PDC20318, PDC20319, PDC20371, PDC20375,
172*be8c7f2aSSergey KandaurovPDC20376, PDC20377, PDC20378, PDC20379, PDC20571, PDC20575, PDC20579, PDC20580,
173*be8c7f2aSSergey KandaurovPDC20617, PDC20618, PDC20619, PDC20620, PDC20621, PDC20622, PDC40518, PDC40519,
174*be8c7f2aSSergey KandaurovPDC40718, PDC40719.
175688e92fcSSøren Schmidt.It ServerWorks:
176dbd1ddacSChristian BruefferHT1000, ROSB4, CSB5, CSB6, K2, Frodo4, Frodo8.
177688e92fcSSøren Schmidt.It Silicon Image:
178199dc74dSChristian BruefferSiI0680, SiI3112, SiI3114, SiI3124, SiI3132, SiI3512.
179688e92fcSSøren Schmidt.It SiS:
180*be8c7f2aSSergey KandaurovSIS180, SIS181, SIS182, SIS5513, SIS530, SIS540, SIS550, SIS620, SIS630,
181*be8c7f2aSSergey KandaurovSIS630S, SIS633, SIS635, SIS730, SIS733, SIS735, SIS745, SIS961, SIS962,
182*be8c7f2aSSergey KandaurovSIS963, SIS964, SIS965.
183688e92fcSSøren Schmidt.It VIA:
18439915804SAlexander MotinVT6410, VT6420, VT6421, VT82C586, VT82C586B, VT82C596, VT82C596B, VT82C686,
18539915804SAlexander MotinVT82C686A, VT82C686B, VT8231, VT8233, VT8233A, VT8233C, VT8235, VT8237,
18639915804SAlexander MotinVT8237A, VT8237S, VT8251, CX700, VX800, VX855.
187689701d8SJeroen Ruigrok van der Werven.El
188689701d8SJeroen Ruigrok van der Werven.Pp
189688e92fcSSøren SchmidtUnknown ATA chipsets are supported in PIO modes, and if the standard
1908ff5952aSSøren Schmidtbusmaster DMA registers are present and contain valid setup, DMA is
191c48524c2SMike Pritchardalso enabled, although the max mode is limited to UDMA33, as it is
192688e92fcSSøren Schmidtnot known what the chipset can do and how to program it.
193689701d8SJeroen Ruigrok van der Werven.Pp
194ed403116SRuslan ErmilovThe
195ed403116SRuslan Ermilov.Nm
196688e92fcSSøren Schmidtdriver can change the transfer mode and various other parameters
1978ff5952aSSøren Schmidtwhen the system is up and running.
1988ff5952aSSøren SchmidtSee
199f4c4488aSRuslan Ermilov.Xr atacontrol 8 .
200689701d8SJeroen Ruigrok van der Werven.Pp
201688e92fcSSøren SchmidtThe
202bf7f20c2SRuslan Ermilov.Nm
203688e92fcSSøren Schmidtdriver sets the maximum transfer mode supported by the hardware as default.
204d962d52aSRuslan ErmilovHowever the
205f7b6f951SSøren Schmidt.Nm
206688e92fcSSøren Schmidtdriver sometimes warns:
2078ff5952aSSøren Schmidt.Dq Sy "DMA limited to UDMA33, non-ATA66 cable or device".
208688e92fcSSøren SchmidtThis means that
209688e92fcSSøren Schmidtthe
210c9753c58SSimon L. B. Nielsen.Nm
2118ff5952aSSøren Schmidtdriver has detected that the required 80 conductor cable is not present
2128ff5952aSSøren Schmidtor could not be detected properly,
2138ff5952aSSøren Schmidtor that one of the devices on the channel only accepts up
214f1bec2c1SSimon L. B. Nielsento UDMA2/ATA33.
215f1bec2c1SSimon L. B. NielsenThe
21619a71edbSPhilip Paeps.Va hw.ata.ata_dma_check_80pin
21719a71edbSPhilip Paepstunable can be set to 0 to disable this check.
218688e92fcSSøren Schmidt.Pp
21932e940feSPeter PentchevUnknown ATAPI devices are initialized to DMA mode if the
22032e940feSPeter Pentchev.Va hw.ata.atapi_dma
22132e940feSPeter Pentchevtunable is set to 1 and they support at least UDMA33 transfers.
22232e940feSPeter PentchevOtherwise they are set to PIO mode because severe DMA problems are
2238ff5952aSSøren Schmidtcommon even if the device capabilities indicate support.
224f4c4488aSRuslan ErmilovYou can always try to set DMA mode on an ATAPI device using
225f4c4488aSRuslan Ermilov.Xr atacontrol 8 ,
226689701d8SJeroen Ruigrok van der Wervenbut be aware that your hardware might
227689701d8SJeroen Ruigrok van der Werven.Em not
228688e92fcSSøren Schmidtsupport it and can potentially
229689701d8SJeroen Ruigrok van der Werven.Em hang
230688e92fcSSøren Schmidtthe entire system causing data loss.
231689701d8SJeroen Ruigrok van der Werven.Sh FILES
232d962d52aSRuslan Ermilov.Bl -tag -width ".Pa /sys/i386/conf/GENERIC" -compact
233689701d8SJeroen Ruigrok van der Werven.It Pa /dev/ad*
234689701d8SJeroen Ruigrok van der WervenATA disk device nodes
235688e92fcSSøren Schmidt.It Pa /dev/ar*
236688e92fcSSøren SchmidtATA RAID device nodes
237689701d8SJeroen Ruigrok van der Werven.It Pa /dev/acd*
238689701d8SJeroen Ruigrok van der WervenATAPI CD-ROM device nodes
239689701d8SJeroen Ruigrok van der Werven.It Pa /dev/afd*
240689701d8SJeroen Ruigrok van der WervenATAPI floppy drive device nodes
241689701d8SJeroen Ruigrok van der Werven.It Pa /dev/ast*
242689701d8SJeroen Ruigrok van der WervenATAPI tape drive device nodes
243689701d8SJeroen Ruigrok van der Werven.It Pa /sys/i386/conf/GENERIC
244ed403116SRuslan Ermilovsample generic kernel config file for
245ed403116SRuslan Ermilov.Nm
246ed403116SRuslan Ermilovbased systems
247689701d8SJeroen Ruigrok van der Werven.El
248689701d8SJeroen Ruigrok van der Werven.Sh NOTES
249688e92fcSSøren SchmidtPlease remember that in order to use UDMA4/ATA66 and above modes you
250688e92fcSSøren Schmidt.Em must
251c9753c58SSimon L. B. Nielsenuse 80 conductor cables.
2525512804bSRebecca CranPlease assure that ribbon cables are no longer than 45cm.
2538ff5952aSSøren SchmidtIn case of rounded ATA cables, the length depends on the
254c9753c58SSimon L. B. Nielsenquality of the cables.
2558ff5952aSSøren SchmidtSATA cables can be up to 1m long according to the specification.
256688e92fcSSøren Schmidt.Pp
257688e92fcSSøren SchmidtStatic device numbering
258793da78fSSheldon Hearn(enabled with the
259793da78fSSheldon Hearn.Dv ATA_STATIC_ID
260793da78fSSheldon Hearnkernel option)
261793da78fSSheldon Hearnreserves a number for each possibly connected disk,
262c9753c58SSimon L. B. Nielseneven when not present.
263c48524c2SMike PritchardThis is useful in hotswap scenarios
2648ff5952aSSøren Schmidtwhere disks should always show up as the same numbered device,
265688e92fcSSøren Schmidtand not depend on attach order.
266d5b7ae98SWilko Bulte.Pp
267d5b7ae98SWilko BulteNative Command Queuing (NCQ) on SATA drives is not yet supported.
268f4c4488aSRuslan Ermilov.Sh SEE ALSO
26939915804SAlexander Motin.Xr ahci 4 ,
27039915804SAlexander Motin.Xr cam 4 ,
271a431f9bbSChristian Brueffer.Xr ataraid 4 ,
2729a9c1407SRuslan Ermilov.Xr atacontrol 8 ,
27339915804SAlexander Motin.Xr burncd 8 ,
27439915804SAlexander Motin.Xr siis 4
275ed403116SRuslan Ermilov.Sh HISTORY
276ed403116SRuslan ErmilovThe
277ed403116SRuslan Ermilov.Nm
278ed403116SRuslan Ermilovdriver first appeared in
279ed403116SRuslan Ermilov.Fx 4.0 .
2808ff5952aSSøren Schmidt.Sh AUTHORS
2818e8536e1SRuslan Ermilov.An S\(/oren Schmidt
282d905b0b6SMike Pritchard.Aq sos@FreeBSD.org .
283