Subject: Re: wd.c does not set lp->d_type?
To: Matthias Drochner <M.Drochner@fz-juelich.de>
From: Leo Weppelman <leo@wau.mis.ah.nl>
List: tech-kern
Date: 11/08/1999 13:08:17
On Fri, Nov 05, 1999 at 06:14:50PM +0100, Matthias Drochner wrote:
> 
> leo@wau.mis.ah.nl said:
> > Does anybody know what the rationale is behind _not_ setting the
> > d_type field of the disklabel for a wd-type disk? The code to do this
> > is enclosed in an '#if 0'. 
> 
> I remember having messed with this a while ago...
> The d_type field doesn't have a definition for IDE yet.
> (ESDI might be close, but not the same.)
> 
> The d_type numbers in <sys/disklabel.h> of different vendors
> are diverging. 1-6 and 10 seem to be agreed on on the
> platforms I checked (Net/FreeBSD, DEC). 7/8/11 are equal
> between the BSDs. DEC has assigned the 9 to "DTYPE_IDE",
> it is free in both Net/FreeBSD. If there is no authority,
> perhaps we should add a similar definition.

I don't really care as long as I can make a distinction between SCSI and wd
type disks ;-)

> > Currently this info is extracted from the d_type field
> > in the disklabel. For wd-type disks, this is now 'unknown' - something the
> > installboot program does not really understand. For SCSI disks it still is
> > 'SCSI'....
> 
> The i386 bootloader does a similar check (in some pre-1.3 kernel
> compatibility code - see i386/stand/lib/exec.c). Here only SCSI
> is checked for - everything else is treated as "wd".

So it is lucky... I have to decide between floppy, SCSI and wd. It looks a
bit wrong to make the 'unknown' to wd mapping. It took me so long to notice
the problem because you will only see it when handling an 'NetBSD clean' wd
drive :-(

> > If there are no objections, I'd like to re-enable this piece of code.
> 
> Only the lp->d_type part, please. The lp->d_typename is set below
> to the model name read from the disk.

Agreed. I will do so later this week.

Leo.