From olli@lurza.secnetix.de  Thu Feb  7 13:39:32 2002
Return-Path: <olli@lurza.secnetix.de>
Received: from lurza.secnetix.de (lurza.secnetix.de [212.66.1.130])
	by hub.freebsd.org (Postfix) with ESMTP id 8141237B41D
	for <FreeBSD-gnats-submit@freebsd.org>; Thu,  7 Feb 2002 13:39:31 -0800 (PST)
Received: (from olli@localhost)
	by lurza.secnetix.de (8.11.6/8.11.6) id g17LdUs01488;
	Thu, 7 Feb 2002 22:39:30 +0100 (CET)
	(envelope-from oliver.fromme@secnetix.de)
Message-Id: <200202072139.g17LdUs01488@lurza.secnetix.de>
Date: Thu, 7 Feb 2002 22:39:30 +0100 (CET)
From: Oliver Fromme <olli@secnetix.de>
Reply-To: Oliver Fromme <olli@secnetix.de>
To: FreeBSD-gnats-submit@freebsd.org
Cc: Oliver Fromme <olli@secnetix.de>
Subject: [patch] SCSI quirk for USB Memorybird
X-Send-Pr-Version: 3.113
X-GNATS-Notify:

>Number:         34712
>Category:       kern
>Synopsis:       [patch] SCSI quirk for USB Memorybird
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    njl
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          change-request
>Submitter-Id:   current-users
>Arrival-Date:   Thu Feb 07 13:40:00 PST 2002
>Closed-Date:    Wed Dec 18 13:50:29 PST 2002
>Last-Modified:  Wed Dec 18 13:50:29 PST 2002
>Originator:     Oliver Fromme
>Release:        FreeBSD 4.5-RELEASE i386
>Organization:
secnetix GmbH & Co KG
>Environment:
System: FreeBSD lurza.secnetix.de 4.5-RELEASE FreeBSD 4.5-RELEASE #0: Thu Feb 7 22:12:04 CET 2002 olli@lurza.secnetix.de:/usr/src/sys/compile/LURZA i386

>Description:

   The USB Memorybird (Fujitsu-Siemens) requires a SCSI quirk
   for operation (it doesn't handle 6-byte SCSI read commands).
   FYI, the Memorybird is a small, pen-shaped, battery-less
   flash memory device.  For more information on the hardware:
   http://www.fujitsu-siemens.com/rl/peripherals/homeperipherals/memorybird.html

>How-To-Repeat:

   Connect a Memorybird to the USB port and try to access it.
   You'll get messages like this:

   umass0: BBB reset failed, TIMEOUT
   umass0: BBB bulk-in clear stall failed, TIMEOUT
   umass0: BBB bulk-out clear stall failed, TIMEOUT

   With the patch below attached, everything works perfectly
   fine.

>Fix:

--- src/sys/cam/scsi/scsi_da.c.orig	Mon Jan 14 10:25:43 2002
+++ src/sys/cam/scsi/scsi_da.c	Thu Feb  7 22:07:33 2002
@@ -345,6 +345,14 @@
 		 */
 		{T_DIRECT, SIP_MEDIA_REMOVABLE, "DIVA USB", "Media Reader","*"},
 		/*quirks*/ DA_Q_NO_6_BYTE
+	},
+	{
+		/*
+		 * Fujitsu-Siemens Memorybird.
+		 * Doesn't work correctly with 6 byte reads/writes.
+		 */
+		{T_DIRECT, SIP_MEDIA_REMOVABLE, "Fujitsu", "Memorybird", "*"},
+		/*quirks*/ DA_Q_NO_6_BYTE
 	}
 };
 
>Release-Note:
>Audit-Trail:

From: Nate Lawson <nate@root.org>
To: freebsd-gnats-submit@FreeBSD.org, olli@secnetix.de
Cc:  
Subject: Re: kern/34712: [patch] SCSI quirk for USB Memorybird
Date: Thu, 15 Aug 2002 16:36:53 -0700 (PDT)

 Please upgrade to 4.6R or -STABLE and let us know if you have more
 problems.  If you do, please send dmesg output.  Note:  "minimum_cmd_size
 is increased to 10" message is *not* an error.
 
 -Nate
 

From: Oliver Fromme <olli@lurza.secnetix.de>
To: nate@root.org (Nate Lawson)
Cc: freebsd-gnats-submit@FreeBSD.org
Subject: Re: kern/34712: [patch] SCSI quirk for USB Memorybird
Date: Fri, 16 Aug 2002 14:17:23 +0200 (CEST)

 Nate Lawson wrote:
  > Please upgrade to 4.6R or -STABLE and let us know if you have more
  > problems.  If you do, please send dmesg output.  Note:  "minimum_cmd_size
  > is increased to 10" message is *not* an error.
 
 I'm afraid it doesn't work out of the box.  I tried it on
 4-stable that's about 2 weeks old (August 2).  Please let
 me know if that's not new enough.
 
 When I plug the device in, I get this:
 
  | umass0: Fujitsu Memorybird, rev 1.00/1.00, addr 2
  | da2 at umass-sim0 bus 0 target 0 lun 0
  | da2: <Fujitsu Memorybird 1.04> Removable Direct Access SCSI-0 device
  | da2: 650KB/s transfers
  | da2: 62MB (128000 512 byte sectors: 64H 32S/T 62C)
 
 So far, so good -- but when I try to do something with it,
 say, "fdisk /dev/da2", it sits there for several minutes
 and does nothing.  The process can't be killed (it's in
 disk-wait state).  dmesg says:
 
  | umass0: BBB reset failed, TIMEOUT
  | umass0: BBB bulk-in clear stall failed, TIMEOUT
  | umass0: BBB bulk-out clear stall failed, TIMEOUT
  | umass0: BBB reset failed, TIMEOUT
  | umass0: BBB bulk-in clear stall failed, TIMEOUT
  | umass0: BBB bulk-out clear stall failed, TIMEOUT
  | umass0: BBB reset failed, TIMEOUT
  | umass0: BBB bulk-in clear stall failed, TIMEOUT
  | umass0: BBB bulk-out clear stall failed, TIMEOUT
  | umass0: BBB reset failed, TIMEOUT
  | umass0: BBB bulk-in clear stall failed, TIMEOUT
  | umass0: BBB bulk-out clear stall failed, TIMEOUT
  | umass0: BBB reset failed, TIMEOUT
  | umass0: BBB bulk-in clear stall failed, TIMEOUT
  | umass0: BBB bulk-out clear stall failed, TIMEOUT
  | da2: reading primary partition table: error reading fsbn 0
 
 So it seems I still need the quirk from the PR.
 
 Regards
    Oliver
 
 -- 
 Oliver Fromme, secnetix GmbH & Co KG, Oettingenstr. 2, 80538 Mnchen
 Any opinions expressed in this message may be personal to the author
 and may not necessarily reflect the opinions of secnetix in any way.
 
 "All that we see or seem is just a dream within a dream" (E. A. Poe)

From: Nate Lawson <nate@root.org>
To: Oliver Fromme <olli@lurza.secnetix.de>
Cc: freebsd-gnats-submit@FreeBSD.org
Subject: Re: kern/34712: [patch] SCSI quirk for USB Memorybird
Date: Fri, 16 Aug 2002 14:20:31 -0700 (PDT)

 Please rebuild your kernel with options USB_DEBUG defined and then do:
     sysctl hw.usb.umass.debug=0xFFFFFFFF
 ... before doing the fdisk and report the output.
 Also please add options CAMDEBUG and do:
     camcontrol debug -T -c all
 ... to get scsi debug output.
 
 The requests are timing out and not being handled and we need to figure
 out why.
 
 -Nate
 
State-Changed-From-To: open->feedback 
State-Changed-By: njl 
State-Changed-When: Tue Oct 1 13:46:14 PDT 2002 
State-Changed-Why:  
Please add any missing information. 


Responsible-Changed-From-To: freebsd-bugs->njl 
Responsible-Changed-By: njl 
Responsible-Changed-When: Tue Oct 1 13:46:14 PDT 2002 
Responsible-Changed-Why:  
New quirk maintainer.  Please add any information that is missing 
(i.e. new/old dmesg, exact device info, etc.)  You can find all the 
needed information at: 
http://www.root.org/~nate/freebsd/quirks.html 


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

From: Nate Lawson <nate@root.org>
To: Oliver Fromme <olli@lurza.secnetix.de>
Cc: freebsd-gnats-submit@freebsd.org
Subject: Re: kern/34712: [patch] SCSI quirk for USB Memorybird
Date: Thu, 17 Oct 2002 10:30:17 -0700 (PDT)

 On Wed, 2 Oct 2002, Oliver Fromme wrote:
 > OK, I'll do that as soon as possible.  (Will take a bit of
 > time, though, because a lack of time right now.  I'll have
 > to update to 4.7-R first when it is finally released.)
 
 I would like to commit your quirk but I need the information from the web
 page first.  Please do it when you have time.
 
 -Nate
 

From: Nate Lawson <nate@root.org>
To: Oliver Fromme <olli@lurza.secnetix.de>
Cc: freebsd-gnats-submit@freebsd.org
Subject: Re: kern/34712
Date: Wed, 30 Oct 2002 22:16:29 -0800 (PST)

 Have you been able to get the appropriate info from the URL (manufacturer,
 inquiry, dmesg, etc.)?  I'd really like to commit this but need more
 information.
 
 -Nate
 

From: Nate Lawson <nate@root.org>
To: Oliver Fromme <olli@lurza.secnetix.de>
Cc: freebsd-gnats-submit@freebsd.org
Subject: Re: kern/34712
Date: Sat, 23 Nov 2002 15:47:48 -0800 (PST)

 Please submit to this PR the information listed at:
    http://www.root.org/~nate/freebsd/quirks.html 
 
 I need info like the inquiry data, model number, etc.  After getting this,
 I will be able to commit the quirk.  If you can't get me info in 2 weeks,
 I will have to close the PR without committing it.
 
 Thanks,
 Nate
 

From: Oliver Fromme <olli@lurza.secnetix.de>
To: nate@root.org (Nate Lawson)
Cc: freebsd-gnats-submit@freebsd.org
Subject: Re: kern/34712
Date: Fri, 29 Nov 2002 18:35:05 +0100 (CET)

 Sorry for the delayed reply.  I didn't have the ability to
 play for the hardware for some time.
 
 Here is the requested information:
 
  - Output of "camcontrol inquiry yourdevice"
 
 pass3: <Fujitsu Memorybird 1.04> Removable Direct Access SCSI-0 device
 pass3: Serial Number
 pass3: 650KB/s transfers
 
  - Manufacturer name, model number, etc.
 
 The manufacturer is "Fujitsu - Siemens", the device is
 called "Memorybird" and comes in various sizes of the
 flash memory.  I have the 64 Mbytes version.  I'm not
 aware of any model numbers or anything like that.
 
  - Transport type (FC, SCSI, USB, Firewire)
 
 USB
 
  - Output from dmesg for failed attach attempts
 
 I can attach it fine.  But I cannot access it.
 This is the dmesg output from attaching it:
 
 umass0: Fujitsu Memorybird, rev 1.00/1.00, addr 2
 da2 at umass-sim0 bus 0 target 0 lun 0
 da2: <Fujitsu Memorybird 1.04> Removable Direct Access SCSI-0 device
 da2: 650KB/s transfers
 da2: 62MB (128000 512 byte sectors: 64H 32S/T 62C)
 
 As soon as I try to do anything with it, such as
 fdisk, disklabel, or even simply dd, I get this:
 
 umass0: BBB reset failed, TIMEOUT
 umass0: BBB bulk-in clear stall failed, TIMEOUT
 umass0: BBB bulk-out clear stall failed, TIMEOUT
 umass0: BBB reset failed, TIMEOUT
 umass0: BBB bulk-in clear stall failed, TIMEOUT
 umass0: BBB bulk-out clear stall failed, TIMEOUT
 umass0: BBB reset failed, TIMEOUT
 umass0: BBB bulk-in clear stall failed, TIMEOUT
 umass0: BBB bulk-out clear stall failed, TIMEOUT
 umass0: BBB reset failed, TIMEOUT
 umass0: BBB bulk-in clear stall failed, TIMEOUT
 umass0: BBB bulk-out clear stall failed, TIMEOUT
 umass0: BBB reset failed, TIMEOUT
 umass0: BBB bulk-in clear stall failed, TIMEOUT
 umass0: BBB bulk-out clear stall failed, TIMEOUT
 da2: reading primary partition table: error reading fsbn 0
 umass0: BBB reset failed, TIMEOUT
 umass0: BBB bulk-in clear stall failed, TIMEOUT
 umass0: BBB bulk-out clear stall failed, TIMEOUT
 (da2:umass-sim0:0:0:0): Synchronize cache failed, status == 0x4, scsi status == 0x0
 umass0: BBB reset failed, TIMEOUT
 umass0: BBB bulk-in clear stall failed, TIMEOUT
 umass0: BBB bulk-out clear stall failed, TIMEOUT
 
  - Output from dmesg for successful attach attempts (after quirk added)
 
 Attaching gives the same output as above, but I don't get
 any errors when accessing the device, i.e. it works fine.
 
 Regards
    Oliver
 
State-Changed-From-To: feedback->closed 
State-Changed-By: njl 
State-Changed-When: Wed Dec 18 13:48:58 PST 2002 
State-Changed-Why:  
Committed to -current scsi_da.c:1.118 

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