1.\" $NetBSD: pciide.4,v 1.37 2002/03/24 17:03:45 bouyer Exp $ 2.\" 3.\" Copyright (c) 1998 Manuel Bouyer. 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.\" 2. Redistributions in binary form must reproduce the above copyright 11.\" notice, this list of conditions and the following disclaimer in the 12.\" documentation and/or other materials provided with the distribution. 13.\" 3. All advertising materials mentioning features or use of this software 14.\" must display the following acknowledgement: 15.\" This product includes software developed by the University of 16.\" California, Berkeley and its contributors. 17.\" 4. Neither the name of the University nor the names of its contributors 18.\" may be used to endorse or promote products derived from this software 19.\" without specific prior written permission. 20.\" 21.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR 22.\" IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES 23.\" OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. 24.\" IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, 25.\" INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 26.\" NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 27.\" DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 28.\" THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 29.\" INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF 30.\" THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 31.\" 32.Dd October 15, 1998 33.Dt PCIIDE 4 34.Os 35.Sh NAME 36.Nm pciide 37.Nd PCI IDE disk controllers driver 38.Sh SYNOPSIS 39.Cd "pciide* at pci? dev ? function ? flags 0x0000" 40.Cd "pciide* at pnpbios? index ?" 41.Cd "options PCIIDE_CMD064x_DISABLE" 42.Cd "options PCIIDE_AMD756_ENABLEDMA" 43.Cd "options PCIIDE_CMD0646U_ENABLEUDMA" 44.Sh DESCRIPTION 45The 46.Nm 47driver supports the PCI IDE controllers as specified in the 48"PCI IDE controller specification, revision 1.0" draft, and provides the core 49functions for the 50.Ic wd 51and 52.Ic atapi 53drivers. This driver include specific, enhanced support for the CMD Tech 54PCI0640 controller, and IDE DMA/Ultra-DMA support for the following 55controllers: 56.Bl -dash -compact -offset indent 57.It 58Acard ATP850 (Ultra/33) and ATP860 (Ultra/66) IDE Controllers 59.It 60Acer labs M5229 IDE Controller 61.It 62Advanced Micro Devices AMD-756, 766 and 768 IDE Controllers 63.It 64CMD Tech PCI0643, PCI0646, PCI0648 and PCI0649 IDE Controllers 65.It 66Contaq Microsystems/Cypress CY82C693 IDE Controller 67.It 68HighPoint HPT366 Ultra/66 and HPT370 Ultra/100 IDE controller 69.It 70Intel PIIX, PIIX3 and PIIX4 IDE Controllers 71.It 72Intel 82801 (ICH/ICH0/ICH2) IDE Controllers 73.It 74OPTi 82c621 (plus a few of its derivatives) IDE Controllers 75.It 76Promise PDC20246 (Ultra/33), PDC20262 (Ultra/66), PDC20265/PDC20267 (Ultra100), 77PDC20268 (Ultra/100TX2 and Ultra/100TX2v2) and Ultra/133 PCI IDE controllers 78.It 79Silicon Integrated System 5597/5598 IDE controller 80.It 81VIA Technologies VT82C586, VT82C586A, VT82C596A and VT82C686A IDE Controllers 82.El 83Some of these controllers are only available in multifunction PCI chips. 84.Pp 85The 0x0001 flag forces the 86.Nm 87driver to use DMA when there is no explicit DMA mode setting support for 88the controller but DMA is present. If the BIOS didn't set up the controller 89properly, this can cause a machine hang. 90.Pp 91The 0x0002 flag forces the 92.Nm 93driver to disable DMA on chipsets for which DMA would normally be 94enabled. This can be used as a debugging aid, or to work around 95problems where the IDE controller is wired up to the system incorrectly. 96.Sh SEE ALSO 97.Xr intro 4 , 98.Xr pci 4 , 99.Xr pnpbios 4 , 100.Xr scsi 4 , 101.Xr wd 4 , 102.Xr wdc 4 103.Sh BUGS 104There's no way to reliably know if a PCI064x controller is enabled or not. 105If the driver finds a PCI064x, it will assume it is enabled unless the 106PCIIDE_CMD064x_DISABLE option is specified in the kernel config file. 107This will be a problem only if the controller has been disabled in the BIOS 108and another controller has been installed and uses the ISA legacy I/O ports 109and interrupts. 110.Pp 111The PCI0646U controller is known to be buggy with Ultra-DMA transfers, so 112Ultra-DMA is disabled by default for this controller. To enable Ultra-DMA, 113use the PCIIDE_CMD0646U_ENABLEUDMA option. Ultra-DMA can eventually be 114disabled on a per-drive basis with config flags, see 115.Xr wd 4 . 116.Pp 117The AMD756 chip revision D2 has a bug affecting DMA (but not Ultra-DMA) 118modes. The workaround documented by AMD is to not use DMA on any drive which 119does not support Ultra-DMA modes. This does not appear to be necessary on all 120drives, the PCIIDE_AMD756_ENABLEDMA option can be used to force multiword DMA 121on the buggy revisions. Multiword DMA can eventually be disabled on a 122per-drive basis with config flags, see 123.Xr wd 4 . 124The bug, if triggered, will cause a total system hang. 125.Pp 126The timings used for the PIO and DMA modes for controllers listed above 127are for a PCI bus running at 30 or 33 MHz (except the OPTi controller, 128which supports both 25 and 33 MHz PCI bus timings). This driver may not 129work properly on overclocked systems. 130.Pp 131The core wdc doesn't support modes higher than Ultra-DMA 5, so the Promise 132Ultra/133 is only used at Ultra/100. 133