From lx@redundancy.redundancy.org  Mon Jul 21 19:31:44 2003
Return-Path: <lx@redundancy.redundancy.org>
Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125])
	by hub.freebsd.org (Postfix) with ESMTP id 3CC3F37B401
	for <FreeBSD-gnats-submit@freebsd.org>; Mon, 21 Jul 2003 19:31:44 -0700 (PDT)
Received: from redundancy.redundancy.org (redundancy.redundancy.org [198.144.201.242])
	by mx1.FreeBSD.org (Postfix) with SMTP id 7B6A943F85
	for <FreeBSD-gnats-submit@freebsd.org>; Mon, 21 Jul 2003 19:31:43 -0700 (PDT)
	(envelope-from lx@redundancy.redundancy.org)
Received: (qmail 64642 invoked by uid 0); 22 Jul 2003 02:32:07 -0000
Received: from sartre.redundancy.org (198.144.201.244)
  by 0 with SMTP; 22 Jul 2003 02:32:07 -0000
Received: from sartre.redundancy.org (localhost [127.0.0.1])
	by sartre.redundancy.org (8.12.9/8.12.9) with ESMTP id h6M2VNb3002508
	for <FreeBSD-gnats-submit@freebsd.org>; Mon, 21 Jul 2003 19:31:23 -0700 (PDT)
	(envelope-from lx@sartre.redundancy.org)
Received: (from lx@localhost)
	by sartre.redundancy.org (8.12.9/8.12.9/Submit) id h6M2VMcN002507;
	Mon, 21 Jul 2003 19:31:22 -0700 (PDT)
Message-Id: <200307220231.h6M2VMcN002507@sartre.redundancy.org>
Date: Mon, 21 Jul 2003 19:31:22 -0700 (PDT)
From: David Thiel <lx@redundancy.redundancy.org>
Reply-To:
To: FreeBSD-gnats-submit@freebsd.org
Cc:
Subject: QUIRK: Jungsoft Nexdisk USB key
X-Send-Pr-Version: 3.113
X-GNATS-Notify:

>Number:         54737
>Category:       kern
>Synopsis:       QUIRK: Jungsoft Nexdisk USB key
>Confidential:   no
>Severity:       non-critical
>Priority:       medium
>Responsible:    njl
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Mon Jul 21 19:40:12 PDT 2003
>Closed-Date:    Thu Aug 21 22:59:37 PDT 2003
>Last-Modified:  Thu Aug 21 22:59:37 PDT 2003
>Originator:     David Thiel
>Release:        FreeBSD 5.1-CURRENT i386
>Organization:
>Environment:
System: FreeBSD sartre.redundancy.org 5.1-CURRENT FreeBSD 5.1-CURRENT #14: Mon Jul 21 01:50:51 PDT 2003 lx@sartre.redundancy.org:/usr/obj/usr/src/sys/SARTRE i386


>Description:

	Jungsoft Nexdisk keys do not support syncache.

>How-To-Repeat:

	The errors are seen on attach.

>Fix:

--- scsi_da.c.old       Mon Jul 21 19:26:16 2003
+++ scsi_da.c   Mon Jul 21 01:25:24 2003
@@ -511,6 +511,13 @@
        },
        {
                /*
+                * JungSoft NexDisk Flash Key
+                */
+               {T_DIRECT, SIP_MEDIA_REMOVABLE, "JUNGSOFT*", "NEXDISK*", "*"},
+               /*quirks*/ DA_Q_NO_SYNC_CACHE
+       },
+       {
+               /*
                 * OTi USB Flash Key
                 * PR: kern/51825
                 */


Info requested by quirk guidelines:

# Output of "camcontrol inquiry yourdevice"
pass1: <JUNGSOFT NEXDISK 1.00> Removable Direct Access SCSI-0 device
pass1: Serial Number ^_
pass1: 1.000MB/s transfers

# Manufacturer name, model number, etc.
Jungsoft Nexdisk, 64M version.

# Transport type (FC, SCSI, USB, Firewire)
USB 1.0

# Output from dmesg for failed attach attempts
cd0: Attempt to query device size failed: NOT READY, Medium not present
da0 at umass-sim0 bus 0 target 0 lun 0
da0: <JUNGSOFT NEXDISK 1.00> Removable Direct Access SCSI-0 device 
da0: 1.000MB/s transfers
da0: 63MB (129280 512 byte sectors: 64H 32S/T 63C)
umass0: Phase Error, residue = 0
(da0:umass-sim0:0:0:0): Synchronize cache failed, status == 0x4, scsi status == 0x0
Opened disk da0 -> 5
Opened disk da0 -> 5
Opened disk da0 -> 5
Opened disk da0 -> 5

# Output from dmesg for successful attach attempts (after quirk added)
da0 at umass-sim0 bus 0 target 0 lun 0
da0: <JUNGSOFT NEXDISK 1.00> Removable Direct Access SCSI-0 device 
da0: 1.000MB/s transfers
da0: 63MB (129280 512 byte sectors: 64H 32S/T 63C)

# Output of "usbdevs -v" with device attached
Controller /dev/usb0:
addr 1: full speed, self powered, config 1, UHCI root hub(0x0000), Intel(0x0000), rev 1.00
 port 1 addr 2: full speed, power 100 mA, config 1, NEXDISK(0x8001), JUNGSOFT Co.,Ltd(0x09a6), rev 1.00
 port 2 powered

# Valid email address
lx@redundancy.redundancy.org

>Release-Note:
>Audit-Trail:

From: David Thiel <lx@redundancy.redundancy.org>
To: freebsd-gnats-submit@FreeBSD.org
Cc:  
Subject: Re: kern/54737: QUIRK: Jungsoft Nexdisk USB key
Date: Wed, 30 Jul 2003 19:23:47 -0700

 Note: The recent umass commits and de-quirking do not fix this issue.
 
Responsible-Changed-From-To: freebsd-bugs->njl 
Responsible-Changed-By: mdodd 
Responsible-Changed-When: Fri Aug 8 19:19:54 PDT 2003 
Responsible-Changed-Why:  
USB quirk problems requested. 

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

From: Dax Eckenberg <daxbert@dweebsoft.com>
To: freebsd-gnats-submit@FreeBSD.org, lx@redundancy.redundancy.org
Cc:  
Subject: Re: kern/54737: QUIRK: Jungsoft Nexdisk USB key
Date: Sat, 09 Aug 2003 23:37:01 -0700

 Using JUNGSOFTNEXTDISK and NEXTDISK w/o '*',
 I was able to mount the mass storage device.
 

From: David Thiel <lx@redundancy.redundancy.org>
To: Dax Eckenberg <daxbert@dweebsoft.com>
Cc: freebsd-gnats-submit@FreeBSD.org
Subject: Re: kern/54737: QUIRK: Jungsoft Nexdisk USB key
Date: Sun, 10 Aug 2003 01:59:29 -0700

 On Sat, Aug 09, 2003 at 11:37:01PM -0700, Dax Eckenberg wrote:
 > Using JUNGSOFTNEXTDISK and NEXTDISK w/o '*',
 > I was able to mount the mass storage device.
 
 That's odd - I tried doing it without the *, but was unable to 
 get it to go. Are you actually using "NEXTDISK" and not "NEXDISK"?
 How did you determine that was the correct name to use? When it's
 picked up as da0, I see:
 
 <JUNGSOFT NEXDISK 1.00>
 
 And the actual name of the product is "Nexdisk". Then again, this is
 from a company that actually manages to misspell their own name as
 "Jugsoft" on their website.
 
 Cheers,
 David
 

From: Daxbert <daxbert@dweebsoft.com>
To: David Thiel <lx@redundancy.redundancy.org>
Cc: "" <freebsd-gnats-submit@FreeBSD.org>
Subject: Re: kern/54737: QUIRK: Jungsoft Nexdisk USB key
Date: Sun, 10 Aug 2003 02:20:44 -0700

 Sorry... late night typo...
 
 NEXDISK... not NEXTDISK.
 
 However, I need to do some further checking.  I'm running 5.1-RELEASE, and made
 the quirk change to scsi_da.c.   
 
 I built and installed the kernel, and was able to mount, copy files, and unmount
 the device as msdosfs.  
 
 However, after building "world" it now fails with 3 sync errors printed in
 series.  I'm going to roll back to the 5.1 CD release, make the change (again),
 and see if I'm able to properly mount/unmount the device.
 
 Dax
 
 Quoting David Thiel <lx@redundancy.redundancy.org>:
 
 > On Sat, Aug 09, 2003 at 11:37:01PM -0700, Dax Eckenberg wrote:
 > > Using JUNGSOFTNEXTDISK and NEXTDISK w/o '*',
 > > I was able to mount the mass storage device.
 > 
 > That's odd - I tried doing it without the *, but was unable to 
 > get it to go. Are you actually using "NEXTDISK" and not "NEXDISK"?
 > How did you determine that was the correct name to use? When it's
 > picked up as da0, I see:
 > 
 > <JUNGSOFT NEXDISK 1.00>
 > 
 > And the actual name of the product is "Nexdisk". Then again, this is
 > from a company that actually manages to misspell their own name as
 > "Jugsoft" on their website.
 > 
 > Cheers,
 > David
 > 
 > 
 
 

From: Daxbert <daxbert@dweebsoft.com>
To: David Thiel <lx@redundancy.redundancy.org>
Cc: "" <freebsd-gnats-submit@FreeBSD.org>
Subject: Re: kern/54737: QUIRK: Jungsoft Nexdisk USB key
Date: Sun, 10 Aug 2003 04:01:58 -0700

 David-
 
         {
                 /*
                  * Jungsoft Nexdisk
                  */
                 {T_DIRECT, SIP_MEDIA_REMOVABLE, "JUNGSOFT*", "NEX*", "*"},
                 /*quirks*/ DA_Q_NO_SYNC_CACHE
         },
 
 
 I've tried the above code, and compiled twice, and rebooted many times, and this
 seems to have "solved" the problem.  If you specify the full name
 JUNGSOFTNEXDISK and NEXDISK, it fails for some reason.   However, the device
 still seems quite slow.  It works.. but writes seem quite slow.
 
 Note: The full names fail because the DA_Q_NO_SYNC_CACHE quirk is never applied.
 The routine which performs the matching, doesn't seem to match when the full
 names are specified.
 
 
 Dax
 
 
 Quoting David Thiel <lx@redundancy.redundancy.org>:
 
 > On Sat, Aug 09, 2003 at 11:37:01PM -0700, Dax Eckenberg wrote:
 > > Using JUNGSOFTNEXTDISK and NEXTDISK w/o '*',
 > > I was able to mount the mass storage device.
 > 
 > That's odd - I tried doing it without the *, but was unable to 
 > get it to go. Are you actually using "NEXTDISK" and not "NEXDISK"?
 > How did you determine that was the correct name to use? When it's
 > picked up as da0, I see:
 > 
 > <JUNGSOFT NEXDISK 1.00>
 > 
 > And the actual name of the product is "Nexdisk". Then again, this is
 > from a company that actually manages to misspell their own name as
 > "Jugsoft" on their website.
 > 
 > Cheers,
 > David
 > 
 > 
 
 

From: David Thiel <lx@redundancy.redundancy.org>
To: Daxbert <daxbert@dweebsoft.com>
Cc: freebsd-gnats-submit@FreeBSD.org
Subject: Re: kern/54737: QUIRK: Jungsoft Nexdisk USB key
Date: Sun, 10 Aug 2003 14:10:03 -0700

 Ok, then we can verify that the quirk works on -current and -release.
 I had seen the same odd matching behavior, and after about 10 tries in
 various ways, I saw that some of the other quirks did the same thing,
 and just used the '*'s. The performance for me is a little under 1MB/s,
 which seems acceptable for a USB1 flash key.
 

From: Nate Lawson <nate@root.org>
To: David Thiel <lx@redundancy.redundancy.org>,
	Daxbert <daxbert@dweebsoft.com>
Cc: freebsd-gnats-submit@freebsd.org
Subject: Re: kern/54737
Date: Wed, 13 Aug 2003 13:52:35 -0700 (PDT)

 Please try the following.  If it works, I'll commit it.  I'm not convinced
 the *'s are needed.  If this doesn't work, try adding one * after the
 vendor name and if it still doesn't work, delete that and add one after
 the product.  I want to know EXACTLY which one it is.
 
 Thanks,
 Nate
 
 
   {
         /*
          * Jungsoft Nexdisk
          */
         {T_DIRECT, SIP_MEDIA_REMOVABLE, "JUNGSOFT", "NEXDISK", "*"},
                  /*quirks*/ DA_Q_NO_SYNC_CACHE
         },
   }
 

From: David Thiel <lx@redundancy.redundancy.org>
To: Nate Lawson <nate@root.org>
Cc: Daxbert <daxbert@dweebsoft.com>, freebsd-gnats-submit@freebsd.org
Subject: Re: kern/54737
Date: Wed, 13 Aug 2003 16:33:59 -0700

 {T_DIRECT, SIP_MEDIA_REMOVABLE, "JUNGSOFT", "NEXDISK", "*"},
 {T_DIRECT, SIP_MEDIA_REMOVABLE, "JUNGSOFT*", "NEXDISK", "*"},
 
 Those two don't work.
 
 {T_DIRECT, SIP_MEDIA_REMOVABLE, "JUNGSOFT", "NEXDISK*", "*"},
 
 This does.
 
State-Changed-From-To: open->closed 
State-Changed-By: njl 
State-Changed-When: Thu Aug 21 22:59:22 PDT 2003 
State-Changed-Why:  
The patch has been committed and will be mfcd in 3 days. 

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