xref: /openbsd-src/share/man/man4/pciide.4 (revision b2ea75c1b17e1a9a339660e7ed45cd24946b230e)
1.\"	$OpenBSD: pciide.4,v 1.16 2001/08/03 22:37:36 chris Exp $
2.\"	$NetBSD: pciide.4,v 1.8 1999/03/16 01:19:17 garbled Exp $
3.\"
4.\" Copyright (c) 1998 Manuel Bouyer.
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.\" 3. All advertising materials mentioning features or use of this software
15.\"    must display the following acknowledgement:
16.\"	This product includes software developed by the University of
17.\"	California, Berkeley and its contributors.
18.\" 4. Neither the name of the University nor the names of its contributors
19.\"    may be used to endorse or promote products derived from this software
20.\"    without specific prior written permission.
21.\"
22.\" THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
23.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
24.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
25.\" ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
26.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
27.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
28.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
29.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
30.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
31.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
32.\" SUCH DAMAGE.
33.\"
34.Dd October 15, 1998
35.Dt PCIIDE 4
36.Os
37.Sh NAME
38.Nm pciide
39.Nd PCI IDE controller driver
40.Sh SYNOPSIS
41.Cd "pciide* at pci ? dev ? function ? flags 0x0000"
42.Cd "options PCIIDE_CMD064x_DISABLE"
43.Sh DESCRIPTION
44The
45.Nm
46driver supports the PCI IDE controllers as specified in the
47"PCI IDE controller specification, revision 1.0" draft, and provides the core
48functions for the
49.Xr wd 4
50and
51.Xr atapiscsi 4
52drivers. This driver includes specific, enhanced support for the CMD Tech
53PCI0640 controller and IDE DMA/UltraDMA support for the following PCI IDE
54controllers:
55.Pp
56.Bl -item -compact -offset indent
57.It
58Acard ATP850, ATP860
59.It
60Acer Labs M5229
61.It
62Advanced Micro Devices AMD-756, AMD-766
63.It
64CMD Tech PCI0640, PCI0643, PCI0646, PCI0648, PCI0649
65.It
66Contaq Microsystems/Cypress CY82C693
67.It
68HighPoint HPT366, HPT370
69.It
70Intel PIIX, PIIX3, and PIIX4
71.It
72Intel 82801 (ICH/ICH0/ICH2)
73.It
74OPTi 82c621
75.It
76Promise PDC20246, PDC20262, PDC20265, PDC20267
77.It
78Silicon Integrated System 5513 (5597/5598)
79.It
80VIA Technologies VT82C586/A/B, VT82C596A/B, VT82C686A/B
81.El
82.Pp
83Some of these controllers are only available in multifunction PCI chips.
84.Pp
85The
86.Li 0x0001
87flag forces the
88.Nm
89driver to use DMA when there is no explicit DMA mode setting support for
90the controller but DMA is present.
91If the BIOS didn't configure the controller properly, this can
92cause a machine hang.
93.Sh SEE ALSO
94.Xr atapiscsi 4 ,
95.Xr intro 4 ,
96.Xr scsi 4 ,
97.Xr wd 4 ,
98.Xr wdc 4
99.Sh BUGS
100There's no way to know reliably if a PCI064x controller is enabled or not.
101If the driver finds a PCI064x, it will assume it is enabled unless
102.Dv PCIIDE_CMD064x_DISABLE
103is specified in the kernel config file.
104This will be a problem only if the controller has been disabled in the BIOS
105and another controller has been installed which uses the ISA legacy I/O ports
106and interrupts.
107.Pp
108The OPTi controller code is disabled by default because the driver
109does not yet work around all bugs in current chipsets.
110.Pp
111For proper operation of UltraDMA 3
112.Pq 44 MB/sec ,
1134
114.Pq 66 MB/sec ,
115or 5
116.Pq 100 MB/sec ,
117a 40-pin, 80-conductor cable must be used.
118On some controllers, the pciide driver can probe the chip and see if it
119detects that an 80-conductor or 40-conductor cable was used.
120If not, it will down-grade to UltraDMA 2 mode.
121On other controllers, no such capability exists, and the driver assumes
122you are using an 80-conductor cable.
123If you are getting errors about
124corrupted data, check to make sure you are using the correct cable.
125An 80-conductor cable is recommended for any IDE installation, not just
126ones using faster UltraDMA modes, because it will decrease electrical
127noise and increase data reliability.
128.Pp
129The AMD756 chip revision D2 has a bug affecting DMA (but not Ultra-DMA)
130modes.  The workaround documented by AMD is to not use DMA on any drive which
131does not support Ultra-DMA modes.  This does not appear to be necessary on all
132drives, the PCIIDE_AMD756_ENABLEDMA option can be used to force multiword DMA
133on the buggy revisions.  Multiword DMA can eventually be disabled on a
134per-drive basis with config flags, see
135.Xr wd 4 .
136The bug, if triggered, will cause a total system hang.
137.Pp
138The timings used for the PIO and DMA modes for controllers listed above
139are for a PCI bus running at 30 or 33 MHz.
140These timings will work on a slower bus,
141but they may cause errors on an over-clocked bus.
142