Subject: Re: NetBSD 1.1 SCSI bug?
To: None <amiga@NetBSD.ORG>
From: None <is@Beverly.Rhein.DE>
List: amiga
Date: 01/28/1996 16:11:42
Feico Dillema ( wrote:

:  With 1.1 one of my SCSI disks, an old seagate, goes berserk. Apparently
:  1.1 adds LUN support for SCSI-devices, and this disk responds to any LUN
:  at bootup-time. The problem is it consumes quite some devicenames pushing
:  `later' disks ahead (it occupies sd1, sd2, sd3, ..., sd8) `messing' up my
:  fstab. I guess I can fix this problem by building a new kernel, with an

workaround, to get started, would be to boot an old kernel, at least to
single user mode, fsck / and /usr, mount / and /usr, vi /etc/fstab and
putting in sd9 instead of sd2 where appropriate ;-)

:  appropriate CONFIG file. But still I guess it's a bug in NetBSD 1.1 
:  (at least partly, because the drive shouldn't respond more than once either
:  while NetBSD should ask for it more than once). 
:  Note that the drive has the `LAST LUN' field set...

Which is not checked by NetBSD. The RDB is just used as partition table,
and at that point of probing, all SCSI id's and LUNS are probed. At the
point they're probed, it is not even known yet they're disks, so
the RDB can't be checked... well, not without some state juggling.

:  I would like to use this disk *before* build a new kernel, so if there's a
:  way of solving this beforehand, please tell me.

see above, it might work. you'll want to mount /usr read-only, to be
sure not to mess up anything.

Anyway, the _disk_ is broken. Fortunately, generic NetBSD scsi code has
a table of bad scsi devices, and you can build another entry for it.

Once you know the exact identification of your disks, (you see it when
booting), create a new entry in /usr/src/sys/scsi/scsiconf.c, in the

struct scsi_quirk_inquiry_pattern scsi_quirk_patterns[] = {

looking like this:

	 "SEAGATE ", "ST157N          ", "",     SDEV_NOLUNS},

only replace the model name with your one, and be sure not to change the
total number of characters in that field.

Then, recompile the kernel, and there you are.

Hm, if you tell us your model number, somebody should be able to make a
kernel for you with this change and send it to you.

	Ignatios Souvatzis