From 5addb2e49bee0da856d5e7766b7e33c8261a1cd6 Mon Sep 17 00:00:00 2001 From: "Federico G. Schwindt" Date: Sat, 31 Dec 2005 04:55:53 +0000 Subject: 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. --- sys/dev/usb/umass_quirks.c | 16 +++++++++++++--- 1 file changed, 13 insertions(+), 3 deletions(-) (limited to 'sys/dev/usb/umass_quirks.c') 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 -- cgit v1.2.3