From owner-freebsd-bugs Tue Apr 23 4:40:28 2002 Delivered-To: freebsd-bugs@hub.freebsd.org Received: from freefall.freebsd.org (freefall.FreeBSD.org [216.136.204.21]) by hub.freebsd.org (Postfix) with ESMTP id 936E437B41A for ; Tue, 23 Apr 2002 04:40:01 -0700 (PDT) Received: (from gnats@localhost) by freefall.freebsd.org (8.11.6/8.11.6) id g3NBe1135721; Tue, 23 Apr 2002 04:40:01 -0700 (PDT) (envelope-from gnats) Received: from mail.kerna.ie (ns.kerna.ie [194.106.143.66]) by hub.freebsd.org (Postfix) with ESMTP id 23F6137B405 for ; Tue, 23 Apr 2002 04:38:00 -0700 (PDT) Received: from ram.kerna.ie (ram.kerna.ie [194.106.143.99]) by mail.kerna.ie (8.9.3/8.9.3) with ESMTP id MAA23562 for ; Tue, 23 Apr 2002 12:37:57 +0100 (BST) Received: from bender.kerna.ie (bender.kerna.ie [192.168.42.133]) by ram.kerna.ie (8.9.3/8.9.3) with ESMTP id MAA19444 for ; Tue, 23 Apr 2002 12:37:57 +0100 Received: (from james@localhost) by bender.kerna.ie (8.11.6/8.11.6) id g3NBcYp00699; Tue, 23 Apr 2002 12:38:34 +0100 (IST) (envelope-from james@now.ie) Message-Id: <200204231138.g3NBcYp00699@bender.kerna.ie> Date: Tue, 23 Apr 2002 12:38:34 +0100 (IST) From: James Raftery Reply-To: James Raftery To: FreeBSD-gnats-submit@FreeBSD.org X-Send-Pr-Version: 3.113 Subject: kern/37378: [PATCH] No 6-byte-read on Wincan USB pen flash drive, needs quirk Sender: owner-freebsd-bugs@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.org >Number: 37378 >Category: kern >Synopsis: [PATCH] No 6-byte-read on Wincan USB pen flash drive, needs quirk >Confidential: no >Severity: non-critical >Priority: low >Responsible: freebsd-bugs >State: open >Quarter: >Keywords: >Date-Required: >Class: sw-bug >Submitter-Id: current-users >Arrival-Date: Tue Apr 23 04:40:01 PDT 2002 >Closed-Date: >Last-Modified: >Originator: James Raftery >Release: FreeBSD 4.5-RELEASE-p4 i386 >Organization: >Environment: System: FreeBSD bender.kerna.ie 4.5-RELEASE-p4 FreeBSD 4.5-RELEASE-p4 #5: Tue Apr 23 11:30:53 IST 2002 james@bender.kerna.ie:/usr/obj/usr/src/sys/BENDER i386 Dell Optiplex GX110 with the following USB whatnots: uhci0: port 0xff80-0xff9f irq 11 at device 31.2 on pci0 usb0: on uhci0 usb0: USB revision 1.0 uhub0: Intel UHCI root hub, class 9/0, rev 1.00/1.00, addr 1 uhub0: 2 ports with 2 removable, self powered and a Wincan (branded as ``Copera'') 64MB USB pen flash drive. Detected as: umass0: Wincan USB HDD, rev 1.00/1.00, addr 2 da0 at umass-sim0 bus 0 target 0 lun 0 da0: Removable Direct Access SCSI-0 device da0: 650KB/s transfers da0: 62MB (128000 512 byte sectors: 64H 32S/T 62C) Using the usb and umass kernel modules from RELENG_4_5. >Description: The USB drive is detected, as above, but any attempt to access da0 fails with: /kernel: (da0:umass-sim0:0:0:0): READ(06). CDB: 8 0 0 0 1 0 /kernel: (da0:umass-sim0:0:0:0): ILLEGAL REQUEST asc:20,0 /kernel: (da0:umass-sim0:0:0:0): Invalid command operation code /kernel: da0: reading primary partition table: error reading fsbn 0 >How-To-Repeat: Connect pen drive and try ``disklabel /dev/da0''. >Fix: A patch to /usr/src/sys/cam/scsi/scsi_da.c to add a quirk for this device is below. It works for me on RELENG_4_5. The patch is against scsi_da.c with RCS Id: $FreeBSD: src/sys/cam/scsi/scsi_da.c,v 1.42.2.20 2002/01/14 09:25:43 sobomax Exp $ --- scsi_da.c.patch begins here --- --- scsi_da.c.orig Thu Apr 18 17:18:04 2002 +++ scsi_da.c Tue Apr 23 11:23:58 2002 @@ -262,6 +262,13 @@ {T_DIRECT, SIP_MEDIA_FIXED, "MAXTOR*", "K040H2*", "*"}, /*quirks*/ DA_Q_NO_6_BYTE }, + { + /* + * Wincan USB Pen Drive + */ + {T_DIRECT, SIP_MEDIA_REMOVABLE, "Wincan", "HARD DRIVE*", "*"}, + /*quirks*/ DA_Q_NO_6_BYTE + }, { {T_OPTICAL, SIP_MEDIA_REMOVABLE, "FUJITSU", "MCF3064AP", "*"}, /*quirks*/ DA_Q_NO_6_BYTE --- scsi_da.c.patch ends here --- >Release-Note: >Audit-Trail: >Unformatted: To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-bugs" in the body of the message