summaryrefslogtreecommitdiff
path: root/sys/dev/usb
diff options
context:
space:
mode:
authorFederico G. Schwindt <fgsch@cvs.openbsd.org>2005-12-31 04:55:53 +0000
committerFederico G. Schwindt <fgsch@cvs.openbsd.org>2005-12-31 04:55:53 +0000
commit5addb2e49bee0da856d5e7766b7e33c8261a1cd6 (patch)
treeb03f0871459c20c61e72413e6ec5407b88fe7c83 /sys/dev/usb
parent609c8a584c1665b2d39c911a8a204305428fd7c9 (diff)
The Sony DSC-P41 it's actually UFI, not SCSI. Unfortunately (all?) DSC
cameras share the same product id, so toggle this behavior for revision 5.00 only for now. krw@ agrees.
Diffstat (limited to 'sys/dev/usb')
-rw-r--r--sys/dev/usb/umass_quirks.c16
1 files changed, 13 insertions, 3 deletions
diff --git a/sys/dev/usb/umass_quirks.c b/sys/dev/usb/umass_quirks.c
index 2059bfd6b6b..b383c56c0d6 100644
--- a/sys/dev/usb/umass_quirks.c
+++ b/sys/dev/usb/umass_quirks.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: umass_quirks.c,v 1.21 2005/12/18 12:34:43 kettenis Exp $ */
+/* $OpenBSD: umass_quirks.c,v 1.22 2005/12/31 04:55:52 fgsch Exp $ */
/* $NetBSD: umass_quirks.c,v 1.67 2004/06/28 07:49:16 mycroft Exp $ */
/*
@@ -514,10 +514,20 @@ Static void
umass_fixup_sony(struct umass_softc *sc)
{
usb_interface_descriptor_t *id;
+ usb_device_descriptor_t *dd;
id = usbd_get_interface_descriptor(sc->sc_iface);
- if (id->bInterfaceSubClass == 0xff)
- sc->sc_cmd = UMASS_CPROTO_SCSI;
+ if (id->bInterfaceSubClass == 0xff) {
+ dd = usbd_get_device_descriptor(sc->sc_udev);
+
+ /*
+ * The Sony DSC-P41, rev 5.00 is really UFI.
+ */
+ if (UGETW(dd->bcdDevice) == 0x500)
+ sc->sc_cmd = UMASS_CPROTO_UFI;
+ else
+ sc->sc_cmd = UMASS_CPROTO_SCSI;
+ }
}
Static void