From bharat@menalto.com  Tue Jun  4 01:14:18 2002
Return-Path: <bharat@menalto.com>
Received: from menalto.com (www.menalto.com [198.144.206.35])
	by hub.freebsd.org (Postfix) with ESMTP id 2CD3B37B440
	for <FreeBSD-gnats-submit@freebsd.org>; Tue,  4 Jun 2002 01:14:05 -0700 (PDT)
Received: from harmony.menalto.com (7cbky40r7mqo3v2k@harmony [127.0.0.1])
	by menalto.com (8.12.1/8.11.6) with ESMTP id g548Dvup062046
	for <FreeBSD-gnats-submit@freebsd.org>; Tue, 4 Jun 2002 01:13:57 -0700 (PDT)
	(envelope-from bharat@harmony.menalto.com)
Received: (from bharat@localhost)
	by harmony.menalto.com (8.12.1/8.12.1/Submit) id g548Dvwq062045;
	Tue, 4 Jun 2002 01:13:57 -0700 (PDT)
Message-Id: <200206040813.g548Dvwq062045@harmony.menalto.com>
Date: Tue, 4 Jun 2002 01:13:57 -0700 (PDT)
From: Bharat Mediratta <bharat@menalto.com>
Reply-To: Bharat Mediratta <bharat@menalto.com>
To: FreeBSD-gnats-submit@freebsd.org
Cc:
Subject: Maxtor 3000LE requires another sys/cam/scsi_da.c quirk 
X-Send-Pr-Version: 3.113
X-GNATS-Notify:

>Number:         38886
>Category:       kern
>Synopsis:       Maxtor 3000LE requires another sys/cam/scsi_da.c quirk
>Confidential:   no
>Severity:       non-critical
>Priority:       medium
>Responsible:    njl
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Tue Jun 04 01:20:01 PDT 2002
>Closed-Date:    Tue Oct 01 22:24:37 PDT 2002
>Last-Modified:  Tue Oct 01 22:24:37 PDT 2002
>Originator:     Bharat Mediratta
>Release:        FreeBSD 4.5-RELEASE-p6 i386
>Organization:
menalto.com 
>Environment:
System: FreeBSD unity.menalto.com 4.5-RELEASE-p6 FreeBSD 4.5-RELEASE-p6 #3: Tue Jun 4 00:45:50 P\
DT 2002 bharat@unity.menalto.com:/usr/obj/usr/src/sys/UNITY i386  
 
>Description:
 
        I have a Maxtor 3000LE USB drive attached to my box.  Drive 
        info (from /var/log/message after boot): 
 
                da1 at umass-sim0 bus 0 target 0 lun 0 
                da1: <Maxtor 4 G120J6 GAK8> Fixed Direct Access SCSI-0 device  
                da1: 650KB/s transfers 
                da1: 117246MB (240121728 512 byte sectors: 64H 32S/T 51710C) 
 
        (the 2nd line above contains less than and greater than signs, 
        and in case send-pr garbles it, the vender/product/version code 
        is "Maxtor 4 G120J6 GAK8") 
 
        When running fdisk on the drive I get this error: 
 
                (da1:umass-sim0:0:0:0): READ(06). CDB: 8 0 0 40 1 0  
                (da1:umass-sim0:0:0:0): ILLEGAL REQUEST asc:21,0 
                (da1:umass-sim0:0:0:0): Logical block address out of range 
 
        This looks to be the 6_BYTE problem.  There's already a quirk 
        in scsi_da.c for the Maxtor 3000LE, but they've come out with 
        a new drive that has a different product ID causing the 
        existing quirk not to match.  
 
>How-To-Repeat:
 
        1. Attach Maxtor 3000LE drive with product id "G120J6" to the USB bus 
        2. run /stand/sysinstall 
        3. select FDISK 
        4. Change partition info 
        5. Attempt to write new partition to disk 
 
>Fix:
 
        Apply this patch to /usr/src/sys/cam/scsi/scsi_da.c: 
 
265a266,272 
>       { 
>               /* 
>                * Another Maxtor 3000LE USB Drive 
>                */ 
>               {T_DIRECT, SIP_MEDIA_FIXED, "Maxtor*", "G120J6*", "*"}, 
>               /*quirks*/ DA_Q_NO_6_BYTE 
>       }, 
>Release-Note:
>Audit-Trail:

From: "Bharat Mediratta" <bharat@menalto.com>
To: <freebsd-gnats-submit@FreeBSD.org>, <bharat@menalto.com>
Cc:  
Subject: Re: kern/38886: Maxtor 3000LE requires another sys/cam/scsi_da.c quirk
Date: Tue, 4 Jun 2002 03:59:11 -0700

 The patch I submitted is off by one line and will cause a
 kernel panic!  That's what I get for trying to edit the patch
 by hand to beautify it.  Here's a unified diff that will
 work:
 
 --- scsi_da.c.orig      Tue Jun  4 00:57:26 2002
 +++ scsi_da.c   Tue Jun  4 02:55:11 2002
 @@ -263,6 +263,13 @@
                 /*quirks*/ DA_Q_NO_6_BYTE
         },
         {
 +               /*
 +                * Another Maxtor 3000LE USB Drive
 +                */
 +               {T_DIRECT, SIP_MEDIA_FIXED, "Maxtor*", "G120J6*", "*"},
 +               /*quirks*/ DA_Q_NO_6_BYTE
 +       },
 +       {
                 {T_OPTICAL, SIP_MEDIA_REMOVABLE, "FUJITSU", "MCF3064AP",
 "*"},
                 /*quirks*/ DA_Q_NO_6_BYTE
         },
 
 
State-Changed-From-To: open->feedback 
State-Changed-By: ken 
State-Changed-When: Tue Jun 4 08:40:25 PDT 2002 
State-Changed-Why:  

A fix went into -stable a couple of months ago to automatically detect 
devices that don't work properly with 6 byte commands. 

Can you update to a recent -stable and see if you can reproduce the 
problem? 


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

From: "Bharat Mediratta" <bharat@menalto.com>
To: <freebsd-gnats-submit@FreeBSD.org>, <bharat@menalto.com>
Cc:  
Subject: Re: kern/38886: Maxtor 3000LE requires another sys/cam/scsi_da.c quirk
Date: Tue, 4 Jun 2002 23:30:28 -0700

 I can't upgrade this box to -stable, it's slated to be a production 
 machine starting next week sometime.  However, if you point me at
 the fix, I'll try to incorporate just that code into my 4.6-RELEASE-p6
 box and see if it resolves the problem before this box goes live.
 
 

From: Nate Lawson <nate@root.org>
To: freebsd-gnats-submit@FreeBSD.org, bharat@menalto.com
Cc:  
Subject: Re: kern/38886: Maxtor 3000LE requires another sys/cam/scsi_da.c
 quirk
Date: Thu, 15 Aug 2002 16:39:28 -0700 (PDT)

 Please upgrade to 4.6R 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
 
Responsible-Changed-From-To: freebsd-bugs->njl 
Responsible-Changed-By: njl 
Responsible-Changed-When: Tue Oct 1 13:51:50 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=38886 

From: "Bharat Mediratta" <bharat@vasoftware.com>
To: <freebsd-gnats-submit@FreeBSD.org>, <bharat@menalto.com>
Cc:  
Subject: Re: kern/38886: Maxtor 3000LE requires another sys/cam/scsi_da.c quirk
Date: Tue, 1 Oct 2002 16:20:03 -0700

 I re-tested this on 4.6.2-RELEASE-p2 and can no longer reproduce the
 problem.  It's fixed as far as I can tell.
 
 -Bharat
 
 
State-Changed-From-To: feedback->closed 
State-Changed-By: njl 
State-Changed-When: Tue Oct 1 22:24:04 PDT 2002 
State-Changed-Why:  
User indicated in email that 4.6.2-RELEASE-p2 fixes the problem. 

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