Subject: Re: faking disk geometry
To: None <tech-kern@NetBSD.ORG>
From: Valeriy E. Ushakov <uwe@ptc.spbu.ru>
List: tech-kern
Date: 04/19/2003 00:31:44
On Fri, Apr 18, 2003 at 16:24:33 -0400, Allen Briggs wrote:

> > sd0: 124 MB, 678400 cyl, 4 head, 0 sec, 512 bytes/sect x 253952 sectors
> > sd1: 0, 678432 cyl, 4 head, 0 sec, 512 bytes/sect x 0 sectors
> 
> Is that because it's (falsely) reporting multiple LUNs?  If so, wouldn't
> it be better to just quirk it?

No.  That's already with FORCELUNS quirk and CF (sd0) inserted.  It
seems to correctly report size in sectors, but mode sense is
completely junk.  With my patch it correctly attaches as:

umass0 at uhub0 port 1 configuration 1 interface 0
umass0: MCRW USB Multi-Card Reader, rev 1.10/0.12, addr 2
umass0: using SCSI over Bulk-Only
scsibus0 at umass0: 2 targets, 4 luns per target
scsibus0: waiting 2 seconds for devices to settle...
sd0 at scsibus0 target 1 lun 0: <MCRW, CRW600        CF, 2.1D> disk removable
sd0: 124 MB, 124 cyl, 64 head, 32 sec, 512 bytes/sect x 253952 sectors
sd1 at scsibus0 target 1 lun 1: <MCRW, CRW600        MS, 2.1D> disk removable
sd1: drive offline
sd2 at scsibus0 target 1 lun 2: <MCRW, CRW600    MMC/SD, 2.1D> disk removable
sd2: drive offline
sd3 at scsibus0 target 1 lun 3: <MCRW, CRW600        SM, 2.1D> disk removable
sd3: drive offline

SY, Uwe
-- 
uwe@ptc.spbu.ru                         |       Zu Grunde kommen
http://www.ptc.spbu.ru/~uwe/            |       Ist zu Grunde gehen