xref: /openbsd-src/share/man/man4/pciide.4 (revision 2b0358df1d88d06ef4139321dd05bd5e05d91eaf)
1.\"	$OpenBSD: pciide.4,v 1.81 2008/09/17 06:26:13 brad 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 $Mdocdate: September 17 2008 $
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? flags 0x0000"
42.Cd "pciide* at jmb? flags 0x0000"
43.Pp
44.Cd "option PCIIDE_AMD756_ENABLEDMA"
45.Cd "option PCIIDE_CMD064x_DISABLE"
46.Cd "option PCIIDE_CMD0646U_ENABLEUDMA"
47.Pp
48.Cd "atapiscsi* at pciide? flags 0x0000"
49.Cd "wd* at pciide? flags 0x0000"
50.Sh DESCRIPTION
51The
52.Nm
53driver supports the PCI IDE controllers as specified in the
54"PCI IDE controller specification, revision 1.0" draft, as well as the
55Serial ATA controllers working either in parallel ATA compatibility mode or
56in native serial mode.
57It provides the core functions for the
58.Xr wd 4
59and
60.Xr atapiscsi 4
61drivers.
62This driver includes specific, enhanced support for the CMD Tech
63PCI0640 controller and IDE DMA/UltraDMA support for the following PCI IDE
64controllers:
65.Pp
66.Bl -bullet -compact -offset indent
67.It
68Acard ATP850U, ATP860, ATP860-A, ATP865-A, ATP865-R
69.It
70Acer Labs M5229
71.It
72Adaptec AAR-1210SA
73.It
74Advanced Micro Devices AMD-756, AMD-766, AMD-768, AMD-8111
75.It
76ATI SB200, SB300, SB400, SB600, SB700 (IDE only)
77.It
78CMD Tech PCI0640, PCI0643, PCI0646, PCI0648, PCI0649, PCI0680
79.It
80Contaq Microsystems/Cypress CY82C693
81.It
82HighPoint HPT366, HPT370, HPT372, HPT302, HPT371, HPT374
83.It
84Intel PIIX, PIIX3, and PIIX4
85.It
86Intel 82801
87(ICH/ICH0/ICH2/ICH3/ICH4/ICH4-M/ICH5/ICH5R/\&
88ICH6/ICH6M/ICH6R/ICH7/ICH7M/ICH7R/ICH7M DH/ICH8/ICH8M/\&
89ICH9/ICH9M)
90.It
91Intel 6300ESB/6321ESB
92.It
93ITE IT8211F, IT8212F
94.It
95JMicron JMB361/3/5/6/8
96.It
97National Semiconductor PC87415
98.It
99National Semiconductor SCx200 (found on SC1100 SoC)
100.It
101NVIDIA nForce/nForce2/nForce2-400/nForce3/nForce3-250/nForce4,
102MCP04/MCP51/MCP55/MCP61/MCP65/MCP67/MCP73/MCP77
103.It
104Promise PDC20246, PDC20262, PDC20265, PDC20267, PDC20268, PDC20268R,
105PDC20269, PDC20271, PDC20275, PDC20276, PDC20277, PDC20318, PDC20319,
106PDC20371, PDC20375, PDC20376, PDC20377, PDC20378, PDC20379, PDC20571,
107PDC20575, PDC20579, PDC20771, PDC20775, PDC40518, PDC40519, PDC40718,
108PDC40719, PDC40779
109.It
110ServerWorks SATA, OSB4, CSB5, CSB6 (including support for the third channel)
111.It
112Silicon Image SiI3112, SiI3512, SiI3114
113.It
114Silicon Integrated System 180, 181, 5513 (5597/5598), 540, 550,
115620, 630, 630S, 633, 635, 640, 645, 645DX, 648, 650, 651, 652, 655, 658, 661,
116730, 733, 735, 740, 745, 746, 748, 750, 751, 752, 755, 760, 962, 963
117.It
118VIA Technologies CX700, VT82C586/A/B, VT82C596A/B, VT82C686A/B, VT8231, VT8366,
119VT8233, VT8235, VT8237, VT8237A/S, VT8251, VT6410, VX700
120.El
121.Pp
122Some of these controllers are only available in multifunction PCI chips.
123.Pp
124The
125.Li 0x0001
126flag forces the
127.Nm
128driver to use DMA when there is no explicit DMA mode setting support for
129the controller but DMA is present.
130If the BIOS didn't configure the controller properly, this can
131cause a machine hang.
132.Sh SEE ALSO
133.Xr atapiscsi 4 ,
134.Xr intro 4 ,
135.Xr jmb 4 ,
136.Xr pci 4 ,
137.Xr scsi 4 ,
138.Xr wd 4 ,
139.Xr wdc 4
140.Sh BUGS
141There's no way to know reliably if a CMD064x controller is enabled or not.
142If the driver finds a PCI064x, it will assume it is enabled unless
143.Dv PCIIDE_CMD064x_DISABLE
144is specified in the kernel config file.
145This will be a problem only if the controller has been disabled in the BIOS
146and another controller has been installed which uses the ISA legacy I/O ports
147and interrupts.
148.Pp
149The CMD0646U is reportedly unable to operate properly in UltraDMA mode.
150UltraDMA will not be enabled on this controller unless
151.Dv PCIIDE_CMD0646U_ENABLEUDMA
152is specified in the kernel config file.
153.Pp
154For proper operation of UltraDMA 3 and higher modes
155a 40-pin, 80-conductor cable must be used.
156On some controllers, the
157.Nm
158driver can probe the chip and see if it
159detects that an 80-conductor or 40-conductor cable was used.
160If not, it will down-grade to UltraDMA 2 mode.
161On other controllers, no such capability exists, and the driver assumes
162you are using an 80-conductor cable.
163If you are getting errors about
164corrupted data, check to make sure you are using the correct cable.
165An 80-conductor cable is recommended for any IDE installation, not just
166ones using faster UltraDMA modes, because it will decrease electrical
167noise and increase data reliability.
168.Pp
169The AMD756 chip revision D2 has a bug affecting DMA (but not Ultra-DMA)
170modes.
171The workaround documented by AMD is to not use DMA on any drive which
172does not support Ultra-DMA modes.
173This does not appear to be necessary on all drives, the
174PCIIDE_AMD756_ENABLEDMA option can be used to force multiword DMA
175on the buggy revisions.
176Multiword DMA can eventually be disabled on a per-drive basis with config
177flags, see
178.Xr wd 4 .
179The bug, if triggered, will cause a total system hang.
180.Pp
181The timings used for the PIO and DMA modes for controllers listed above
182are for a PCI bus running at 30 or 33 MHz.
183These timings will work on a slower bus,
184but they may cause errors on an over-clocked bus.
185