From dpelleg@cs.cmu.edu  Sat Mar 15 05:42:43 2003
Return-Path: <dpelleg@cs.cmu.edu>
Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125])
	by hub.freebsd.org (Postfix) with ESMTP id 49B6F37B401
	for <FreeBSD-gnats-submit@freebsd.org>; Sat, 15 Mar 2003 05:42:43 -0800 (PST)
Received: from gw.pelleg.org (gw.pelleg.org [205.201.13.235])
	by mx1.FreeBSD.org (Postfix) with ESMTP id 8715A43F85
	for <FreeBSD-gnats-submit@freebsd.org>; Sat, 15 Mar 2003 05:42:42 -0800 (PST)
	(envelope-from dpelleg@cs.cmu.edu)
Received: from lank.auton.cs.cmu.edu (lank.wburn [192.168.3.41])
	(using TLSv1 with cipher EDH-RSA-DES-CBC3-SHA (168/168 bits))
	(Client CN "dpelleg.dsl.telerama.com", Issuer "Dan Pelleg" (verified OK))
	by gw.pelleg.org (Postfix) with ESMTP id 26C385A23
	for <FreeBSD-gnats-submit@freebsd.org>; Sat, 15 Mar 2003 08:42:40 -0500 (EST)
Received: by lank.auton.cs.cmu.edu (Postfix, from userid 7675)
	id B087F8F4; Sat, 15 Mar 2003 08:42:38 -0500 (EST)
Message-Id: <20030315134238.B087F8F4@lank.auton.cs.cmu.edu>
Date: Sat, 15 Mar 2003 08:42:38 -0500 (EST)
From: Dan Pelleg <danial+gnats@pelleg.org>
Reply-To: Dan Pelleg <danial+gnats@pelleg.org>
To: FreeBSD-gnats-submit@freebsd.org
Cc:
Subject: QUIRK: Feiya "slider" dual slot USB card reader
X-Send-Pr-Version: 3.113
X-GNATS-Notify:

>Number:         50020
>Category:       kern
>Synopsis:       QUIRK: Feiya "slider" dual slot USB card reader
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    njl
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          update
>Submitter-Id:   current-users
>Arrival-Date:   Sat Mar 15 05:50:14 PST 2003
>Closed-Date:    Sun Apr 27 13:41:32 PDT 2003
>Last-Modified:  Sun Apr 27 13:41:32 PDT 2003
>Originator:     Dan Pelleg
>Release:        FreeBSD 4.8-RC i386
>Organization:
>Environment:
System: FreeBSD l 4.8-RC FreeBSD 4.8-RC #3: Sat Mar 15 08:09:59 EST 2003 root@p:/mnt/xtra1/obj/usr/src/sys/L i386

>Description:

Quirks for Feiya Technolog corp's "slider" - dual slot USB card reader,
capable of CF, MMC, SD media.. The prouct manual says the vendor's
website is at www.feiya.com.tw, though I wasn't able to get to it.

dmesg output:
umass0: CF MMC CARD  CF MMC CARD , rev 1.00/1.00, addr 2
umass0: BBB reset failed, STALLED
da0 at umass-sim0 bus 0 target 0 lun 0
da0: < USB CARD READER 1> Removable Direct Access SCSI-2 device 
da0: 650KB/s transfers
da0: 7MB (15745 512 byte sectors: 64H 32S/T 7C)

Trying to mount results in:
/kernel: umass0: BBB reset failed, STALLED
/kernel: da0: reading primary partition table: error reading fsbn 0

after adding the quirk, the dmesg output is the same (but I can now mount
the filesystem)

# camcontrol inquiry 0:0
pass0: < USB CARD READER 1> Removable Direct Access SCSI-2 device 
pass0: Serial Number 
pass0: 650KB/s transfers 

#usbdevs -v
Controller /dev/usb0:
addr 1: self powered, config 1, UHCI root hub(0x0000), Intel(0x0000), rev 1.00
 port 1 powered
 port 2 powered
Controller /dev/usb1:
addr 1: self powered, config 1, UHCI root hub(0x0000), Intel(0x0000), rev 1.00
 port 1 addr 2: power 100 mA, config 1, CF MMC CARD (0x1130), CF MMC CARD (0x090c), rev 1.00
 port 2 powered

The email address daniel+gnats@pelleg.org is valid.

>How-To-Repeat:
>Fix:

--- sys/cam/scsi/scsi_da.c.orig	Sat Mar 15 08:19:51 2003
+++ sys/cam/scsi/scsi_da.c	Sat Mar 15 07:48:11 2003
@@ -439,6 +439,13 @@
 		 * PR: kern/47877
 		 */
 		{T_DIRECT, SIP_MEDIA_REMOVABLE, "SanDisk", "ImageMate*", "*"},
+		/*quirks*/ DA_Q_NO_6_BYTE
+	},
+	{
+		/*
+		 * Feiya "slider" compact flash
+		 */
+		{T_DIRECT, SIP_MEDIA_REMOVABLE, "", "USB CARD READER", "*"},
 		/*quirks*/ DA_Q_NO_6_BYTE
 	}
 };
>Release-Note:
>Audit-Trail:
Responsible-Changed-From-To: freebsd-bugs->njl 
Responsible-Changed-By: arved 
Responsible-Changed-When: Sun Mar 16 09:54:42 PST 2003 
Responsible-Changed-Why:  
Nate handles quirks 

http://www.freebsd.org/cgi/query-pr.cgi?pr=50020 
State-Changed-From-To: open->closed 
State-Changed-By: njl 
State-Changed-When: Sun Apr 27 13:38:44 PDT 2003 
State-Changed-Why:  

Thank you for the info.  I am committing the quirk and it will be MFCd in 
1 week.  It is unfortunate that the vendor field is blank but I'll commit 
it anyway.  If it causes problems, it may need to be removed but it's likely 
that anything called "USB CARD READER" needs the quirk anyway. 

http://www.freebsd.org/cgi/query-pr.cgi?pr=50020 
>Unformatted:
