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