From dillon@apollo.backplane.com  Sun Jan 12 20:12:20 2003
Return-Path: <dillon@apollo.backplane.com>
Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125])
	by hub.freebsd.org (Postfix) with ESMTP id 79C5737B401
	for <FreeBSD-gnats-submit@freebsd.org>; Sun, 12 Jan 2003 20:12:20 -0800 (PST)
Received: from apollo.backplane.com (apollo.backplane.com [216.240.41.2])
	by mx1.FreeBSD.org (Postfix) with ESMTP id 1EA6843E4A
	for <FreeBSD-gnats-submit@freebsd.org>; Sun, 12 Jan 2003 20:12:20 -0800 (PST)
	(envelope-from dillon@apollo.backplane.com)
Received: from apollo.backplane.com (localhost [127.0.0.1])
	by apollo.backplane.com (8.12.6/8.12.6) with ESMTP id h0D4CEYp000421;
	Sun, 12 Jan 2003 20:12:14 -0800 (PST)
	(envelope-from dillon@apollo.backplane.com)
Received: (from dillon@localhost)
	by apollo.backplane.com (8.12.6/8.12.6/Submit) id h0D4CELb000420;
	Sun, 12 Jan 2003 20:12:14 -0800 (PST)
Message-Id: <200301130412.h0D4CELb000420@apollo.backplane.com>
Date: Sun, 12 Jan 2003 20:12:14 -0800 (PST)
From: Matthew Dillon <dillon@apollo.backplane.com>
Reply-To: Matthew Dillon <dillon@apollo.backplane.com>
To: FreeBSD-gnats-submit@freebsd.org
Cc: hartzell@kestrel.alerce.com
Subject: Quirk entry required for LEXR PLUG DRIVE USB diskkey
X-Send-Pr-Version: 3.113
X-GNATS-Notify:

>Number:         47006
>Category:       kern
>Synopsis:       Quirk entry required for LEXR PLUG DRIVE USB diskkey
>Confidential:   no
>Severity:       serious
>Priority:       high
>Responsible:    njl
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Sun Jan 12 20:20:02 PST 2003
>Closed-Date:    Sun Feb 09 13:50:28 PST 2003
>Last-Modified:  Sun Feb 09 13:50:28 PST 2003
>Originator:     Matthew Dillon
>Release:        FreeBSD 4.7-STABLE i386
>Organization:
>Environment:
System: FreeBSD apollo.backplane.com 4.7-STABLE FreeBSD 4.7-STABLE #14: Tue Nov 12 20:14:37 PST 2002 dillon@apollo.backplane.com:/FreeBSD/FreeBSD-4.x/src/sys/compile/APOLLO i386

    FreeBSD-4.7p3

>Description:

    A bug report was posted on hackers by George Hartzell regarding his
    keychain usb storage device.  I suggested that he create a quirk entry
    in cam/scsi/scsi_da.c.  He replied that the quirk entry successfully
    solved the problem.

    I have included George's email below, please follow-up with him if
    you need more information.

    I also asked him to generate output from usbdevs -v, which he did.

:From: George Hartzell <hartzell@kestrel.alerce.com>
:To: Matthew Dillon <dillon@apollo.backplane.com>
:Cc: Paul Halliday <dp@dove.penix.org>, freebsd-hackers@FreeBSD.ORG
:Subject: Re: usb keychain memory disk doesn't work on 4.7p3
:
:Matthew Dillon writes:
: > [...]
: >     Urk!  Sorry!  I plugged in the names for one of my keychains.  Don't
: >     use Stormblue :-)  Use yours.  Try:
: > 
: > {
: >     {T_DIRECT, SIP_MEDIA_REMOVABLE, "LEXAR*", "*", "*"},
: >     /*quirks*/ DA_Q_NO_6_BYTE|DA_Q_NO_SYNC_CACHE
: > },
: > 
: >     And als osend me the output of 'usbdevs -v' (with either the old kernel
: >     or the new one).
:
:It works!  Cool, I've got a quirk.  Wow!  Thanks!
:
:> sudo 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 addr 2: power 90 mA, config 1, LEXR PLUG DRIVE(0x0080), LEXR PLUG DRIVE(0x05dc), rev 0.01
:> 
:
:g.

>How-To-Repeat:

>Fix:

>Release-Note:
>Audit-Trail:

From: Matthew Dillon <dillon@apollo.backplane.com>
To: FreeBSD-gnats-submit@FreeBSD.org
Cc:  
Subject: Re: kern/47006: Quirk entry required for LEXR PLUG DRIVE USB diskkey
Date: Sun, 12 Jan 2003 20:46:09 -0800 (PST)

     Additional information form George's original email.  Note that
     usbdevs -v comes back with:
 
 > sudo 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 addr 2: power 90 mA, config 1, LEXR PLUG DRIVE(0x0080), LEXR PLUG DRIVE(
 0x05dc), rev 0.01
 > 
 
     But the da0 entry in the dmesg says "LEXAR".
 
 Jan 12 12:04:28 rosebud /kernel: umass0: LEXR PLUG DRIVE LEXR PLUG DRIVE, rev 
 1.10/0.01, addr 2
 Jan 12 12:04:28 rosebud /kernel: da0 at umass-sim0 bus 0 target 0 lun 0
 Jan 12 12:04:28 rosebud /kernel: da0: <LEXAR DIGITAL FILM /W1.> Removable Dire
 ct Access SCSI-2 device 
 Jan 12 12:04:28 rosebud /kernel: da0: 650KB/s transfers
   Jan 12 12:04:28 rosebud /kernel: da0: 123MB (251904 512 byte sectors: 64H 32S/
 
 
     I'm not sure which of the two (LEXR or LEXAR) is appropriate for the
     quirk entry.  If George did not modify my suggestion, then the quirk
     entry has "LEXAR*" in it.
 
 						-Matt
State-Changed-From-To: open->feedback 
State-Changed-By: njl 
State-Changed-When: Sun Jan 12 21:10:44 PST 2003 
State-Changed-Why:  
Please see the quirks web page below and reply with the information 
listed as required: 
http://www.root.org/~nate/freebsd/quirks.html 
This helps us keep track of device behavior in hopes of a better 
workaround in the future. 


Responsible-Changed-From-To: freebsd-bugs->njl 
Responsible-Changed-By: njl 
Responsible-Changed-When: Sun Jan 12 21:10:44 PST 2003 
Responsible-Changed-Why:  
Please see the quirks web page below and reply with the information 
listed as required: 
http://www.root.org/~nate/freebsd/quirks.html 
This helps us keep track of device behavior in hopes of a better 
workaround in the future. 

http://www.freebsd.org/cgi/query-pr.cgi?pr=47006 

From: Nate Lawson <nate@root.org>
To: George Hartzell <hartzell@kestrel.alerce.com>
Cc: freebsd-gnats-submit@freebsd.org
Subject: Re: kern/47006: Quirk entry required for LEXR PLUG DRIVE USB diskkey
Date: Sun, 12 Jan 2003 21:15:24 -0800 (PST)

 On Sun, 12 Jan 2003, Nate Lawson wrote:
 > Please see the quirks web page below and reply with the information
 > listed as required:
 >    http://www.root.org/~nate/freebsd/quirks.html
 > This helps us keep track of device behavior in hopes of a better
 > workaround in the future.
 
 Thanks,
 Nate
 

From: Matthew Dillon <dillon@apollo.backplane.com>
To: FreeBSD-gnats-submit@FreeBSD.org
Cc: George Hartzell <hartzell@kestrel.alerce.com>,
	Nate Lawson <nate@root.org>
Subject: Re: kern/47006: Quirk entry required for LEXR PLUG DRIVE USB diskkey
Date: Tue, 14 Jan 2003 10:41:34 -0800 (PST)

      It's easy, George, you just To: or Cc: freebsd-gnats-submit@freebsd.org
      and make sure the Subject: line contains the PR number.  So this
      email I'm sending you and Nate will also automatically be added to
      the PR.  I'm including your email so you don't have to file it
      again :-)
 
      Nate, this is George's attempt to supply the requested information!
      (BTW, thanks for comitting the work from my other PR for the Sony!)
 
 					-Matt
 
 :(From George Hartzell)
 :
 :Matt,
 :
 :
 :I can't see any obvious way to add this to the PR=47006 myself, so
 :here's the data that Nate wanted for my Lexar keychain disk.
 :
 :g.
 :
 :Subject: QUIRK: LEXAR Media JumpDrive USB Keychain disk
 :
 :Output of "camcontrol inquiry yourdevice"
 :
 :   pass0: <LEXAR DIGITAL FILM /W1.> Removable Direct Access SCSI-2 device 
 :   pass0: Serial Number [
 :   pass0: 650KB/s transfers 
 :   
 :Manufacturer name, model number, etc.
 :
 :   LEXAR Media Jumpdrive 128MB
 :
 :Transport type (FC, SCSI, USB, Firewire)
 :
 :   USB
 :
 :Output from dmesg for failed attach attempts
 :
 :   Jan 12 11:51:54 rosebud /kernel: umass0: LEXR PLUG DRIVE LEXR PLUG DRIVE, rev 1.10/0.01, addr 2
 :   Jan 12 11:51:54 rosebud /kernel: da0 at umass-sim0 bus 0 target 0 lun 0
 :   Jan 12 11:51:54 rosebud /kernel: da0: <LEXAR DIGITAL FILM /W1.> Removable Direct Access SCSI-2 device 
 :   Jan 12 11:51:54 rosebud /kernel: da0: 650KB/s transfers
 :   Jan 12 11:51:54 rosebud /kernel: da0: 123MB (251904 512 byte sectors: 64H 32S/T 123C)
 :   Jan 12 11:56:23 rosebud sudo: hartzell : TTY=ttyp2 ; PWD=/usr/home/hartzell ; USER=root ; COMMAND=/sbin/fdisk /dev/da0
 :   Jan 12 11:56:23 rosebud /kernel: da0: reading primary partition table: error reading fsbn 0
 :
 :Output from dmesg for successful attach attempts (after quirk added)
 :
 :   Jan 12 19:34:11 rosebud /kernel: umass0: LEXR PLUG DRIVE LEXR PLUG DRIVE, rev 1.10/0.01, addr 2
 :   Jan 12 19:34:11 rosebud /kernel: da0 at umass-sim0 bus 0 target 0 lun 0
 :   Jan 12 19:34:11 rosebud /kernel: da0: <LEXAR DIGITAL FILM /W1.> Removable Direct Access SCSI-2 device 
 :   Jan 12 19:34:11 rosebud /kernel: da0: 650KB/s transfers
 :   Jan 12 19:34:11 rosebud /kernel: da0: 123MB (251904 512 byte sectors: 64H 32S/T 123C)
 :
 :Valid email address
 :
 :   hartzell at kestrel.alerce.com
 :

From: Nate Lawson <nate@root.org>
To: hartzell@kestrel.alerce.com
Cc: freebsd-gnats-submit@freebsd.org
Subject: Re: kern/47006
Date: Wed, 5 Feb 2003 14:34:04 -0800 (PST)

 Please add the quirk below and see if it fixes your problem.
 
 -Nate
 
 scsi_da.c:
 	{
 		/*
 		 * Lexar Media Jumpdrive
 		 * PR: kern/47006
 		 */
 		{T_DIRECT, SIP_MEDIA_REMOVABLE, "LEXAR", "Digital Film", "*"},
 		/*quirks*/ DA_Q_NO_6_BYTE
  	}
 

From: Nate Lawson <nate@root.org>
To: George Hartzell <hartzell@kestrel.alerce.com>
Cc: freebsd-gnats-submit@freebsd.org
Subject: Re: kern/47006
Date: Thu, 6 Feb 2003 17:31:17 -0800 (PST)

 On Thu, 6 Feb 2003, George Hartzell wrote:
 > The first entry below (and the only one not ifdef'ed out) works.  The
 > second two do not, the third is what I had put in there after the
 > conversation that led to the bug filing.
 > 
 > 		/*
 > 		 * Lexar Media Jumpdrive
 > 		 * PR: kern/47006
 > 		 */
 > 		{T_DIRECT, SIP_MEDIA_REMOVABLE, "LEXAR", "*", "*"},
 >     		/*quirks*/ DA_Q_NO_6_BYTE
 
 That's because the match is case sensitive and my patch was not.  Please
 try this one:
 
     {
         /*
          * Lexar Media Jumpdrive
          * PR: kern/47006
          */
         {T_DIRECT, SIP_MEDIA_REMOVABLE, "LEXAR", "DIGITAL FILM", "*"},
         /*quirks*/ DA_Q_NO_6_BYTE
     }
 
 We need less wildcarding to avoid unwanted matches (i.e. your quirk
 matches every device ever produced by LEXAR or LEXAR-FOO for that matter).
 
 -Nate
 
State-Changed-From-To: feedback->closed 
State-Changed-By: njl 
State-Changed-When: Sun Feb 9 13:50:01 PST 2003 
State-Changed-Why:  

User validated that quirk works.  Quirk committed. 

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