From wkb@freebie.xs4all.nl  Sun Aug 25 06:01:13 2002
Return-Path: <wkb@freebie.xs4all.nl>
Received: from mx1.FreeBSD.org (mx1.FreeBSD.org [216.136.204.125])
	by hub.freebsd.org (Postfix) with ESMTP id E6C4137B400
	for <FreeBSD-gnats-submit@FreeBSD.org>; Sun, 25 Aug 2002 06:01:12 -0700 (PDT)
Received: from freebie.xs4all.nl (freebie.xs4all.nl [213.84.32.253])
	by mx1.FreeBSD.org (Postfix) with ESMTP id 0602543E4A
	for <FreeBSD-gnats-submit@FreeBSD.org>; Sun, 25 Aug 2002 06:01:11 -0700 (PDT)
	(envelope-from wkb@freebie.xs4all.nl)
Received: from freebie.xs4all.nl (localhost [127.0.0.1])
	by freebie.xs4all.nl (8.12.5/8.12.2) with ESMTP id g7PD19DX000366
	for <FreeBSD-gnats-submit@FreeBSD.org>; Sun, 25 Aug 2002 15:01:10 +0200 (CEST)
	(envelope-from wkb@freebie.xs4all.nl)
Received: (from wkb@localhost)
	by freebie.xs4all.nl (8.12.5/8.12.5/Submit) id g7PD19uT000365;
	Sun, 25 Aug 2002 15:01:09 +0200 (CEST)
Message-Id: <200208251301.g7PD19uT000365@freebie.xs4all.nl>
Date: Sun, 25 Aug 2002 15:01:09 +0200 (CEST)
From: wilko@FreeBSD.org
Reply-To: wilko@FreeBSD.org
To: FreeBSD-gnats-submit@FreeBSD.org
Subject: PATCH: Quirk entry for scsi_da.c for USB pen drive
X-Send-Pr-Version: 3.2

>Number:         41997
>Category:       kern
>Synopsis:       Quirk entry for scsi_da.c for USB pen drive
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    njl
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Sun Aug 25 06:10:01 PDT 2002
>Closed-Date:    Wed Oct 02 14:30:31 PDT 2002
>Last-Modified:  Wed Oct 02 14:30:31 PDT 2002
>Originator:     Wilko Bulte
>Release:        FreeBSD 4-STABLE i386
>Organization:
Private FreeBSD site - The Netherlands
>Environment:

USB equipped FreeBSD machine. HP promotional 16MB USB pen drive
as given out on tradeshows 

FreeBSD freebie.xs4all.nl 4.6-STABLE FreeBSD 4.6-STABLE #3: Sun Aug
25 14:34:39 CEST 2002

>Description:

Without quirk entry the kernel cannot access the USB pen drive asin:

Aug 25 14:12:35 freebie /kernel: umass0: BBB reset failed, TIMEOUT
Aug 25 14:12:40 freebie /kernel: umass0: BBB bulk-in clear stall failed,
TIMEOUT
Aug 25 14:12:45 freebie /kernel: umass0: BBB bulk-out clear stall failed,
TIMEOU
T
Aug 25 14:12:55 freebie /kernel: umass0: BBB reset failed, TIMEOUT
Aug 25 14:13:00 freebie /kernel: umass0: BBB bulk-in clear stall failed,
TIMEOUT
Aug 25 14:13:05 freebie /kernel: umass0: BBB bulk-out clear stall failed,
TIMEOU
T

>How-To-Repeat:

See above

>Fix:

Note that this device does not seem to have a Vendor ID.

--- scsi_da.c.orig	Wed Jul 24 19:38:15 2002
+++ scsi_da.c	Sun Aug 25 14:30:34 2002
@@ -373,7 +373,14 @@
 		 */
 		{T_DIRECT, SIP_MEDIA_REMOVABLE, "Digital", "World   DMC","*"},
 		/*quirks*/ DA_Q_NO_6_BYTE
-	}
+	},
+        {
+		/*
+		 * HP promotional 16MB pen drive
+		 */
+		{T_DIRECT, SIP_MEDIA_REMOVABLE, "*", "USB DISK*", "*"},
+		/*quirks*/ DA_Q_NO_6_BYTE|DA_Q_NO_SYNC_CACHE
+ 	}
 };
 
 static	d_open_t	daopen;
--- scsi_da.c.orig	Wed Jul 24 19:38:15 2002
+++ scsi_da.c	Sun Aug 25 14:30:34 2002
@@ -373,7 +373,14 @@
 		 */
 		{T_DIRECT, SIP_MEDIA_REMOVABLE, "Digital", "World   DMC","*"},
 		/*quirks*/ DA_Q_NO_6_BYTE
-	}
+	},
+        {
+		/*
+		 * HP promotional 16MB pen drive
+		 */
+		{T_DIRECT, SIP_MEDIA_REMOVABLE, "*", "USB DISK*", "*"},
+		/*quirks*/ DA_Q_NO_6_BYTE|DA_Q_NO_SYNC_CACHE
+ 	}
 };
 
 static	d_open_t	daopen;
>Release-Note:
>Audit-Trail:
Responsible-Changed-From-To: freebsd-bugs->scsi 
Responsible-Changed-By: wilko 
Responsible-Changed-When: Mon Sep 2 11:07:49 PDT 2002 
Responsible-Changed-Why:  
Follow new tradition to assign this to -scsi 


http://www.freebsd.org/cgi/query-pr.cgi?pr=41997 
State-Changed-From-To: open->feedback 
State-Changed-By: njl 
State-Changed-When: Tue Oct 1 13:54:13 PDT 2002 
State-Changed-Why:  
Please let us know if the drive works with 4.6.2R or -stable/-current 
without the quirk. 


Responsible-Changed-From-To: scsi->njl 
Responsible-Changed-By: njl 
Responsible-Changed-When: Tue Oct 1 13:54:13 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=41997 
State-Changed-From-To: feedback->closed 
State-Changed-By: njl 
State-Changed-When: Wed Oct 2 14:29:04 PDT 2002 
State-Changed-Why:  
Reporter claims later versions of 4-STABLE fix this for him: 
--- 
Using  

FreeBSD freebie.xs4all.nl 4.7-RC FreeBSD 4.7-RC #1: Wed Oct  2 01:35:48 CEST 
2002     root@freebie.xs4all.nl:/usr/obj/usr/src/sys/FREEBIE  i386 

seems to work well without the quirk entry. As in: 

cd0: Attempt to query device size failed: NOT READY, Medium not present 
umass0:   USB Disk    , rev 1.10/1.00, addr 2 
da3 at umass-sim0 bus 0 target 0 lun 0 
da3: < USB DISK 2.02> Removable Direct Access SCSI-0 device  
da3: 650KB/s transfers 
da3: 15MB (32000 512 byte sectors: 64H 32S/T 15C) 
da3s1: slice starts beyond end of the disk: rejecting it 

tnx 


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