1 .\" $NetBSD: wd.4,v 1.14 2004/08/30 12:54:39 wiz Exp $
4 .\" Copyright (c) 1994 James A. Jegers
5 .\" All rights reserved.
7 .\" Redistribution and use in source and binary forms, with or without
8 .\" modification, are permitted provided that the following conditions
10 .\" 1. Redistributions of source code must retain the above copyright
11 .\" notice, this list of conditions and the following disclaimer.
12 .\" 2. The name of the author may not be used to endorse or promote products
13 .\" derived from this software without specific prior written permission
15 .\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
16 .\" IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
17 .\" OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
18 .\" IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
19 .\" INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
20 .\" NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
21 .\" DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
22 .\" THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
23 .\" (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
24 .\" THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
31 .Nd WD100x compatible hard disk driver
33 .Cd "wd* at atabus? drive ? flags 0x0000"
35 .Cd options WD_SOFTBADSECT
39 driver supports hard disks that emulate the Western
41 This includes standard MFM, RLL, ESDI, IDE, and EIDE drives.
43 The flags are used only with controllers that support DMA operations and
44 mode settings (like some pciide controllers).
45 The lowest order nibble (rightmost digit) of the flags defines the PIO mode,
46 the next four bits define the DMA mode and the third nibble defines the
48 For each set of four bits, the 3 lower bits define the mode to use
49 and the last bit must be set to 1 for this setting to be used.
50 For DMA and UDMA, 0xf (1111) means 'disable'.
51 For example, a flags value of 0x0fac (1111 1010 1100)
52 means 'use PIO mode 4, DMA mode 2, disable UltraDMA'.
53 0x0000 means "use whatever the drive claims to support."
55 The kernel configuration option
56 .Dq Cd options WD_SOFTBADSECT
57 enables a software managed bad-sector list which will prevent further accesses
58 to sectors where an unrecoverable read error occurred.
59 A user interface is provided by
61 Unlike the (historical) mechanisms provided by
65 the software list does neither support sector replacement nor is it saved
77 The optional software bad sector list does not interoperate well with
78 sector remapping features of modern disks.
79 To let the disk remap a sector internally, the software bad sector list
80 must be flushed or disabled before.