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 4.0 32.Sh NAME 33.Nm ata 34.Nd 35Generic ATA/ATAPI disk controller driver 36.Sh SYNOPSIS 37For ISA based ATA/ATAPI support: 38.Cd device isa 39.Cd device ata0 at isa? port IO_WD1 irq 14 40.Cd device ata1 at isa? port IO_WD2 irq 15 41.Pp 42For PCI based ATA/ATAPI support: 43.Cd device pci 44.Cd device ata 45.Pp 46To support ATA compliant disk drives: 47.Cd device atadisk 48.Pp 49To support ATAPI CD-ROM, CDR, CDRW, DVD-ROM and DVD-RAM drives: 50.Cd device atapicd 51.Pp 52To support ATAPI floppy drives, 53such as the ZIP and LS120: 54.Cd device atapifd 55.Pp 56To support ATAPI tape drives: 57.Cd device atapist 58.Pp 59To enable static controller and device numbering 60(see the 61.Sx NOTES 62section below): 63.Cd options ATA_STATIC_ID 64.Pp 65To enable DMA on an ATAPI device: 66.Cd options ATA_ENABLE_ATAPI_DMA 67.Sh DESCRIPTION 68This driver provides access to disk drives, ATAPI CD-ROM and DVD drives, 69ZIP drives and tape streamers connected to controllers 70according to the ATA and ATAPI standards. 71These devices are also commonly known as IDE or EIDE devices. 72.Pp 73The currently supported controllers with their maximum speed include: 74.Pp 75.Bl -tag -width "Promise Fasttrak-33 " -compact 76.It Acerlabs Aladdin 77Ultra DMA 33 (UDMA2), 33 MB/sec 78.It AMD 756 79Ultra DMA 66 (UDMA4), 66 MB/sec 80.It CMD 646 81DMA 2 (WDMA2), 16 MB/sec 82.It Cypress 82C693 83DMA 2 (WDMA2), 16 MB/sec 84.It HighPoint HPT366 85Ultra DMA 66 (UDMA4), 66 MB/sec 86.It Intel PIIX 87DMA 2 (WDMA2), 16 MB/sec 88.It Intel PIIX3 89DMA 2 (WDMA2), 16 MB/sec 90.It Intel PIIX4 91Ultra DMA 33 (UDMA2), 33 MB/sec 92.It Intel ICH 93Ultra DMA 66 (UDMA4), 66 MB/sec 94.It Promise Fasttrak-33 95Ultra DMA 33 (UDMA2), 33 MB/sec 96.It Promise Fasttrak-66 97Ultra DMA 66 (UDMA4), 66 MB/sec 98.It Promise Ultra-33 99Ultra DMA 33 (UDMA2), 33 MB/sec 100.It Promise Ultra-66 101Ultra DMA 66 (UDMA4), 66 MB/sec 102.It SiS 5591 103Ultra DMA 33 (UDMA2), 33 MB/sec 104.It VIA 82C586 105Ultra DMA 33 (UDMA2), 33 MB/sec 106.It VIA 82C686 107Ultra DMA 66 (UDMA4), 66 MB/sec 108.El 109.Pp 110All unknown chipsets can be supported at the maximum speed of 16 MB/sec. 111.Pp 112The ata driver also allows for changes to the transfer mode of the devices 113at a later time when the system is up and running. 114.Pp 115The driver attempts to set the maximum performance transfer mode on your disk 116drives by selecting the highest possible DMA mode. 117ATAPI devices are left in PIO mode because DMA problems are common despite the 118device specifications. 119You can always try to set DMA mode on an ATAPI device using the sysctl 120method described here, 121but be aware that your hardware might 122.Em not 123support it and can 124.Em hang 125the system. 126.Pp 127To see the devices' current access modes, use the command line: 128.Pp 129.Dl sysctl hw.atamodes 130.Pp 131which results in the modes of the devices being displayed as a string 132like this: 133.Pp 134.Dl hw.atamodes: dma,pio,---,pio,dma,---,dma,---, (--- = no device) 135.Pp 136This means that ata0-master is in DMA mode, 137ata0-slave is in PIO mode, 138and so forth. 139You can set the mode with sysctl -w and a string like the above, 140for example: 141.Pp 142.Dl sysctl -w hw.atamodes=pio,pio,---,dma,pio,---,dma,---, 143.Pp 144The new modes are set as soon as the sysctl command returns. 145.Pp 146.Sh FILES 147.Bl -tag -width "/sys/i386/conf/GENERIC " -compact 148.It Pa /dev/ad* 149ATA disk device nodes 150.It Pa /dev/acd* 151ATAPI CD-ROM device nodes 152.It Pa /dev/afd* 153ATAPI floppy drive device nodes 154.It Pa /dev/ast* 155ATAPI tape drive device nodes 156.It Pa /sys/i386/conf/GENERIC 157sample generic kernel config file for ata based systems 158.El 159.Sh NOTES 160Static numbering 161(enabled with the 162.Dv ATA_STATIC_ID 163kernel option) 164reserves a number for each possibly connected disk, 165even when not present. 166This may result in odd situations where, 167for example, 168ad0 and ad2 exist in the absence of ad1. 169The advantage is that the addition of the formerly absent drive 170does not cause the numbers of the other drives to change. 171.Pp 172The ata driver does not support MFM/RLL/ESDI (ST-506) style disks. 173.Pp 174Remember that in order to use UDMA4 mode you 175.Em have 176to use a special 80 conductor cable, 177and the driver tries to determine if you have such a cable 178attached before setting UDMA4 mode. 179.Pp 180The use of UDMA4(66MHz) and non-UDMA4 devices on the same ATA channel is not 181recommended, 182unless they are run at the non-UDMA4 device's lower speed. 183The driver has been designed to handle this but some older devices do 184not like this. 185.Sh AUTHORS 186The ata driver was written by 187.An S�ren Schmidt 188.Aq sos@FreeBSD.org . 189.Pp 190This manual page was written by 191.An Jeroen Ruigrok van der Werven 192.Aq asmodai@FreeBSD.org 193and 194.An S�ren Schmidt 195.Aq sos@FreeBSD.org . 196