1.\" 2.\" Copyright (c) 2000 Jeroen Ruigrok van der Werven 3.\" Copyright (c) 2000 S�ren Schmidt 4.\" All rights reserved. 5.\" 6.\" Redistribution and use in source and binary forms, with or without 7.\" modification, are permitted provided that the following conditions 8.\" are met: 9.\" 1. Redistributions of source code must retain the above copyright 10.\" notice, this list of conditions and the following disclaimer. 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.\" 15.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND 16.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 17.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 18.\" ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE 19.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 20.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 21.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 22.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 23.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 24.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 25.\" SUCH DAMAGE. 26.\" 27.\" $FreeBSD$ 28.\" 29.Dd January 27, 2000 30.Dt ATA 4 31.Os FreeBSD 32.Sh NAME 33.Nm ata , 34.Nm acd , 35.Nm ad , 36.Nm afd , 37.Nm ast 38.Nd 39Generic ATA/ATAPI disk controller driver 40.Sh SYNOPSIS 41For ISA based ATA/ATAPI support: 42.Cd device isa 43.Cd device ata0 at isa? port IO_WD1 irq 14 44.Cd device ata1 at isa? port IO_WD2 irq 15 45.Pp 46For PCI based ATA/ATAPI support: 47.Cd device pci 48.Cd device ata 49.Pp 50To support ATA compliant disk drives: 51.Cd device atadisk 52.Pp 53To support ATAPI CD-ROM, CDR, CDRW, DVD-ROM and DVD-RAM drives: 54.Cd device atapicd 55.Pp 56To support ATAPI floppy drives, 57such as the ZIP and LS120: 58.Cd device atapifd 59.Pp 60To support ATAPI tape drives: 61.Cd device atapist 62.Pp 63To enable static controller and device numbering 64(see the 65.Sx NOTES 66section below): 67.Cd options ATA_STATIC_ID 68.Pp 69To enable DMA on an ATAPI device: 70.Cd options ATA_ENABLE_ATAPI_DMA 71.Pp 72To enable Tagged Queuing support (only IBM DPTA and DTLA drives support that) 73.Cd options ATA_ENABLE_TAGS 74.Sh DESCRIPTION 75This driver provides access to disk drives, ATAPI CD-ROM and DVD drives, 76ZIP drives and tape streamers connected to controllers 77according to the ATA and ATAPI standards. 78These devices are also commonly known as IDE or EIDE devices. 79.Pp 80The currently supported controllers with their maximum speed include: 81.Pp 82.Bl -tag -width "xxxxxxxxxxxxxxxxxxxxxxxxxxxxx" -compact 83.It Acerlabs Aladdin 84Ultra DMA 33 (UDMA2), 33 MB/sec 85.It AMD 756 86Ultra DMA 66 (UDMA4), 66 MB/sec 87.It CMD 646 88DMA 2 (WDMA2), 16 MB/sec 89.It CMD 648 90Ultra DMA 66 (UDMA4), 66 MB/sec 91.It CMD 649 92Ultra DMA 100 (UDMA5), 100 MB/sec 93.It Cypress 82C693 94DMA 2 (WDMA2), 16 MB/sec 95.It HighPoint HPT366 96Ultra DMA 66 (UDMA4), 66 MB/sec 97.It HighPoint HPT370 98Ultra DMA 100 (UDMA5), 100 MB/sec 99.It Intel PIIX 100DMA 2 (WDMA2), 16 MB/sec 101.It Intel PIIX3 102DMA 2 (WDMA2), 16 MB/sec 103.It Intel PIIX4 104Ultra DMA 33 (UDMA2), 33 MB/sec 105.It Intel ICH0 106Ultra DMA 33 (UDMA2), 33 MB/sec 107.It Intel ICH 108Ultra DMA 66 (UDMA4), 66 MB/sec 109.It Intel ICH2 110Ultra DMA 100 (UDMA5), 100 MB/sec 111.It Promise Ultra/Fasttrak-33 112Ultra DMA 33 (UDMA2), 33 MB/sec 113.It Promise Ultra/Fasttrak-66 114Ultra DMA 66 (UDMA4), 66 MB/sec 115.It Promise Ultra/Fasttrak-100 116Ultra DMA 100 (UDMA5), 100 MB/sec 117.It ServerWorks ROSB4 118Ultra DMA 33 (UDMA2), 33 MB/sec 119.It SiS 5591 120Ultra DMA 33 (UDMA2), 33 MB/sec 121.It Cyrix 5530 122Ultra DMA 33 (UDMA2), 33 MB/sec 123.It VIA 82C586 124Ultra DMA 33 (UDMA2), 33 MB/sec 125.It VIA 82C686 126Ultra DMA 66 (UDMA4), 66 MB/sec 127.El 128.Pp 129All unknown chipsets can be supported at the maximum speed of 16 MB/sec. 130.Pp 131The 132.Nm 133driver also allows for changes to the transfer mode of the devices 134at a later time when the system is up and running. 135.Pp 136The driver attempts to set the maximum performance transfer mode on your disk 137drives by selecting the highest possible DMA mode. 138ATAPI devices are left in PIO mode because DMA problems are common despite the 139device specifications. 140You can always try to set DMA mode on an ATAPI device using the sysctl 141method described here, 142but be aware that your hardware might 143.Em not 144support it and can 145.Em hang 146the system. 147.Pp 148To see the devices' current access modes, use the command line: 149.Pp 150.Dl sysctl hw.atamodes 151.Pp 152which results in the modes of the devices being displayed as a string 153like this: 154.Pp 155.Dl hw.atamodes: dma,pio,---,pio,dma,---,dma,---, (--- = no device) 156.Pp 157This means that ata0-master is in DMA mode, 158ata0-slave is in PIO mode, 159and so forth. 160You can set the mode with sysctl -w and a string like the above, 161for example: 162.Pp 163.Dl sysctl -w hw.atamodes=pio,pio,---,dma,pio,---,dma,---, 164.Pp 165The new modes are set as soon as the sysctl command returns. 166.Pp 167.Sh FILES 168.Bl -tag -width "/sys/i386/conf/GENERIC " -compact 169.It Pa /dev/ad* 170ATA disk device nodes 171.It Pa /dev/acd* 172ATAPI CD-ROM device nodes 173.It Pa /dev/afd* 174ATAPI floppy drive device nodes 175.It Pa /dev/ast* 176ATAPI tape drive device nodes 177.It Pa /sys/i386/conf/GENERIC 178sample generic kernel config file for 179.Nm 180based systems 181.El 182.Sh NOTES 183Static numbering 184(enabled with the 185.Dv ATA_STATIC_ID 186kernel option) 187reserves a number for each possibly connected disk, 188even when not present. 189This may result in odd situations where, 190for example, 191ad0 and ad2 exist in the absence of ad1. 192The advantage is that the addition of the formerly absent drive 193does not cause the numbers of the other drives to change. 194.Pp 195The 196.Nm 197driver does not support MFM/RLL/ESDI (ST-506) style disks. 198.Pp 199Remember that in order to use UDMA4 mode you 200.Em have 201to use a special 80 conductor cable, 202and the driver tries to determine if you have such a cable 203attached before setting UDMA4 mode. 204.Pp 205The use of UDMA4(66MHz) and higher together with non-UDMA4 devices on 206the same ATA channel is not recommended, 207unless they are run at the non-UDMA4 device's lower speed. 208The driver has been designed to handle that kind of setup but lots of 209older devices do not like this. 210.Sh HISTORY 211The 212.Nm 213driver first appeared in 214.Fx 4.0 . 215.Sh AUTHORS 216.An -nosplit 217The 218.Nm 219driver was written by 220.An S\(/oren Schmidt 221.Aq sos@FreeBSD.org . 222.Pp 223This manual page was written by 224.An Jeroen Ruigrok van der Werven 225.Aq asmodai@FreeBSD.org 226and 227.An S\(/oren Schmidt 228.Aq sos@FreeBSD.org . 229