From snl@cluefactory.com  Sat Feb  1 12:14:10 2003
Return-Path: <snl@cluefactory.com>
Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125])
	by hub.freebsd.org (Postfix) with ESMTP id 75E3B37B401
	for <FreeBSD-gnats-submit@freebsd.org>; Sat,  1 Feb 2003 12:14:10 -0800 (PST)
Received: from hawg.stalphonsos.com (hawg.stalphonsos.com [192.245.230.134])
	by mx1.FreeBSD.org (Postfix) with ESMTP id 731ED43F43
	for <FreeBSD-gnats-submit@freebsd.org>; Sat,  1 Feb 2003 12:14:09 -0800 (PST)
	(envelope-from snl@cluefactory.com)
Received: from stalphonsos.com (localhost [127.0.0.1])
	by hawg.stalphonsos.com (8.12.6/8.12.6) with ESMTP id h11KEIjd026286
	for <FreeBSD-gnats-submit@freebsd.org>; Sat, 1 Feb 2003 15:14:18 -0500 (EST)
	(envelope-from snl@cluefactory.com)
Message-Id: <200302012014.h11KEIjd026286@hawg.stalphonsos.com>
Date: Sat, 01 Feb 2003 15:14:18 EST
From: Sean Levy <snl@cluefactory.com>
Sender: Sean Levy <snl@cluefactory.com>
Reply-To: Sean Levy <snl@cluefactory.com>
To: undisclosed-recipients: ;
Subject: M-Systems USB Disk-on-key quirk for scsi_da.c
X-Send-Pr-Version: 3.113
X-GNATS-Notify: To: FreeBSD-gnats-submit@freebsd.org

>Number:         47793
>Category:       kern
>Synopsis:       M-Systems USB Disk-on-key quirk for scsi_da.c
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    njl
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          change-request
>Submitter-Id:   current-users
>Arrival-Date:   Sat Feb 01 12:20:11 PST 2003
>Closed-Date:    Sun Apr 27 13:38:35 PDT 2003
>Last-Modified:  Sun Apr 27 13:40:15 PDT 2003
>Originator:     Sean Levy
>Release:        FreeBSD 4.7-STABLE i386
>Organization:
the clue factory at St.Alphonsos
>Environment:
System: FreeBSD semantics.stalphonsos.com 4.7-STABLE FreeBSD 4.7-STABLE #2: Wed Jan 15 13:51:14 EST 2003 root@semantics.stalphonsos.com:/usr/obj/usr/src/sys/SEMANTICS i386


>Description:
	/usr/src/sys/cam/scsi/scsi_da.c needs a small patch to allow
	the M-Systems Disk-on-key USB drive to work properly.
>How-To-Repeat:
	Attach an M-Systems Disk-on-key and see that you get SCSI errors
	trying to use it.
>Fix:
	Apply the following patch to /usr/src/sys/cam/scsi/scsi_da.c

--- scsi_da.c.patch begins here ---
*** scsi_da.c	Wed Jan 15 12:40:06 2003
--- /root/scsi_da.c	Tue Jan 14 22:34:23 2003
***************
*** 399,404 ****
--- 399,411 ----
  		 */
  		{T_DIRECT, SIP_MEDIA_REMOVABLE, "HP", "USB CAMERA", "*"},
  		/*quirks*/ DA_Q_NO_6_BYTE
+ 	},
+ 	{
+ 		/*
+ 		 * M-Systems DiskOnKey
+ 		 */
+ 		{T_DIRECT, SIP_MEDIA_REMOVABLE, "M-Sys", "DiskOnKey", "*"},
+ 		/*quirks*/ DA_Q_NO_6_BYTE|DA_Q_NO_SYNC_CACHE
  	}
  };
  
--- scsi_da.c.patch ends here ---
>Release-Note:
>Audit-Trail:

From: Sean Levy <snl@cluefactory.com>
To: undisclosed-recipients: ;
Cc:  
Subject: kern/47793: M-Systems USB Disk-on-key quirk for scsi_da.c
Date: Sat, 01 Feb 2003 15:14:18 EST

 >Number:         47793
 >Category:       kern
 >Synopsis:       M-Systems USB Disk-on-key quirk for scsi_da.c
 >Confidential:   no
 >Severity:       non-critical
 >Priority:       low
 >Responsible:    freebsd-bugs
 >State:          open
 >Quarter:        
 >Keywords:       
 >Date-Required:
 >Class:          change-request
 >Submitter-Id:   current-users
 >Arrival-Date:   Sat Feb 01 12:20:11 PST 2003
 >Closed-Date:
 >Last-Modified:
 >Originator:     Sean Levy
 >Release:        FreeBSD 4.7-STABLE i386
 >Organization:
 the clue factory at St.Alphonsos
 >Environment:
 System: FreeBSD semantics.stalphonsos.com 4.7-STABLE FreeBSD 4.7-STABLE #2: Wed Jan 15 13:51:14 EST 2003 root@semantics.stalphonsos.com:/usr/obj/usr/src/sys/SEMANTICS i386
 
 
 >Description:
 	/usr/src/sys/cam/scsi/scsi_da.c needs a small patch to allow
 	the M-Systems Disk-on-key USB drive to work properly.
 >How-To-Repeat:
 	Attach an M-Systems Disk-on-key and see that you get SCSI errors
 	trying to use it.
 >Fix:
 	Apply the following patch to /usr/src/sys/cam/scsi/scsi_da.c
 
 --- scsi_da.c.patch begins here ---
 *** scsi_da.c	Wed Jan 15 12:40:06 2003
 --- /root/scsi_da.c	Tue Jan 14 22:34:23 2003
 ***************
 *** 399,404 ****
 --- 399,411 ----
   		 */
   		{T_DIRECT, SIP_MEDIA_REMOVABLE, "HP", "USB CAMERA", "*"},
   		/*quirks*/ DA_Q_NO_6_BYTE
 + 	},
 + 	{
 + 		/*
 + 		 * M-Systems DiskOnKey
 + 		 */
 + 		{T_DIRECT, SIP_MEDIA_REMOVABLE, "M-Sys", "DiskOnKey", "*"},
 + 		/*quirks*/ DA_Q_NO_6_BYTE|DA_Q_NO_SYNC_CACHE
   	}
   };
   
 --- scsi_da.c.patch ends here ---
 >Release-Note:
 >Audit-Trail:
 >Unformatted:
Responsible-Changed-From-To: freebsd-bugs->njl 
Responsible-Changed-By: johan 
Responsible-Changed-When: Sun Feb 2 11:34:46 PST 2003 
Responsible-Changed-Why:  
Over to quirks maintainer. 

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

From: Johan Karlsson <johan@FreeBSD.org>
To: FreeBSD-gnats-submit@freebsd.org, johan@FreeBSD.org,
	freebsd-bugs@FreeBSD.org, njl@FreeBSD.org
Cc:  
Subject: Re: kern/47793: M-Systems USB Disk-on-key quirk for scsi_da.c
Date: Sun, 2 Feb 2003 11:35:12 -0800 (PST)

 Synopsis: M-Systems USB Disk-on-key quirk for scsi_da.c
 
 Responsible-Changed-From-To: freebsd-bugs->njl
 Responsible-Changed-By: johan
 Responsible-Changed-When: Sun Feb 2 11:34:46 PST 2003
 Responsible-Changed-Why: 
 	Over to quirks maintainer.
 
 http://www.freebsd.org/cgi/query-pr.cgi?pr=47793
State-Changed-From-To: open->feedback 
State-Changed-By: njl 
State-Changed-When: Wed Feb 5 14:34:44 PST 2003 
State-Changed-Why:  

Please submit the requested information from: 
http://www.root.org/~nate/freebsd/quirks.html 
Especially try only the DA_Q_NO_6_BYTE quirk (leave off the SYNC_CACHE one) 
and report the dmesg output. 


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

From: Nate Lawson <njl@FreeBSD.org>
To: FreeBSD-gnats-submit@freebsd.org, snl@cluefactory.com,
	njl@FreeBSD.org, njl@FreeBSD.org
Cc:  
Subject: Re: kern/47793: M-Systems USB Disk-on-key quirk for scsi_da.c
Date: Wed, 5 Feb 2003 14:37:16 -0800 (PST)

 Synopsis: M-Systems USB Disk-on-key quirk for scsi_da.c
 
 State-Changed-From-To: open->feedback
 State-Changed-By: njl
 State-Changed-When: Wed Feb 5 14:34:44 PST 2003
 State-Changed-Why: 
 
 Please submit the requested information from:
    http://www.root.org/~nate/freebsd/quirks.html
 Especially try only the DA_Q_NO_6_BYTE quirk (leave off the SYNC_CACHE one)
 and report the dmesg output.
 
 
 http://www.freebsd.org/cgi/query-pr.cgi?pr=47793

From: Nate Lawson <nate@root.org>
To: Sean Levy <snl@cluefactory.com>
Cc: freebsd-gnats-submit@freebsd.org
Subject: Re: kern/47793
Date: Mon, 10 Mar 2003 17:59:02 -0800 (PST)

 It's been about a month since I asked for information about the device
 behavior without the SYNC_CACHE quirk.  Please respond.
 
 -Nate
 

From: Niels Jansen <nhjansen@xs4all.nl>
To: freebsd-gnats-submit@FreeBSD.org, snl@cluefactory.com
Cc: nate@root.org
Subject: Re: kern/47793: M-Systems USB Disk-on-key quirk for scsi_da.c
Date: Tue, 1 Apr 2003 00:40:15 +0200

 Hi,
 
 Hope i can help
 
 I found i indeed got scsi errors without the patch.
 
 First i tried it without the SYNC_CACHE quirk. Results were the following:
 
 dmesg:
 da0 at umass-sim0 bus 0 target 0 lun 0
 da0: <M-Sys DiskOnKey 3.04> Removable Direct Access SCSI-0 device 
 da0: 650KB/s transfers
 da0: 31MB (63616 512 byte sectors: 64H 32S/T 31C)
 
 while attaching:
 Mar 31 23:47:40 river /kernel: umass0: M-Sys DiskOnKey, rev 2.00/2.00, addr 3
 Mar 31 23:47:40 river /kernel: da0 at umass-sim0 bus 0 target 0 lun 0
 Mar 31 23:47:40 river /kernel: da0: <M-Sys DiskOnKey 3.04> Removable Direct Access SCSI-0 device 
 Mar 31 23:47:40 river /kernel: da0: 650KB/s transfers
 Mar 31 23:47:40 river /kernel: da0: 31MB (63616 512 byte sectors: 64H 32S/T 31C)
 
 while detaching:
 Mar 31 23:11:50 river /kernel: umass0: at uhub1 port 2 (addr 3) disconnected
 Mar 31 23:11:50 river /kernel: (da0:umass-sim0:0:0:0): lost device
 Mar 31 23:11:50 river /kernel: (da0:umass-sim0:0:0:0): removing device entry
 Mar 31 23:11:50 river /kernel: umass0: detached
 
 
 This seemed ok, untill i did some tests with it. Mouting, writing, reading
 was ok. Unmounting was not. I got the following error while unmounting:
 
 /var/log/messages:
 Mar 31 23:10:58 river /kernel: (da0:umass-sim0:0:0:0): Synchronize cache failed, status == 0x10, scsi status == 0x0
 
 After this, i applied the patch as suggested by Sean Levy. The dmesg output,
 output of attaching and the output of detaching remained the same. The
 error i got from unmounting the device disappeared.
 
 These tests were carried out on:
 FreeBSD river.xs4all.nl 4.7-RELEASE FreeBSD 4.7-RELEASE #3: Tue Apr  1 00:07:21 CEST 2003     root@river.xs4all.nl:/usr/obj/usr/src/sys/GENERIC  i386
 
 with a 32Mb M-Sys DISKonKEY P/N 85-SU-032B32A (http://www.diskonkey.com/).
 
 Please feel free to e-mail me if you need additional info/testing.
 
 Kind Regards,
 
 Niels Jansen.
 
 -- 
 Niels Jansen / river  <nhjansen@xs4all.nl>
 What if this is as good as it gets?
State-Changed-From-To: feedback->closed 
State-Changed-By: njl 
State-Changed-When: Sun Apr 27 13:33:39 PDT 2003 
State-Changed-Why:  

I am committing the quirk and will MFC it in 1 week.  I am leaving off the 
NO_SYNCHRONIZE_CACHE quirk since the error message you see is not harmful. 
If the drive hangs when detaching, it may be necessary but that doesn't 
seem to be the case. 

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

From: Nate Lawson <njl@FreeBSD.org>
To: FreeBSD-gnats-submit@freebsd.org, snl@cluefactory.com,
	njl@FreeBSD.org, njl@FreeBSD.org
Cc:  
Subject: Re: kern/47793: M-Systems USB Disk-on-key quirk for scsi_da.c
Date: Sun, 27 Apr 2003 13:38:34 -0700 (PDT)

 Synopsis: M-Systems USB Disk-on-key quirk for scsi_da.c
 
 State-Changed-From-To: feedback->closed
 State-Changed-By: njl
 State-Changed-When: Sun Apr 27 13:33:39 PDT 2003
 State-Changed-Why: 
 
 I am committing the quirk and will MFC it in 1 week.  I am leaving off the
 NO_SYNCHRONIZE_CACHE quirk since the error message you see is not harmful.
 If the drive hangs when detaching, it may be necessary but that doesn't
 seem to be the case.
 
 http://www.freebsd.org/cgi/query-pr.cgi?pr=47793
>Unformatted:
