Subject: USB SmartMedia support?
To: None <tech-kern@netbsd.org>
From: Hubert Feyrer <hubert.feyrer@informatik.fh-regensburg.de>
List: tech-kern
Date: 10/11/2001 02:44:45
I have a SmartMedia reader built into a Toshiba Satellite
3000. Internally, this is wired to the USB bus. Booting a -current kernel,
this gives me: 

	umass0 at uhub1 port 1 configuration 1 interface 0
	umass0: STMicroelectronics ST92163 Mass Storage : SMC only, rev 1.10/1.01, addr 2
	umass0: using SCSI over BBB-P
	scsibus0 at umass0: 2 targets, 1 luns per target
	scsibus0: waiting 2 seconds for devices to settle...
	sd0 at scsibus0 target 1 lun 0: <STM(CMG), Flash R/W Demo, 0.92> SCSI2 0/direct removable 
	sd0: could not mode sense (4/5); using fictitious geometry
	sd0(umass0:0:1:0):  Check Condition on CDB: 0x25 00 00 00 00 00 00 00 00 00
	    SENSE KEY:  Not Ready
	     ASC/ASCQ:  Medium Not Present

	sd0(umass0:0:1:0): could not get size
	sd0: 0, 0 cyl, 64 head, 32 sec, 512 bytes/sect x 0 sectors
	sd0(umass0:0:1:0):  Check Condition on CDB: 0x1e 00 00 00 01 00
	    SENSE KEY:  Not Ready
	     ASC/ASCQ:  Medium Not Present

The "Medium Not Present" is there when booting both with and without media
inserted at boot time. When booting a medium later, or removing, this is
not recognized by the kernel. I tried doing a "scsictl /dev/scsibus0 scan
any any", but that didn't help either. 

The "sd0: could not mode sense (4/5); using fictitious geometry" message
led me to add the following quirk to /sys/dev/scsipi/scsiconf.c:

        {{T_DIRECT, T_REMOV, 
         "STM(CMG)", "Flash R/W Demo", "0.92"},   PQUIRK_NOMODESENSE}, /*HF*/

This only led to the "sd0: cound not mode sense ..." message being no
longer printed, the rest is the same. 

What else can I try?


 - Hubert

-- 
Want to get a clue on IPv6 but don't know where to start? Try this:
* Basics -> http://www.onlamp.com/pub/a/onlamp/2001/05/24/ipv6_tutorial.html
* Setup  -> http://www.onlamp.com/pub/a/onlamp/2001/06/01/ipv6_tutorial.html 
Of course with your #1 IPv6 ready operating system -> http://www.NetBSD.org/