From nobody@FreeBSD.org  Sat Apr 13 22:30:42 2002
Return-Path: <nobody@FreeBSD.org>
Received: from freefall.freebsd.org (freefall.FreeBSD.org [216.136.204.21])
	by hub.freebsd.org (Postfix) with ESMTP id 789E837B400
	for <freebsd-gnats-submit@FreeBSD.org>; Sat, 13 Apr 2002 22:30:41 -0700 (PDT)
Received: (from nobody@localhost)
	by freefall.freebsd.org (8.11.6/8.11.6) id g3E5Uf190301;
	Sat, 13 Apr 2002 22:30:41 -0700 (PDT)
	(envelope-from nobody)
Message-Id: <200204140530.g3E5Uf190301@freefall.freebsd.org>
Date: Sat, 13 Apr 2002 22:30:41 -0700 (PDT)
From: Sander van Zoest <sander-freebsd-pr@vanzoest.com>
To: freebsd-gnats-submit@FreeBSD.org
Subject: Quirk: ADS Tech Drive Kit 2.0 USB  DA_Q_NO_6_BYTE
X-Send-Pr-Version: www-1.0

>Number:         37052
>Category:       kern
>Synopsis:       Quirk: ADS Tech Drive Kit 2.0 USB  DA_Q_NO_6_BYTE
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    njl
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Sat Apr 13 22:40:00 PDT 2002
>Closed-Date:    Tue Oct 01 14:10:25 PDT 2002
>Last-Modified:  Tue Oct  1 14:20:01 PDT 2002
>Originator:     Sander van Zoest
>Release:        4.5-STABLE (Dated April 12th, 2002)
>Organization:
>Environment:
FreeBSD rietveld.vanzoest.com 4.5-STABLE-20020412 FreeBSD 4.5-STABLE-20020412 #2: Sat Apr 13 15:51:24 PDT 2002     sander@rietveld.vanzoest.com:/work/bsd/src/sys/compile/RIETVELD  i386  
>Description:
I recently bought the ADS Technologies USB Drive Kit 2.0,
<http://www.adstech.com/products/USB_2_Drivekit/specifications/USB2DriveKit_prodspec.asp?pid=USBX-804> which identifies itself as
umass0: DMI USB 2.0 Storage Adaptor, rev 2.00/10.10, addr 2

This kit allows you to take any ATA/IDE device and turn them into USB
2.0 devices. I plugged in a Maxtor DiamondMax Plus 60GB drive.

After plugging in the drive kit dmesg states the following:
%dmesg
<snip>
umass0: DMI USB 2.0 Storage Adaptor, rev 2.00/10.10, addr 2
umass0:0:0:-1: Attached to scbus0 as device 0
pass0 at umass-sim0 bus 0 target 0 lun 0
pass0: <MAXTOR 6 L060J3 A93.> Fixed Direct Access SCSI-0 device 
pass0: Serial Number \^_
pass0: 650KB/s transfers
da0 at umass-sim0 bus 0 target 0 lun 0
da0: <MAXTOR 6 L060J3 A93.> Fixed Direct Access SCSI-0 device 
da0: Serial Number \^_
da0: 650KB/s transfers
da0: 57259MB (117266688 512 byte sectors: 64H 32S/T 57259C)

% usbdevs -v
<snip>
Controller /dev/usb1:
addr 1: self powered, config 1, OHCI root hub(0x0000), NEC(0x0000), rev 0x0100
 port 1 addr 2: self powered, config 2, USB 2.0 Storage Adaptor(0xb001), DMI(0
x0c0b), rev 0x1010
 port 2 powered
% camcontrol devlist -v
scbus0 on umass-sim0 bus 0:
<MAXTOR 6 L060J3 A93.>             at scbus0 target 0 lun 0 (pass0,da0)
scbus-1 on xpt0 bus 0:
<  >                               at scbus-1 target -1 lun -1 (xpt0)



>How-To-Repeat:
After plugging in the drive kit and booting the machine, try to
mount the drive. You will receive the following error.

% mount_msdos /dev/da0s1 /mnt
da0s1: type 0xc, start 63, end = 117242369, size 117242307 : OK(da0:umass-sim0:0:0:0): READ(06). CDB: 8 0 0 3f 4 0
(da0:umass-sim0:0:0:0): ILLEGAL REQUEST asc:21,0             
(da0:umass-sim0:0:0:0): Logical block address out of range


>Fix:
Since this Drive Kit allows any IDE device to become a USB device, it
is not possible to key off of the Umass device info since this would
be the IDE device and not the Drive Kit.

To get the system to work as a temporary fix I matched my Maxtor drive
and added the quirk as follows:
--- scsi_da.c.orig      Sat Apr 13 15:21:18 2002
+++ scsi_da.c   Sat Apr 13 15:22:46 2002
@@ -269,6 +269,13 @@
                {T_DIRECT, SIP_MEDIA_FIXED, "Maxtor*", "D080H4*", "*"},
                /*quirks*/ DA_Q_NO_6_BYTE
        },
+    {
+               /*
+                * ADS Tech Drive Kit 2.0 with Maxtor Drive
+                * XXX: This Kit allows any drive!
+                */
+               {T_DIRECT, SIP_MEDIA_FIXED, "Maxtor*", "L060J3*", "*"},
+               /*quirks*/ DA_Q_NO_6_BYTE
+       },
        {
                {T_OPTICAL, SIP_MEDIA_REMOVABLE, "FUJITSU", "MCF3064AP", "*"},
                /*quirks*/ DA_Q_NO_6_BYTE

---
This patch allows me to mount the drive, although I do get the following
message error message.
da0s1: type 0xc, start 63, end = 117242369, size 117242307 : OK
(da0:umass-sim0:0:0:0): READ(6)/WRITE(6) failed, minimum_cmd_size is increased to 10.



>Release-Note:
>Audit-Trail:

From: Sander van Zoest <sander-freebsd-pr@vanzoest.com>
To: <FreeBSD-gnats-submit@FreeBSD.org>
Cc:  
Subject: Re: kern/37052: Quirk: ADS Tech Drive Kit 2.0 USB  DA_Q_NO_6_BYTE
Date: Sat, 13 Apr 2002 22:52:46 -0700 (PDT)

 > Since this Drive Kit allows any IDE device to become a USB device, it
 > is not possible to key off of the Umass device info since this would
 > be the IDE device and not the Drive Kit.
 
 I meant to say, you would *want* to match the umass device, not the
 da device.
 

From: Nate Lawson <nate@root.org>
To: freebsd-gnats-submit@FreeBSD.org, sander-freebsd-pr@vanzoest.com
Cc:  
Subject: Re: kern/37052: Quirk: ADS Tech Drive Kit 2.0 USB  DA_Q_NO_6_BYTE
Date: Thu, 15 Aug 2002 16:29:46 -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
 
State-Changed-From-To: open->feedback 
State-Changed-By: njl 
State-Changed-When: Tue Oct 1 13:48:13 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:48: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=37052 

From: Sander van Zoest <sander-freebsd-pr@vanzoest.com>
To: freebsd-gnats-submit@FreeBSD.org
Cc:  
Subject: Re: kern/37052: Quirk: ADS Tech Drive Kit 2.0 USB  DA_Q_NO_6_BYTE
Date: Tue, 1 Oct 2002 13:55:32 -0700 (PDT)

 Since the DA_Q_NO_6_BYTE Quirk now is tested and done on all USB devices,
 it makes this work for any new 4.6-STABLE machine I plug this drive kit
 into.
 
 I have only tested this once since then, so I assume this works accross
 the board, but haven't fully tested this yet.
 
 Thanks,
 
 --
 Sander van Zoest
 
State-Changed-From-To: feedback->closed 
State-Changed-By: njl 
State-Changed-When: Tue Oct 1 14:09:52 PDT 2002 
State-Changed-Why:  
The automatic cdb6->10 upgrade in scsi_da.c works for him. 

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

From: Nate Lawson <nate@root.org>
To: Sander van Zoest <sander-freebsd-pr@vanzoest.com>
Cc: freebsd-gnats-submit@FreeBSD.org
Subject: Re: kern/37052: Quirk: ADS Tech Drive Kit 2.0 USB  DA_Q_NO_6_BYTE
Date: Tue, 1 Oct 2002 14:03:02 -0700 (PDT)

 Yes, the cdb6->10 code is available in 4.6R and above so both -stable and
 -current have it.  I will close this PR since the quirk is not needed.  If
 your drive stops working in the future, please submit a new PR.
 
>Unformatted:
