Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 10 Jun 2003 23:12:03 +0300
From:      Nimrod Mesika <nimrod-me@bezeqint.net>
To:        freebsd-questions@FreeBSD.org
Subject:   Datafab umass device - quirks
Message-ID:  <20030610201203.GA1294@localhost.bsd.net.il>

next in thread | raw e-mail | index | archive | help
Hi all,

Got myself a Datafab KCCF-USBG CompactFlash based usb mass storage
device. Initially the device did not work with FreeBSD (4.8-Stable).

usbdevs -v reports:
 ... Mass Storage(0xa400), USB(0x07c4), rev 1.13

(Does this mean 'USB' is what appears in the manufacturers field and 'Mass
Storage' appears in the product field? Yes, this is a /cheap/ product..)

To fix the problem I had to:

1. Add 'kern.cam.da.no_6_byte=1' to /etc/sysctl.conf
2. Add the following to /sys/dev/usb/usbdevs.h:

        #define USB_VENDOR_DATAFAB  0x7c4   
        #define USB_PRODUCT_DATAFAB 0xa400 
                                                                                
3.  Patch /sys/dev/usb/umass.c as follows:

--- umass.c.orig        Sun May  4 21:40:06 2003
+++ /sys/dev/usb/umass.c        Mon Jun  9 19:56:43 2003
@@ -671,6 +671,15 @@
                sc->transfer_speed = 500;
        }
  
+       if (UGETW(dd->idVendor) == USB_VENDOR_DATAFAB &&
+           UGETW(dd->idProduct) == USB_PRODUCT_DATAFAB) {
+               /* limit inquiries to 36 bytes */
+               sc->quirks |= FORCE_SHORT_INQUIRY ;
+       }
+
        if (UGETW(dd->idVendor) == USB_VENDOR_OLYMPUS &&
            UGETW(dd->idProduct) == USB_PRODUCT_OLYMPUS_C1) {


The question is how do I get (1) into /sys/cam/scsi/scsi_da.c so that it
applies to this device only? I'm not sure I understand the da_quirk_table.
Another question, is how to I get this bug (?) fix committed into -STABLE?

One more thing ... seems like the FreeBSD code is derived from
NetBSD sources. Looking at the HEAD branch of FreeBSD and NetBSD, it
looks like the device is handled correctly by the NetBSD code.

-- 
Nimrod.



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20030610201203.GA1294>