Date: Mon, 1 Mar 2004 16:22:14 -0600 (CST) From: Greg Rivers <gcr@sa.fedex.com> To: FreeBSD-gnats-submit@FreeBSD.org Subject: kern/63619: Add support for SimpleTech UCF-100 USB CompactFlash reader [PATCH] Message-ID: <200403012222.i21MME2W001914@w10.sac.fedex.com> Resent-Message-ID: <200403012230.i21MUGhh081447@freefall.freebsd.org>
next in thread | raw e-mail | index | archive | help
>Number: 63619 >Category: kern >Synopsis: Add support for SimpleTech UCF-100 USB CompactFlash reader [PATCH] >Confidential: no >Severity: serious >Priority: low >Responsible: freebsd-bugs >State: open >Quarter: >Keywords: >Date-Required: >Class: change-request >Submitter-Id: current-users >Arrival-Date: Mon Mar 01 14:30:15 PST 2004 >Closed-Date: >Last-Modified: >Originator: Greg Rivers >Release: FreeBSD 5.2.1-RELEASE i386 >Organization: FedEx Internet Operations >Environment: System: FreeBSD w10.sac.fedex.com 5.2.1-RELEASE FreeBSD 5.2.1-RELEASE #0: Sat Feb 28 22:42:34 CST 2004 root@w10.sac.fedex.com:/usr/src/sys/i386/compile/W10 i386 >Description: The SimpleTech UCF-100 USB CompactFlash reader (http://www.simpletech.com/parts/sti_ucf100.htm) does not work. Attaching it wedges the machine. These patches make it usable, if not fully functional. >How-To-Repeat: Plug the device in. Errors are generated as follows: kernel: umass0: USB Mass Storage, rev 1.10/1.13, addr 2 kernel: umass0: Get Max Lun not supported (STALLED) kernel: umass0: BBB reset failed, STALLED kernel: umass0: BBB bulk-in clear stall failed, STALLED kernel: umass0: BBB bulk-out clear stall failed, STALLED kernel: umass0: BBB reset failed, STALLED kernel: umass0: BBB bulk-in clear stall failed, STALLED kernel: umass0: BBB bulk-out clear stall failed, STALLED kernel: umass0: BBB reset failed, STALLED kernel: umass0: BBB bulk-in clear stall failed, STALLED kernel: umass0: BBB bulk-out clear stall failed, STALLED kernel: umass0: BBB reset failed, STALLED kernel: umass0: BBB bulk-in clear stall failed, STALLED kernel: umass0: BBB bulk-out clear stall failed, STALLED kernel: umass0: BBB reset failed, STALLED kernel: umass0: BBB bulk-in clear stall failed, STALLED kernel: umass0: BBB bulk-out clear stall failed, STALLED kernel: umass0: BBB reset failed, STALLED kernel: umass0: BBB bulk-in clear stall failed, STALLED kernel: umass0: BBB bulk-out clear stall failed, STALLED kernel: GEOM: create disk da0 dp=0xc2e0c450 kernel: umass0: BBB reset failed, STALLED kernel: umass0: BBB bulk-in clear stall failed, STALLED kernel: umass0: BBB bulk-out clear stall failed, STALLED kernel: umass0: BBB reset failed, STALLED kernel: umass0: BBB bulk-in clear stall failed, STALLED kernel: umass0: BBB bulk-out clear stall failed, STALLED kernel: umass0: BBB reset failed, STALLED kernel: umass0: BBB bulk-in clear stall failed, STALLED kernel: umass0: BBB bulk-out clear stall failed, STALLED kernel: umass0: BBB reset failed, STALLED kernel: umass0: BBB bulk-in clear stall failed, STALLED kernel: umass0: BBB bulk-out clear stall failed, STALLED kernel: umass0: BBB reset failed, STALLED kernel: umass0: BBB bulk-in clear stall failed, STALLED kernel: umass0: BBB bulk-out clear stall failed, STALLED kernel: (da0:umass-sim0:0:0:0): got CAM status 0x4 kernel: (da0:umass-sim0:0:0:0): fatal error, failed to attach to device kernel: (da0:umass-sim0:0:0:0): lost device kernel: umass0: BBB reset failed, STALLED kernel: umass0: BBB bulk-in clear stall failed, STALLED kernel: umass0: BBB bulk-out clear stall failed, STALLED kernel: umass0: BBB reset failed, STALLED kernel: umass0: BBB bulk-in clear stall failed, STALLED kernel: umass0: BBB bulk-out clear stall failed, STALLED kernel: umass0: BBB reset failed, STALLED kernel: umass0: BBB bulk-in clear stall failed, STALLED kernel: umass0: BBB bulk-out clear stall failed, STALLED kernel: umass0: BBB reset failed, STALLED kernel: umass0: BBB bulk-in clear stall failed, STALLED kernel: umass0: BBB bulk-out clear stall failed, STALLED kernel: umass0: BBB reset failed, STALLED kernel: umass0: BBB bulk-in clear stall failed, STALLED kernel: umass0: BBB bulk-out clear stall failed, STALLED kernel: (da0:umass-sim0:0:0:0): removing device entry kernel: GEOM: destroy disk da0 dp=0xc2e0c450 kernel: umass0: at uhub0 port 1 (addr 2) disconnected kernel: umass0: detached [ machine wedges ] syslogd: kernel boot file is /boot/kernel/kernel kernel: Copyright (c) 1992-2004 The FreeBSD Project. kernel: Copyright (c) 1979, 1980, 1983, 1986, 1988, 1989, 1991, 1992, 1993, 1994 kernel: The Regents of the University of California. All rights reserved. kernel: FreeBSD 5.2.1-RELEASE #0: Wed Feb 25 21:16:35 CST 2004 ... >Fix: Apply the following patches to usbdevs and umass.c in /usr/src/sys/dev/usb/: ------------------------------------- cut -------------------------------------- --- usbdevs 2004/02/25 23:07:42 1.1 +++ usbdevs 2004/02/26 19:15:35 1.2 @@ -271,6 +271,7 @@ vendor MICROTECH 0x07af Microtech vendor GENERALINSTMNTS 0x07b2 General Instruments (Motorola) vendor OLYMPUS 0x07b4 Olympus +vendor SIMPLETECH 0x07c4 SimpleTech vendor ABOCOM 0x07b8 AboCom Systems vendor KEISOKUGIKEN 0x07c1 Keisokugiken vendor APG 0x07c5 APG Cash Drawer @@ -1100,6 +1101,9 @@ /* Silicon Portals Inc. */ product SILICONPORTALS YAPPH_NF 0x0200 YAP Phone (no firmware) product SILICONPORTALS YAPPHONE 0x0201 YAP Phone + +/* SimpleTech products */ +product SIMPLETECH UCF100 0xa400 FlashLink UCF-100 CompactFlash Reader /* Sirius Technologies products */ product SIRIUS ROADSTER 0x0001 NetComm Roadster II 56 USB ------------------------------------- cut -------------------------------------- ------------------------------------- cut -------------------------------------- --- umass.c 2004/02/25 23:09:55 1.1 +++ umass.c 2004/02/26 19:15:35 1.2 @@ -386,6 +386,10 @@ UMASS_PROTO_ATAPI | UMASS_PROTO_CBI_I, FORCE_SHORT_INQUIRY }, + { USB_VENDOR_SIMPLETECH, USB_PRODUCT_SIMPLETECH_UCF100, RID_WILDCARD, + UMASS_PROTO_ATAPI | UMASS_PROTO_BBB, + NO_INQUIRY | NO_GETMAXLUN + }, { VID_EOT, PID_EOT, RID_EOT, 0, 0 } }; ------------------------------------- cut -------------------------------------- With the above patches in place, the device attaches and can be used for DOS file systems. However, attempting to use UFS, or write blocks bigger than 16k (eg. with dd) results in SCSI errors and an eventual hang. I don't know how to tell whether this is due to a problem with the device, or with the SCSI/CAM driver. But it shouldn't hang the machine in any case. >Release-Note: >Audit-Trail: >Unformatted:
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200403012222.i21MME2W001914>