From owner-freebsd-bugs@FreeBSD.ORG Thu Mar 25 09:50:26 2004 Return-Path: Delivered-To: freebsd-bugs@hub.freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 4F25116A4CE for ; Thu, 25 Mar 2004 09:50:26 -0800 (PST) Received: from freefall.freebsd.org (freefall.freebsd.org [216.136.204.21]) by mx1.FreeBSD.org (Postfix) with ESMTP id 415F543D58 for ; Thu, 25 Mar 2004 09:50:26 -0800 (PST) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (gnats@localhost [127.0.0.1]) i2PHoQbv060354 for ; Thu, 25 Mar 2004 09:50:26 -0800 (PST) (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.12.10/8.12.10/Submit) id i2PHoQY4060353; Thu, 25 Mar 2004 09:50:26 -0800 (PST) (envelope-from gnats) Resent-Date: Thu, 25 Mar 2004 09:50:26 -0800 (PST) Resent-Message-Id: <200403251750.i2PHoQY4060353@freefall.freebsd.org> Resent-From: FreeBSD-gnats-submit@FreeBSD.org (GNATS Filer) Resent-To: freebsd-bugs@FreeBSD.org Resent-Reply-To: FreeBSD-gnats-submit@FreeBSD.org, Thiemo Nordenholz Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 3FA1F16A4CE for ; Thu, 25 Mar 2004 09:45:55 -0800 (PST) Received: from excalibur.ronald.org (unknown [83.120.8.12]) by mx1.FreeBSD.org (Postfix) with ESMTP id B8EBE43D45 for ; Thu, 25 Mar 2004 09:45:51 -0800 (PST) (envelope-from nz@thiemo.net) Received: from styx.ham01.thiemo.net (port-212-202-20-206.reverse.qsc.de [212.202.20.206])i2PHjnjN029412 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK) for ; Thu, 25 Mar 2004 18:45:50 +0100 (CET) Received: from mygiea.ham01.thiemo.net (localhost [127.0.0.1]) i2PHjh9Z073450 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO) for ; Thu, 25 Mar 2004 18:45:43 +0100 (CET) Received: (from thiemo@localhost)i2PHjh4l073449 for FreeBSD-gnats-submit@freebsd.org; Thu, 25 Mar 2004 18:45:43 +0100 (CET) Message-Id: <20040325174543.GA73433@mygiea.ham01.thiemo.net> Date: Thu, 25 Mar 2004 18:45:43 +0100 From: Thiemo Nordenholz To: FreeBSD-gnats-submit@FreeBSD.org X-Send-Pr-Version: 3.113 Subject: kern/64722: [patch] Sitecom CN-311 usb flash reader needs quirk X-BeenThere: freebsd-bugs@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list Reply-To: Thiemo Nordenholz List-Id: Bug reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 25 Mar 2004 17:50:26 -0000 >Number: 64722 >Category: kern >Synopsis: [patch] Sitecom CN-311 usb flash reader needs quirk >Confidential: no >Severity: non-critical >Priority: low >Responsible: freebsd-bugs >State: open >Quarter: >Keywords: >Date-Required: >Class: change-request >Submitter-Id: current-users >Arrival-Date: Thu Mar 25 09:50:25 PST 2004 >Closed-Date: >Last-Modified: >Originator: Thiemo Nordenholz >Release: FreeBSD 4.9-STABLE i386 >Organization: not really >Environment: System: FreeBSD gearloose.ham01.thiemo.net 4.9-STABLE FreeBSD 4.9-STABLE #0: Thu Mar 25 17:46:58 CET 2004 thiemo@gearloose.ham01.thiemo.net:/usr/src/sys/compile/GEARLOOSE i386 >Description: The Sitecom CN-311 six-type USB flash card reader does not work on a freshly cvsup'ed STABLE. All neccessary devices are compiled into the kernel. A CF card is inserted into the reader. When the device is then connected, dmesg shows: Mar 24 22:43:39 gearloose /kernel: umass0: Ltd Winter Ver1.3, rev 2.00/0.05, addr 2, SCSI over Bulk-Only Mar 24 22:43:39 gearloose /kernel: umass0:1:0:-1: Attached to scbus1 as device 0 Mar 24 22:43:40 gearloose /kernel: usbd_transfer_cb: short transfer 0<34 "camcontrol devlist -v" prints (for some minutes): scbus1 on umass-sim0 bus 0: > at scbus1 target 0 lun 0 (probe0) The second line disappears after some time. "camcontrol rescan" on bus 1 as well as on the device hangs for some time, then terminates without any change. Removing and reinserting the USB connector shows the above messages again, reinserting the CF card does not lead to any reaction on the system. Having the device (with or without CF card) plugged in at boot time does not change the behavior: The messages were seen, but the device was not functional. Enabling umass debugging lead, among others, to the message: Mar 24 23:23:04 gearloose /kernel: umass0: Handling BBB state 4 (BBB CSW, 1st attempt), xfer=0xc0f57200, NORMAL_COMPLETION Mar 24 23:23:04 gearloose /kernel: umass0: CSW 2: sig = 0x53425355 (valid), tag = 2, res = 0, status = 0x00 (good) Mar 24 23:23:04 gearloose /kernel: umass0: actlen=1 != residue=0 Mar 24 23:23:04 gearloose /kernel: umass0: Bulk Reset Mar 24 23:23:04 gearloose /kernel: umass0: Handling BBB state 7 (BBB Reset), xfer=0xc0f5af00, NORMAL_COMPLETION (full debugging log can be found at http://www.thiemo.net/misc/sitecom.shtml) The "actlen=1 != residue=0" line made me insert the IGNORE_RESIDUE quirk for this device. With this, the device worked immediately and well. >How-To-Repeat: Have a Sitecom CN-311, insert CF card, plug in and try using it >Fix: see attached patch --- patch begins here --- *** umass.c.orig Thu Mar 25 00:26:57 2004 --- umass.c Thu Mar 25 00:31:04 2004 *************** *** 635,640 **** --- 635,645 ---- && UGETW(dd->idProduct) == USB_PRODUCT_FUJIPHOTO_MASS0100) { sc->quirks |= RS_NO_CLEAR_UA; } + + if (UGETW(dd->idVendor) == USB_VENDOR_SIIG + && UGETW(dd->idProduct) == USB_PRODUCT_SIIG_WINTERREADER) { + sc->quirks |= IGNORE_RESIDUE; + } if (UGETW(dd->idVendor) == USB_VENDOR_YEDATA && UGETW(dd->idProduct) == USB_PRODUCT_YEDATA_FLASHBUSTERU) { *** usbdevs.h.orig Thu Mar 25 00:26:48 2004 --- usbdevs.h Thu Mar 25 00:28:53 2004 *************** *** 1153,1158 **** --- 1153,1159 ---- /* SIIG products */ #define USB_PRODUCT_SIIG_DIGIFILMREADER 0x0004 /* DigiFilm-Combo Reader */ + #define USB_PRODUCT_SIIG_WINTERREADER 0x0330 /* Sitecom Cardreader CN-311 */ /* Silicon Portals Inc. */ #define USB_PRODUCT_SILICONPORTALS_YAPPH_NF 0x0200 /* YAP Phone (no firmware) */ --- patch ends here --- -- Query a PGP key server (e.g. http://www.pgp.net/) for my public key 41068629. >Release-Note: >Audit-Trail: >Unformatted: