Quirk for a USB mass storage device

Gustau Pérez gperez at entel.upc.edu
Thu Oct 27 09:44:08 UTC 2011


   Hi,

   I'm running FreeBSD 10.0 r226042 on AMD64 and I'm having problems
with the following device:

        umass0: <Kingston DataTraveler 200, class 0/0, rev 2.00/1.10,
addr 7> on usbus0
        umass0:  SCSI over Bulk-Only; quirks = 0x4001
        umass0: Get Max Lun not supported (USB_ERR_TIMEOUT)
        umass0:5:0:-1: Attached to scbus5

   as you can see, UQ_MSC_NO_GETMAXLUN should be set to use the device.
As it is a 64Gb mass storage I would like  to use it.

   I tried to manually add the quirk and it worked. Later on I tried
with 9.0Beta2/i386 on the same machine and the problem also appeared. So
I made a patch (which works on CURRENT, did not try with STABLE) to add
the quirk, which is attached.

   Hans: is it necessary to fill a PR with the patch or would it be
enough with the inline patch?

   Gus


-------------- next part --------------
diff --git a/sys/dev/usb/quirk/usb_quirk.c b/sys/dev/usb/quirk/usb_quirk.c
index 128fe2a..04d1dc8 100644
--- a/sys/dev/usb/quirk/usb_quirk.c
+++ b/sys/dev/usb/quirk/usb_quirk.c
@@ -230,6 +230,7 @@ static struct usb_quirk_entry usb_quirks[USB_DEV_QUIRKS_MAX] = {
 	USB_QUIRK(JMICRON, JM20337, 0x0000, 0xffff, UQ_MSC_FORCE_WIRE_BBB,
 	    UQ_MSC_FORCE_PROTO_SCSI,
 	    UQ_MSC_NO_SYNC_CACHE),
+	USB_QUIRK(KINGSTON, DT200, 0x0000, 0xffff, UQ_MSC_NO_GETMAXLUN),
 	USB_QUIRK(KYOCERA, FINECAM_L3, 0x0000, 0xffff, UQ_MSC_FORCE_WIRE_BBB,
 	    UQ_MSC_FORCE_PROTO_SCSI, UQ_MSC_NO_INQUIRY),
 	USB_QUIRK(KYOCERA, FINECAM_S3X, 0x0000, 0xffff, UQ_MSC_FORCE_WIRE_CBI,
diff --git a/sys/dev/usb/usbdevs b/sys/dev/usb/usbdevs
index 5a4d3f4..0225694 100644
--- a/sys/dev/usb/usbdevs
+++ b/sys/dev/usb/usbdevs
@@ -2012,6 +2012,7 @@ product KEYSPAN UIA11		0x0202	UIA-11 remote control
 /* Kingston products */
 product KINGSTON XX1		0x0008	Ethernet
 product KINGSTON KNU101TX	0x000a	KNU101TX USB Ethernet
+product KINGSTON DT200		0x1630	DATATRAVELER 200
 
 /* Kawasaki products */
 product KLSI DUH3E10BT		0x0008	USB Ethernet


More information about the freebsd-usb mailing list