1.\" 2.\" Copyright (c) 2003 Søren Schmidt <sos@FreeBSD.org> 3.\" All rights reserved. 4.\" 5.\" Redistribution and use in source and binary forms, with or without 6.\" modification, are permitted provided that the following conditions 7.\" are met: 8.\" 1. Redistributions of source code must retain the above copyright 9.\" notice, this list of conditions and the following disclaimer, 10.\" without modification, immediately at the beginning of the file. 11.\" 2. Redistributions in binary form must reproduce the above copyright 12.\" notice, this list of conditions and the following disclaimer in the 13.\" documentation and/or other materials provided with the distribution. 14.\" 3. The name of the author may not be used to endorse or promote products 15.\" derived from this software without specific prior written permission. 16.\" 17.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR 18.\" IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES 19.\" OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. 20.\" IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, 21.\" INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 22.\" NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 23.\" DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 24.\" THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 25.\" (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF 26.\" THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 27.\" 28.\" $FreeBSD: src/share/man/man4/ata.4,v 1.72 2007/03/10 12:44:22 brueffer Exp $ 29.\" 30.Dd June 20, 2015 31.Dt NATA 4 32.Os 33.Sh NAME 34.Nm nata , 35.Nm acd , 36.Nm ad , 37.Nm afd , 38.Nm ast 39.Nd generic ATA/ATAPI disk controller driver 40.Sh SYNOPSIS 41To compile this driver into the kernel, 42place the following lines in your 43kernel configuration file: 44.Bd -ragged -offset indent 45For ISA based ATA/ATAPI support: 46.Cd device isa 47.Cd device nata0 at isa? port IO_WD1 irq 14 48.Cd device nata1 at isa? port IO_WD2 irq 15 49.Pp 50For PCI based ATA/ATAPI support: 51.Cd device pci 52.Cd device nata 53.Pp 54To support ATA compliant disk drives: 55.Cd device natadisk 56.Pp 57To support ATA software RAIDs: 58.Cd device nataraid 59.Pp 60To support ATAPI CDROM, DVD and CD/DVD burner drives: 61.Cd device natapicd 62.Pp 63To support ATAPI floppy drives: 64.Cd device natapifd 65.Pp 66To support ATAPI tape drives: 67.Cd device natapist 68.Ed 69.Pp 70Alternatively, to load the driver as a 71module at boot time, place the following line in 72.Xr loader.conf 5 : 73.Bd -literal -offset indent 74nata_load="YES" 75natacard_load="YES" 76natadisk_load="YES" 77nataisa_load="YES" 78natapci_load="YES" 79natapicd_load="YES" 80natapifd_load="YES" 81natapist_load="YES" 82natausb_load="YES" 83.Ed 84.Pp 85The following tunables are settable from the loader: 86.Bl -ohang 87.It Va hw.ata.ata_dma 88set to 1 for DMA access, 0 for PIO (default is DMA). 89.It Va hw.ata.atapi_dma 90set to 1 for DMA access, 0 for PIO (default is DMA). 91.It Va hw.ata.wc 92set to 1 to enable Write Caching, 0 to disable (default is enabled). 93.Em WARNING : 94can cause data loss on power failures and crashes. 95.El 96.Sh DESCRIPTION 97The 98.Nm 99driver provides access to ATA (IDE) and SerialATA disk drives, 100ATAPI CDROM/DVD drives, ZIP/LS120 ATAPI drives and ATAPI tape drives 101connected to controllers according to the ATA/ATAPI standards. 102.Pp 103The currently supported ATA/SATA controller chips are: 104.Pp 105.Bl -tag -width "Silicon Image:" -compact 106.It Acard: 107ATP850P, ATP860A, ATP860R, ATP865A, ATP865R. 108.It ALI: 109M5229, M5281, M5287, M5288, M5289. 110.It AMD: 111AMD756, AMD766, AMD768, AMD8111. 112.It ATI: 113IXP200, IXP300, IXP400. 114.It CMD: 115CMD646, CMD646U2, CMD648, CMD649. 116.It Cypress: 117Cypress 82C693. 118.It Cyrix: 119Cyrix 5530. 120.It HighPoint: 121HPT302, HPT366, HPT368, HPT370, HPT371, HPT372, HPT372N, HPT374. 122.It Intel: 1236300ESB, 31244, PIIX, PIIX3, PIIX4, ESB2, ICH, ICH0, ICH2, ICH3, ICH4, ICH5, ICH6, ICH7, ICH8, ICH9. 124.It ITE: 125IT8211F, IT8212F. 126.It JMicron: 127JMB360, JMB361, JMB363, JMB365, JMB366, JMB368. 128.It Marvell 12988SX5040, 88SX5041, 88SX5080, 88SX5081, 88SX6041, 88SX6081, 88SX6101, 88SX6141. 130.It National: 131SC1100. 132.It NetCell: 133NC3000, NC5000. 134.It nVidia: 135nForce, nForce2, nForce2 MCP, nForce3, nForce3 MCP, nForce3 Pro, nForce4. 136.It Promise: 137PDC20246, PDC20262, PDC20263, PDC20265, PDC20267, PDC20268, PDC20269, PDC20270, PDC20271, PDC20275, PDC20276, PDC20277, PDC20318, PDC20319, PDC20371, PDC20375, PDC20376, PDC20377, PDC20378, PDC20379, PDC20571, PDC20575, PDC20579, PDC20580, PDC20617, PDC20618, PDC20619, PDC20620, PDC20621, PDC20622, PDC40518, PDC40519, PDC40718, PDC40719. 138.It ServerWorks: 139HT1000, ROSB4, CSB5, CSB6, K2, Frodo4, Frodo8. 140.It Silicon Image: 141SiI0680, SiI3112, SiI3114, SiI3124, SiI3132, SiI3512. 142.It SiS: 143SIS180, SIS181, SIS182, SIS5513, SIS530, SIS540, SIS550, SIS620, SIS630, SIS630S, SIS633, SIS635, SIS730, SIS733, SIS735, SIS745, SIS961, SIS962, SIS963, SIS964, SIS965. 144.It VIA: 145VT6410, VT6420, VT6421, VT82C586, VT82C586B, VT82C596, VT82C596B, VT82C686, VT82C686A, VT82C686B, VT8231, VT8233, VT8233A, VT8233C, VT8235, VT8237, VT8237A, VT8251. 146.El 147.Pp 148Unknown ATA chipsets are supported in PIO modes, and if the standard 149busmaster DMA registers are present and contain valid setup, DMA is 150also enabled, although the max mode is limited to UDMA33, as it is 151not known what the chipset can do and how to program it. 152.Pp 153The 154.Nm 155driver can change the transfer mode and various other parameters 156when the system is up and running. 157See 158.Xr natacontrol 8 . 159.Pp 160The 161.Nm 162driver sets the maximum transfer mode supported by the hardware as default. 163However the 164.Nm 165driver sometimes warns: 166.Dq Sy "DMA limited to UDMA33, non-ATA66 cable or device". 167This means that the 168.Nm 169driver has detected that the required 80 conductor cable is not present 170or could not be detected properly, or that one of the devices on the 171channel only accepts up to UDMA2/ATA33. 172.Pp 173Unknown ATAPI devices are initialized to DMA mode if the 174.Va hw.ata.atapi_dma 175tunable is set to 1 and they support at least UDMA33 transfers. 176Otherwise they are set to PIO mode because severe DMA problems are 177common even if the device capabilities indicate support. 178You can always try to set DMA mode on an ATAPI device using 179.Xr natacontrol 8 , 180but be aware that your hardware might 181.Em not 182support it and can potentially 183.Em hang 184the entire system causing data loss. 185.Sh FILES 186.Bl -tag -width ".Pa /sys/config/X86_64_GENERIC" -compact 187.It Pa /dev/ad* 188ATA disk device nodes 189.It Pa /dev/ar* 190ATA RAID device nodes 191.It Pa /dev/acd* 192ATAPI CD-ROM device nodes 193.It Pa /dev/afd* 194ATAPI floppy drive device nodes 195.It Pa /dev/ast* 196ATAPI tape drive device nodes 197.It Pa /sys/config/X86_64_GENERIC 198sample generic kernel config file for 199.Nm 200based systems 201.El 202.Sh NOTES 203Please remember that in order to use UDMA4/ATA66 and above modes you 204.Em must 205use 80 conductor cables. 206Please assure that ribbon cables are no longer than 45cm. 207In case of rounded ATA cables, the length depends on the quality of the cables. 208SATA cables can be up to 1m long according to the specification. 209.Pp 210Static device numbering (enabled with the 211.Dv ATA_STATIC_ID 212kernel option) reserves a number for each possibly connected disk, 213even when not present. 214This is useful in hotswap scenarios where disks should always show up 215as the same numbered device, and not depend on attach order. 216.Pp 217Native Command Queuing (NCQ) on SATA drives is not yet supported. 218.Sh SEE ALSO 219.Xr ahci 4 , 220.Xr natapicam 4 , 221.Xr nataraid 4 , 222.Xr nvme 4 , 223.Xr sili 4 , 224.Xr burncd 8 , 225.Xr natacontrol 8 226.Sh HISTORY 227The 228.Xr ata 4 229driver first appeared in 230.Fx 4.0 . 231A later version was imported into 232.Dx 1.7 233as 234.Nm . 235.Sh AUTHORS 236.An S\(/oren Schmidt Aq Mt sos@FreeBSD.org 237