1.\"	$NetBSD: viaide.4,v 1.12 2025/04/21 20:37:48 andvar Exp $
2.\"
3.\" Copyright (c) 2003 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.\"
14.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
15.\" IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
16.\" OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
17.\" IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
18.\" INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
19.\" NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
20.\" DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
21.\" THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
22.\" INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
23.\" THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
24.\"
25.Dd April 21, 2025
26.Dt VIAIDE 4
27.Os
28.Sh NAME
29.Nm viaide
30.Nd AMD, NVIDIA and VIA IDE disk controllers driver
31.Sh SYNOPSIS
32.Cd "viaide* at pci? dev ? function ? flags 0x0000"
33.Cd "options PCIIDE_AMD756_ENABLEDMA"
34.Sh DESCRIPTION
35The
36.Nm
37driver supports the following IDE controllers
38and provides the interface with the hardware for the
39.Ic ata
40driver:
41.Bl -dash -compact -offset indent
42.It
43Advanced Micro Devices AMD-756, 766, 768 and CS5536 IDE Controllers
44.It
45NVIDIA nForce, nForce2, nForce2 400, nForce3, nForce3 250,
46nForce4, MCP04, MCP55, MCP61, MCP65, MCP67 IDE and SATA Controllers.
47.It
48VIA Technologies VT82C586, VT82C586A, VT82C596A, VT82C686A, VT8233A,
49VT8235, VT8237/VT8237R/VT6420, VT8237A, VT8237S, VT8251, VT8261, CX700(M/M2),
50VX700, VX800/820, VX855/875, VX900/VX11 Integrated IDE and SATA Controllers,
51VT6415/VT6330 single-channel IDE Controllers, VT6410 IDE RAID Controller, and
52VT6421 SATA RAID & IDE Controller.
53.El
54.Pp
55The 0x0002 flag forces the
56.Nm
57driver to disable DMA on chipsets for which DMA would normally be
58enabled.
59This can be used as a debugging aid, or to work around
60problems where the IDE controller is wired up to the system incorrectly.
61.Sh SEE ALSO
62.Xr ata 4 ,
63.Xr atapi 4 ,
64.Xr intro 4 ,
65.Xr pci 4 ,
66.Xr pciide 4 ,
67.Xr wd 4 ,
68.Xr wdc 4
69.Sh BUGS
70The AMD756 chip revision D2 has a bug affecting DMA (but not Ultra-DMA)
71modes.
72The workaround documented by AMD is to not use DMA on any drive which
73does not support Ultra-DMA modes.
74This does not appear to be necessary on all drives, the
75PCIIDE_AMD756_ENABLEDMA option can be used to force multiword DMA
76on the buggy revisions.
77Multiword DMA can eventually be disabled on a
78per-drive basis with config flags, see
79.Xr wd 4 .
80The bug, if triggered, will cause a total system hang.
81.Pp
82The timings used for the PIO and DMA modes for controllers listed above
83are for a PCI bus running at 30 or 33 MHz.
84This driver may not work properly on overclocked systems.
85