Subject: SanDisk USB CompactFlash reader kills my mouse!
To: None <PORT-MACPPC@NETBSD.ORG>
From: Roger Ivie <IVIE@cc.usu.edu>
List: port-macppc
Date: 08/09/2001 15:52:53
If I have a module in my SanDisk ImageMate II USB CompactFlash reader at
boot up, the USB gets an error probing the reader and stops probing the
bus. As a result, it misses my USB mouse, causing the X server to not
start because the mouse is not configured. Anyone seen this and have
a solution?

Here's an example where it worked (I didn't have a cartridge in the
CompactFlash reader):

>  umass0 at uhub0 port 1 configuration 1 interface 0
>  umass0: SanDisk Corporation ImageMate CompactFlash USB, rev 1.10/0.09, addr 2
>  umass0: using SCSI over BBB-P
>  scsibus1 at umass0: 2 targets, 1 luns per target
>  scsibus1: waiting 2 seconds for devices to settle...
>  sd1 at scsibus1 target 1 lun 0: <SanDisk, ImageMate II, 1.30> SCSI2 0/direct 
>  removable
>  sd1: drive offline
>  ums0 at uhub0 port 2 configuration 1 interface 0
>  ums0: NOVATEK        USB Mouse STD.  , rev 1.00/1.00, addr 3, iclass 3/1
>  ums0: 3 buttons
>  wsmouse0 at ums0
>  boot device: sd0

Here's an example where it didn't work (I booted with a cartridge in the
reader):

>  umass0 at uhub0 port 1 configuration 1 interface 0
>  SanDisk Corporation ImageMate CompactFlash USB, rev 1.10/0.09, addr 2
>  umass0: using SCSI over BBB-P
>  scsibus1 at umass0: 2 targets, 1 luns per target
>  scsibus1: waiting 2 seconds for devices to settle...
>  sd1 at scsibus1 target 1 lun 0: <SanDisk, ImageMate II, 1.30> SCSI2 0/direct 
>  removable
>  sd1: mode sense (4) returned nonsense; using fictitious geometry
>  sd1: 7840 KB, 7 cyl, 64 head, 32 sec, 512 bytes/sect x 15681 sectors
>  boot device: sd0

As you can see, the kernel seems to have skipped the probe of the mouse.

I'm having other problems with the SanDisk as well. The camera stores the 
images in a DOS partition. I can't get the system to mount the dos
partition. The camera came with an 8MB cartridge:

> # disklabel sd1
> # /dev/rsd1c:
> type: SCSI
> disk: ImageMate II
> label: fictitious
> flags:
> bytes/sector: 512
> sectors/track: 32
> tracks/cylinder: 64
> sectors/cylinder: 2048
> cylinders: 7
> total sectors: 15681
> rpm: 3600
> interleave: 1
> trackskew: 0
> cylinderskew: 0
> headswitch: 0           # microseconds
> track-to-track seek: 0  # microseconds
> drivedata: 0
> 
> 3 partitions:
> #        size   offset     fstype   [fsize bsize cpg/sgs]
>   a:    15615        1      MSDOS                        # (Cyl.    0*- 7*)
>   c:    15681        0     unused        0     0         # (Cyl.    0 - 7*)
> disklabel: boot block size 0
> disklabel: super block size 0
> # mount -t msdos /dev/sd1a /mnt
> mount_msdos: /dev/sd1a on /mnt: Operation not supported by device
> #

I can dd partition c to a file, but if I do it to partition a the machine
hangs (presumably when it gets to the end). I just tried using the raw
device, specifying a bs of 512 bytes, and the a count 15615 (the size of
the a partition) and it worked fine. Dumping that copy into a ramdisk and
attempting to mount -t msdos it also gives me "Operation not supported by
device", so I'm beginning to suspect the MSDOS filesystem only supports
floppies. Anybody used one of these things before?

Roger Ivie
ivie@cc.usu.edu