xref: /openbsd-src/share/man/man4/pciide.4 (revision 8500990981f885cbe5e6a4958549cacc238b5ae6)
1.\"	$OpenBSD: pciide.4,v 1.37 2003/07/29 18:17:17 grange 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.Pp
43.Cd "option PCIIDE_CMD064x_DISABLE"
44.Cd "option PCIIDE_CMD0646U_ENABLEUDMA"
45.Pp
46.Cd "atapiscsi* at pciide? channel ? flags 0x0000"
47.Cd "wd* at pciide? channel ? drive ? flags 0x0000"
48.Sh DESCRIPTION
49The
50.Nm
51driver supports the PCI IDE controllers as specified in the
52"PCI IDE controller specification, revision 1.0" draft, and provides the core
53functions for the
54.Xr wd 4
55and
56.Xr atapiscsi 4
57drivers.
58This driver includes specific, enhanced support for the CMD Tech
59PCI0640 controller and IDE DMA/UltraDMA support for the following PCI IDE
60controllers:
61.Pp
62.Bl -bullet -compact -offset indent
63.It
64Acard ATP850, ATP860
65.It
66Acer Labs M5229
67.It
68Advanced Micro Devices AMD-756, AMD-766
69.It
70CMD Tech PCI0640, PCI0643, PCI0646, PCI0648, PCI0649, PCI0680
71.It
72Contaq Microsystems/Cypress CY82C693
73.It
74HighPoint HPT366, HPT370, HPT372, HPT302, HPT371, HPT374
75.It
76Intel PIIX, PIIX3, and PIIX4
77.It
78Intel 82801 (ICH/ICH0/ICH2/ICH3/ICH4/ICH4-M/ICH5/ICH5R)
79.It
80National Semiconductor PC87415
81.It
82NVIDIA nForce/nForce2
83.It
84Promise PDC20246, PDC20262, PDC20265, PDC20267, PDC20268, PDC20268R,
85PDC20269, PDC20271, PDC20275, PDC20276, PDC20277
86.It
87ServerWorks OSB4, CSB5, CSB6
88.It
89Silicon Integrated System 5513 (5597/5598)
90.It
91VIA Technologies VT82C586/A/B, VT82C596A/B, VT82C686A/B, VT8231, VT8366,
92VT8233, VT8235
93.El
94.Pp
95It also supports the following Serial ATA controllers:
96.Pp
97.Bl -bullet -compact -offset indent
98.It
99Promise PDC20376 (only parallel ATA mode tested)
100.It
101Silicon Image SiI3112
102.El
103.Pp
104Some of these controllers are only available in multifunction PCI chips.
105.Pp
106The
107.Li 0x0001
108flag forces the
109.Nm
110driver to use DMA when there is no explicit DMA mode setting support for
111the controller but DMA is present.
112If the BIOS didn't configure the controller properly, this can
113cause a machine hang.
114.Sh SEE ALSO
115.Xr atapiscsi 4 ,
116.Xr intro 4 ,
117.Xr pci 4 ,
118.Xr scsi 4 ,
119.Xr wd 4 ,
120.Xr wdc 4
121.Sh BUGS
122There's no way to know reliably if a CMD064x controller is enabled or not.
123If the driver finds a PCI064x, it will assume it is enabled unless
124.Dv PCIIDE_CMD064x_DISABLE
125is specified in the kernel config file.
126This will be a problem only if the controller has been disabled in the BIOS
127and another controller has been installed which uses the ISA legacy I/O ports
128and interrupts.
129.Pp
130The CMD0646U is reportedly unable to operate properly in UDMA mode.
131UDMA will not be enabled on this controller unless
132.Dv PCIIDE_CMD0646U_ENABLEUDMA
133is specified in the kernel config file.
134.Pp
135The OPTi controller code is disabled by default because the driver
136does not yet work around all bugs in current chipsets.
137.Pp
138For proper operation of UltraDMA 3
139.Pq 44 MB/sec ,
1404
141.Pq 66 MB/sec ,
142or 5
143.Pq 100 MB/sec ,
144a 40-pin, 80-conductor cable must be used.
145On some controllers, the
146.Nm
147driver can probe the chip and see if it
148detects that an 80-conductor or 40-conductor cable was used.
149If not, it will down-grade to UltraDMA 2 mode.
150On other controllers, no such capability exists, and the driver assumes
151you are using an 80-conductor cable.
152If you are getting errors about
153corrupted data, check to make sure you are using the correct cable.
154An 80-conductor cable is recommended for any IDE installation, not just
155ones using faster UltraDMA modes, because it will decrease electrical
156noise and increase data reliability.
157.Pp
158The AMD756 chip revision D2 has a bug affecting DMA (but not Ultra-DMA)
159modes.
160The workaround documented by AMD is to not use DMA on any drive which
161does not support Ultra-DMA modes.
162This does not appear to be necessary on all drives, the
163PCIIDE_AMD756_ENABLEDMA option can be used to force multiword DMA
164on the buggy revisions.
165Multiword DMA can eventually be disabled on a per-drive basis with config
166flags, see
167.Xr wd 4 .
168The bug, if triggered, will cause a total system hang.
169.Pp
170The timings used for the PIO and DMA modes for controllers listed above
171are for a PCI bus running at 30 or 33 MHz.
172These timings will work on a slower bus,
173but they may cause errors on an over-clocked bus.
174