Subject: Re: Sun Disc ID's
To: Steve Doyle <paiste@zen.spodnet.uk.com>
From: Simon Raahauge DeSantis <xiamin@ghostpriest.gay-robot.com>
List: port-sparc
Date: 03/13/2001 10:16:30
On Tue, Mar 13, 2001 at 12:34:23PM +0000, Steve Doyle wrote:
> 
> Built a new kernel last night, been running on generic for ages. One of
> the things I always do - is put the disk scsi id's back into the sun
> format of id3 to id0 etc.
> 
> Ie:
> sd0     at scsibus? target 3 lun ?              # first SCSI disk
> sd1     at scsibus? target 1 lun ?              # second SCSI disk
> sd2     at scsibus? target 2 lun ?              # third SCSI disk
> sd3     at scsibus? target 0 lun ?              # fourth SCSI disk
> 
> Anyway, I was wondering why this is not done by default on the sparc 
> kernel, or at least offered or be easily available.  I cant be the only
> NetBSD sparc user who removes the dynamic allocation, it just makes no
> sense to me whatsoever .
> 

Removing the dynamic allocation and wiring ID 3 to sd0 and ID 0 to sd3 are
two not very related issues. (Yes, you have to hardwire the ID->sd mapping
to do the latter, but the former can be done and still preserve a normal
ordering). Did you check the checksums of your tar-balls? My 1.5 kernel set
has a config file called GENERIC_SCSI3.

As for why this is not done by default, remember that NetBSD is a
multi-platform OS. If the sd device numbering suddenly changed just because
you switched hardware platforms, it'd be a bit of a headache. And why should
we in the year 2001 be held hostage to a kludge that's only really
interesting if you're migrating from a Sun3 SunOS system? (Or having to work
around it on a perfectly good otherwise Sun4 box that's got it in the PROM
and in the kernel (SunOS 4.1.4 does what you want by default))

And I like dynamic ordering ;). If I have two disks, one is sd0 and the
other is sd1. Dead simple. If I add another device I should be aware of the
ids on my bus anyway (Yes, I have been a moron and plugged in a drive that's
ID 0 when I was booting off a drive that's ID 1, but it's not hard to avoid.
Fiddling with a disk should be done in single user mode most of the time
anyway). If I have a drive at ID 4 and a cdrom at ID 3 (not possible with
the generic SunOS 4.1.4 kernel I believe, as cdrom's are wired to be at 5 or
something) I have cd0 and sd0. This is not to mention that every other
device (to my knowledge) behaves in this manner: the 'first' one is 0, the
'next' is 1 and so on, why should SCSI be any different?
-- 
-Simon Raahauge DeSantis