2004-08-30 16:54:39 +04:00
|
|
|
.\" $NetBSD: wd.4,v 1.14 2004/08/30 12:54:39 wiz Exp $
|
1998-01-09 11:03:16 +03:00
|
|
|
.\"
|
1994-12-14 04:11:40 +03:00
|
|
|
.\"
|
|
|
|
.\" Copyright (c) 1994 James A. Jegers
|
|
|
|
.\" All rights reserved.
|
|
|
|
.\"
|
|
|
|
.\" 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. The name of the author may not be used to endorse or promote products
|
|
|
|
.\" derived from this software without specific prior written permission
|
2001-06-05 16:20:57 +04:00
|
|
|
.\"
|
1994-12-14 04:11:40 +03:00
|
|
|
.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``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 AUTHOR 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.
|
|
|
|
.\"
|
2004-08-30 16:54:39 +04:00
|
|
|
.Dd August 30, 2004
|
2001-06-05 16:20:57 +04:00
|
|
|
.Dt WD 4
|
1999-03-16 04:19:14 +03:00
|
|
|
.Os
|
1994-12-14 04:11:40 +03:00
|
|
|
.Sh NAME
|
2001-06-05 16:20:57 +04:00
|
|
|
.Nm wd
|
1994-12-14 04:11:40 +03:00
|
|
|
.Nd WD100x compatible hard disk driver
|
|
|
|
.Sh SYNOPSIS
|
2003-10-08 15:20:09 +04:00
|
|
|
.Cd "wd* at atabus? drive ? flags 0x0000"
|
2001-12-24 16:53:27 +03:00
|
|
|
.Cd "wd* at umass?"
|
2004-08-30 13:43:32 +04:00
|
|
|
.Cd options WD_SOFTBADSECT
|
1994-12-14 04:11:40 +03:00
|
|
|
.Sh DESCRIPTION
|
|
|
|
The
|
2001-06-05 16:20:57 +04:00
|
|
|
.Nm wd
|
2003-11-03 12:56:37 +03:00
|
|
|
driver supports hard disks that emulate the Western
|
|
|
|
Digital WD100x.
|
|
|
|
This includes standard MFM, RLL, ESDI, IDE, and EIDE drives.
|
1998-12-02 14:05:59 +03:00
|
|
|
.Pp
|
1999-04-25 04:00:05 +04:00
|
|
|
The flags are used only with controllers that support DMA operations and
|
|
|
|
mode settings (like some pciide controllers).
|
2003-11-03 12:56:37 +03:00
|
|
|
The lowest order nibble (rightmost digit) of the flags defines the PIO mode,
|
|
|
|
the next four bits define the DMA mode and the third nibble defines the
|
1999-04-25 04:00:05 +04:00
|
|
|
UltraDMA mode.
|
|
|
|
For each set of four bits, the 3 lower bits define the mode to use
|
|
|
|
and the last bit must be set to 1 for this setting to be used.
|
|
|
|
For DMA and UDMA, 0xf (1111) means 'disable'.
|
2001-06-05 16:20:57 +04:00
|
|
|
For example, a flags value of 0x0fac (1111 1010 1100)
|
1999-04-25 04:00:05 +04:00
|
|
|
means 'use PIO mode 4, DMA mode 2, disable UltraDMA'.
|
2003-11-03 12:56:37 +03:00
|
|
|
0x0000 means "use whatever the drive claims to support."
|
2004-08-30 13:43:32 +04:00
|
|
|
.Pp
|
|
|
|
The kernel configuration option
|
|
|
|
.Dq Cd options WD_SOFTBADSECT
|
|
|
|
enables a software managed bad-sector list which will prevent further accesses
|
|
|
|
to sectors where an unrecoverable read error occured.
|
|
|
|
A user interface is provided by
|
|
|
|
.Xr dkctl 8 .
|
|
|
|
Unlike the (historical) mechanisms provided by
|
|
|
|
.Xr bad144 8
|
|
|
|
and
|
|
|
|
.Xr badsect 8
|
|
|
|
the software list does neither support sector replacement nor is it saved
|
|
|
|
across reboots.
|
1994-12-14 04:11:40 +03:00
|
|
|
.Sh SEE ALSO
|
2003-10-15 12:38:10 +04:00
|
|
|
.Xr ata 4 ,
|
1999-12-12 02:10:15 +03:00
|
|
|
.Xr intro 4 ,
|
|
|
|
.Xr pciide 4 ,
|
|
|
|
.Xr scsi 4 ,
|
2001-12-24 16:53:27 +03:00
|
|
|
.Xr umass 4 ,
|
2002-05-28 08:10:17 +04:00
|
|
|
.Xr wdc 4 ,
|
2004-08-30 13:43:32 +04:00
|
|
|
.Xr atactl 8 ,
|
|
|
|
.Xr dkctl 8
|
2004-08-30 16:54:39 +04:00
|
|
|
.Sh BUGS
|
|
|
|
The optional software bad sector list does not interoperate well with
|
|
|
|
sector remapping features of modern disks.
|
|
|
|
To let the disk remap a sector internally, the software bad sector list
|
|
|
|
must be flushed or disabled before.
|