From owner-freebsd-questions@FreeBSD.ORG Tue Jun 10 14:13:31 2003 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 9FBDD37B404 for ; Tue, 10 Jun 2003 14:13:31 -0700 (PDT) Received: from nils.bezeqint.net (nils.bezeqint.net [192.115.106.38]) by mx1.FreeBSD.org (Postfix) with ESMTP id 3DF1A43FB1 for ; Tue, 10 Jun 2003 14:13:30 -0700 (PDT) (envelope-from nimrod-me@bezeqint.net) Received: from localhost.bsd.net.il (bzq-152-174.red.bezeqint.net [62.219.152.174])ESMTP id 42B8E8AB for ; Wed, 11 Jun 2003 00:07:39 +0300 (IDT) Received: from localhost.bsd.net.il (nimrodm@localhost [127.0.0.1]) by localhost.bsd.net.il (8.12.9/8.12.9) with ESMTP id h5AKC3Zf001360 for ; Tue, 10 Jun 2003 23:12:03 +0300 (IDT) (envelope-from nimrodm@localhost.bsd.net.il) Received: (from nimrodm@localhost) by localhost.bsd.net.il (8.12.9/8.12.6/Submit) id h5AKC3Dk001359 for freebsd-questions@FreeBSD.org; Tue, 10 Jun 2003 23:12:03 +0300 (IDT) From: Nimrod Mesika Date: Tue, 10 Jun 2003 23:12:03 +0300 To: freebsd-questions@FreeBSD.org Message-ID: <20030610201203.GA1294@localhost.bsd.net.il> Mail-Followup-To: freebsd-questions@FreeBSD.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.4.1i Subject: Datafab umass device - quirks X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 10 Jun 2003 21:13:32 -0000 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.