kern/64722: [patch] Sitecom CN-311 usb flash reader needs quirk

Thiemo Nordenholz nz at thiemo.net
Thu Mar 25 09:50:26 PST 2004


>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 at 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:
    <USB2.0 CardReader CF RW 0.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:


More information about the freebsd-bugs mailing list