From david@madole.net  Sun Feb 10 03:28:49 2002
Return-Path: <david@madole.net>
Received: from adsl-113.cshore.com (adsl-113.cshore.com [65.113.124.113])
	by hub.freebsd.org (Postfix) with ESMTP id 2E7FB37B41A
	for <FreeBSD-gnats-submit@freebsd.org>; Sun, 10 Feb 2002 03:28:44 -0800 (PST)
Received: from [192.168.231.227] (helo=there)
	by adsl-113.cshore.com with smtp (Exim 3.33 #1)
	id 16ZsA0-000HEd-00
	for FreeBSD-gnats-submit@freebsd.org; Sun, 10 Feb 2002 06:28:44 -0500
Message-Id: <E16ZsA0-000HEd-00@adsl-113.cshore.com>
Date: Sun, 10 Feb 2002 11:28:48 +0000
From: David S Madole <david@madole.net>
To: FreeBSD-gnats-submit@freebsd.org
Subject: PNY brand USB flash readers need 10 byte commands

>Number:         34789
>Category:       kern
>Synopsis:       PNY brand USB flash readers need 10 byte commands
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    njl
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          update
>Submitter-Id:   current-users
>Arrival-Date:   Sun Feb 10 03:30:02 PST 2002
>Closed-Date:    Thu Aug 21 21:28:40 PDT 2003
>Last-Modified:  Thu Aug 21 21:28:40 PDT 2003
>Originator:     David S Madole
>Release:        FreeBSD 4.5-RELEASE i386
>Organization:
>Environment:

System: FreeBSD 4.5-RELEASE #11 i386

>Description:

PNY brand USB flash readers, both compactflash and smartmedia do not
work correctly. These do not seem to have a specific part or model
number. The UPC codes are 5149221159 (SM) and 514922115 (CF).

The cause is the same thing that apparently affects a lot of other USB
flash readers: these need 10-byte read commands rather than 6-byte.
Adding these to the quirks table in scsi_da.c seems to fix the
problem.

>How-To-Repeat:

Install one of these and do I/O. All calls succeed, but it appears that
you always read or write the first two sectors on the device.

>Fix:

*** scsi_da.c.orig	Sat Feb  9 11:32:30 2002
--- scsi_da.c	Sat Feb  9 00:24:30 2002
***************
*** 345,350 ****
--- 345,366 ----
  		 */
  		{T_DIRECT, SIP_MEDIA_REMOVABLE, "DIVA USB", "Media Reader","*"},
  		/*quirks*/ DA_Q_NO_6_BYTE
+ 	},
+ 	{
+ 		/*
+ 		 * PNY Compact Flash Reader (apparently made by Sandisk)
+ 		 * Doesn't work correctly with 6 byte reads/writes.
+ 		 */
+ 		{T_DIRECT, SIP_MEDIA_REMOVABLE, "SanDisk", "SDCFB-32","*"},
+ 		/*quirks*/ DA_Q_NO_6_BYTE
+ 	},
+ 	{
+ 		/*
+ 		 * PNY Smart Media Reader (possibly made by Shuttle)
+ 		 * Doesn't work correctly with 6 byte reads/writes.
+ 		 */
+ 		{T_DIRECT, SIP_MEDIA_REMOVABLE, "SM Media", "-Shuttle","*"},
+ 		/*quirks*/ DA_Q_NO_6_BYTE
  	}
  };

-------------------------------------------------------
>Release-Note:
>Audit-Trail:
Responsible-Changed-From-To: freebsd-bugs->joe 
Responsible-Changed-By: joe 
Responsible-Changed-When: Sun Feb 10 06:11:07 PST 2002 
Responsible-Changed-Why:  
I'm working on this one. 

http://www.FreeBSD.org/cgi/query-pr.cgi?pr=34789 
State-Changed-From-To: open->closed 
State-Changed-By: njl 
State-Changed-When: Thu Aug 21 21:28:04 PDT 2003 
State-Changed-Why:  
I have definitely fixed this a few weeks ago in -stable and -current. 
Please submit a new pr if you have other problems with the device. 



Responsible-Changed-From-To: joe->njl 
Responsible-Changed-By: njl 
Responsible-Changed-When: Thu Aug 21 21:28:04 PDT 2003 
Responsible-Changed-Why:  
I have definitely fixed this a few weeks ago in -stable and -current. 
Please submit a new pr if you have other problems with the device. 


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