Date: Sun, 3 Feb 2002 22:03:35 -0600 From: Hal Peterson <hrp@alum.mit.edu> To: freebsd-questions@freebsd.org, freebsd-scsi@freebsd.org Subject: Microtech CameraMate has two LUNs. Now what? Message-ID: <15454.2071.788157.885858@localhost.pinemarten.org.pri>
next in thread | raw e-mail | index | archive | help
Hoping for help getting a USB interface to SmartMedia working. I get
ENXIO when I try to mount the SmartMedia as a filesystem.
Here are the gory details.
I have a kernel built from fresh RELENG_4 sources:
FreeBSD melchett.pinemarten.org.pri 4.5-STABLE FreeBSD 4.5-STABLE #1: Sun Feb 3 16:35:37 CST 2002 hrp@melchett.pinemarten.org.pri:/usr/src/sys/compile/MELCHETT i386
I made a cvsup copy of the source tree yesterday, so it's quite
recent.
The first problem was to recognize the CameraMate as a umass device.
That took a patch to umass_match_proto (stolen from the freebsd-scsi
archive), so:
================================================================
--- umass.c.bak Sun Feb 3 16:31:27 2002
+++ umass.c Sun Feb 3 16:35:26 2002
@@ -629,6 +629,15 @@ umass_match_proto(struct umass_softc *sc
return(UMATCH_VENDOR_PRODUCT);
}
+ if (UGETW(dd->idVendor) == USB_VENDOR_MICROTECH
+ && UGETW(dd->idProduct) == USB_PRODUCT_MICROTECH_DPCM) {
+ /* the cameramate does not provide valid
+ class/subclass information. fake it. */
+ sc->proto = PROTO_SCSI | PROTO_CBI;
+ sc->quirks |= NO_TEST_UNIT_READY | NO_START_STOP;
+ return(UMATCH_VENDOR_PRODUCT);
+ }
+
id = usbd_get_interface_descriptor(iface);
if (id == NULL || id->bInterfaceClass != UCLASS_MASS)
return(UMATCH_NONE);
================================================================
When I boot with the CameraMate attached, the right things appear to
happen:
uhci0: <Intel 82371AB/EB (PIIX4) USB controller> port 0x1080-0x109f irq 9 at device 7.2 on pci0
usb0: <Intel 82371AB/EB (PIIX4) USB controller> on uhci0
usb0: USB revision 1.0
uhub0: Intel UHCI root hub, class 9/0, rev 1.00/1.00, addr 1
uhub0: 2 ports with 2 removable, self powered
umass0: Microtech International, Inc DPCM-USB, rev 1.00/1.00, addr 2
uhid0: WACOM ET-0405-UV1.1-1, rev 1.00/1.11, addr 3, iclass 3/1
That agrees with usbdevs -v:
Controller /dev/usb0:
addr 1: self powered, config 1, UHCI root hub(0x0000), Intel(0x0000), rev 0x0100
port 1 addr 2: power 100 mA, config 1, DPCM-USB(0x0006), Microtech International, Inc(0x07af), rev 0x0100
port 2 addr 3: low speed, power 40 mA, config 1, ET-0405-UV1.1-1(0x0010), WACOM(0x056a), rev 0x0111
and camcontrol devlist agrees:
<eUSB Compact Flash \0001> at scbus0 target 0 lun 0 (pass0,da0)
Trouble appears when I try "mount -t msdos /dev/da0 /mnt":
msdos: /dev/da0: Device not configured
the console bleats:
(da0:umass-sim0:0:0:0): READ CAPACITY. CDB: 25 0 0 0 0 0 0 0 0 0
(da0:umass-sim0:0:0:0): NOT READY asc:3a,0
(da0:umass-sim0:0:0:0): Medium not present
That is not true; I have an 8MB SmartMedia card plugged in.
================================================================
Here's what I think is going on. When I plug the CameraMate into a
box running W2K, it shows up as *two* drives: the first one for the
CompactFlash slot on the CameraMate, the second for the SmartMedia
slot. When I read the drive properties with W2K, it tells me that the
CompactFlash is (ScsiPort 2 Target 0 Lun 0), and that the SmartMedia
is (ScsiPort 2 Target 0 Lun 1).
Can it be that the umass driver is only reporting the first LUN, so
the SmartMedia slot is invisible? If so, what do I do to fix it? Do
I need to hack umass_bbb_get_max_lun?
--
Hal Peterson Bloomington, MN, USA
To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-scsi" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?15454.2071.788157.885858>
