From kunia@lucky.net  Wed Oct  2 03:13:52 2002
Return-Path: <kunia@lucky.net>
Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125])
	by hub.freebsd.org (Postfix) with ESMTP id C0A8F37B401
	for <FreeBSD-gnats-submit@freebsd.org>; Wed,  2 Oct 2002 03:13:52 -0700 (PDT)
Received: from burka.carrier.kiev.ua (burka.carrier.kiev.ua [193.193.193.107])
	by mx1.FreeBSD.org (Postfix) with ESMTP id C542A43E42
	for <FreeBSD-gnats-submit@freebsd.org>; Wed,  2 Oct 2002 03:13:46 -0700 (PDT)
	(envelope-from kunia@lucky.net)
Received: from kunia@localhost (kunia@localhost)
	by burka.carrier.kiev.ua  id g92ADhB46334;
	Wed, 2 Oct 2002 13:13:43 +0300 (EEST)
	(envelope-from kunia)
Message-Id: <200210021013.g92ADhB46334@burka.carrier.kiev.ua>
Date: Wed, 2 Oct 2002 13:13:43 +0300 (EEST)
From: Olexander Kunytsa <kunia@lucky.net>
Reply-To: Olexander Kunytsa <kunia@istc.kiev.ua>
To: FreeBSD-gnats-submit@freebsd.org
Cc:
Subject: QUIRK: PhotoClip USB Camera
X-Send-Pr-Version: 3.113
X-GNATS-Notify:

>Number:         43580
>Category:       kern
>Synopsis:       QUIRK: PhotoClip USB Camera
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    njl
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          change-request
>Submitter-Id:   current-users
>Arrival-Date:   Wed Oct 02 03:20:01 PDT 2002
>Closed-Date:    Sun Apr 18 20:42:29 PDT 2004
>Last-Modified:  Sun Apr 18 20:42:29 PDT 2004
>Originator:     Olexander Kunytsa
>Release:        FreeBSD 4.7-RC i386
>Organization:
XTC
>Environment:
FreeBSD bison.carrier.kiev.ua 4.7-RC FreeBSD 4.7-RC #2: Mon Sep 30 16:17:20 EEST 2002     root@bison.carrier.kiev.ua:/usr/obj/usr/src/sys/bison  i386


11:58 [root@bison] ~# camcontrol inquiry da1
pass1: <ZORAN COACH 1.00> Removable Direct Access SCSI-0 device
pass1: Serial Number
pass1: 150KB/s transfers

Daisy Technology - Digital Still Camera 'PhotoClip' on Zoran Chip,
model Phc6032 (prob. later models, I'll try to get them) 
UMASS device, over ATAPI protocol, 

umass0: ZORAN COACH DSC, rev 1.00/1.00, addr 2
da1 at umass-sim0 bus 0 target 0 lun 0
da1: <ZORAN COACH 1.00> Removable Direct Access SCSI-0 device
da1: 150KB/s transfers
da1: 31MB (64800 512 byte sectors: 0H 0S/T 0C)

>Description:
while trying to read from device ( e.g. 'hd /dev/da1'):
umass0: Unsupported ATAPI command 0x08, 6 byte command should have been converte
d
da1: reading primary partition table: error reading fsbn 0
umass0: Unsupported ATAPI command 0x35
(da1:umass-sim0:0:0:0): Synchronize cache failed, status == 0x6, scsi status ==
0x0

After aplying the patch it can be mounted.

umass0: ZORAN COACH DSC, rev 1.00/1.00, addr 2
da1 at umass-sim0 bus 0 target 0 lun 0
da1: <ZORAN COACH 1.00> Removable Direct Access SCSI-0 device
da1: 150KB/s transfers
da1: 31MB (64800 512 byte sectors: 0H 0S/T 0C)
13:09 [kunia@bison:p0]:~> df /mnt/
Filesystem 1K-blocks Used Avail Capacity  Mounted on
/dev/da1s1     32272 8134 24138    25%    /mnt


>How-To-Repeat:
>Fix:

--- src/sys/cam/scsi/scsi_da.c.orig     Wed Oct  2 12:29:01 2002
+++ src/sys/cam/scsi/scsi_da.c  Wed Oct  2 12:31:00 2002
@@ -373,6 +373,13 @@
                 */
                {T_DIRECT, SIP_MEDIA_REMOVABLE, "Digital", "World   DMC","*"},
                /*quirks*/ DA_Q_NO_6_BYTE
+       },
+       {
+               /*
+                * Daisy Technology PhotoClip on Zoran Chip
+                */
+               {T_DIRECT, SIP_MEDIA_REMOVABLE, "ZORAN", "COACH", "*"},
+               /*quirks*/ DA_Q_NO_6_BYTE|DA_Q_NO_SYNC_CACHE
        }
 };



>Release-Note:
>Audit-Trail:

From: "Kenneth D. Merry" <ken@kdm.org>
To: Olexander Kunytsa <kunia@istc.kiev.ua>
Cc: FreeBSD-gnats-submit@FreeBSD.ORG
Subject: Re: kern/43580: QUIRK: PhotoClip USB Camera
Date: Wed, 2 Oct 2002 16:18:05 -0600

 On Wed, Oct 02, 2002 at 13:13:43 +0300, Olexander Kunytsa wrote:
 > 11:58 [root@bison] ~# camcontrol inquiry da1
 > pass1: <ZORAN COACH 1.00> Removable Direct Access SCSI-0 device
 > pass1: Serial Number
 > pass1: 150KB/s transfers
 > 
 > Daisy Technology - Digital Still Camera 'PhotoClip' on Zoran Chip,
 > model Phc6032 (prob. later models, I'll try to get them) 
 > UMASS device, over ATAPI protocol, 
 > 
 > umass0: ZORAN COACH DSC, rev 1.00/1.00, addr 2
 > da1 at umass-sim0 bus 0 target 0 lun 0
 > da1: <ZORAN COACH 1.00> Removable Direct Access SCSI-0 device
 > da1: 150KB/s transfers
 > da1: 31MB (64800 512 byte sectors: 0H 0S/T 0C)
 > 
 > >Description:
 > while trying to read from device ( e.g. 'hd /dev/da1'):
 > umass0: Unsupported ATAPI command 0x08, 6 byte command should have been converte
 > d
 > da1: reading primary partition table: error reading fsbn 0
 > umass0: Unsupported ATAPI command 0x35
 > (da1:umass-sim0:0:0:0): Synchronize cache failed, status == 0x6, scsi status ==
 > 0x0
 > 
 > After aplying the patch it can be mounted.
 > 
 > umass0: ZORAN COACH DSC, rev 1.00/1.00, addr 2
 > da1 at umass-sim0 bus 0 target 0 lun 0
 > da1: <ZORAN COACH 1.00> Removable Direct Access SCSI-0 device
 > da1: 150KB/s transfers
 > da1: 31MB (64800 512 byte sectors: 0H 0S/T 0C)
 > 13:09 [kunia@bison:p0]:~> df /mnt/
 > Filesystem 1K-blocks Used Avail Capacity  Mounted on
 > /dev/da1s1     32272 8134 24138    25%    /mnt
 
 So can the filesystem be mounted without the patch?
 
 The 6/10 byte autodetection code should switch to 10 byte CDBs after the
 first failure.
 
 If it isn't switching, we've probably got a problem.
 
 The synchronize cache command failure may be irritating, but shouldn't be
 fatal.
 
 Ken
 -- 
 Kenneth Merry
 ken@kdm.org
Responsible-Changed-From-To: freebsd-bugs->njl 
Responsible-Changed-By: njl 
Responsible-Changed-When: Thu Oct 17 10:18:43 PDT 2002 
Responsible-Changed-Why:  
quirk maintainer 

http://www.freebsd.org/cgi/query-pr.cgi?pr=43580 
State-Changed-From-To: open->closed 
State-Changed-By: njl 
State-Changed-When: Wed Oct 30 22:55:51 PST 2002 
State-Changed-Why:  
MFC version 1.42.2.27 

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

From: Olexander Kunytsa <kunia@istc.kiev.ua>
To: "Kenneth D. Merry" <ken@kdm.org>
Cc: <FreeBSD-gnats-submit@FreeBSD.org>, <njl@FreeBSD.org>
Subject: Re: kern/43580: QUIRK: PhotoClip USB Camera
Date: Mon, 4 Nov 2002 23:20:29 +0200 (EET)

 > So can the filesystem be mounted without the patch?
 
 NO:(
 No dump, no mount
 
 
 > The 6/10 byte autodetection code should switch to 10 byte CDBs after
 > the first failure.
 AFIAR, it worked at the beginning ( I mean then the code firstly appeared)
 But than, and now - i cant
 
 > If it isn't switching, we've probably got a problem.
 yeah
 
 > The synchronize cache command failure may be irritating, but shouldn't
 > be fatal.
 > Ken
 
 
 And I've mistaken in patch:(
 
 please apply this patch to correct mistake, otherwise it has no use:
 
 --- scsi_da.c.old	Mon Nov  4 23:12:47 2002
 +++ scsi_da.c	Mon Nov  4 23:13:05 2002
 @@ -387,7 +387,7 @@
  		 * Daisy Technology PhotoClip on Zoran chip
  		 * PR: kern/43580
  		 */
 -		{T_DIRECT, SIP_MEDIA_REMOVABLE, "ZORAN", "COACH DSC", "*"},
 +		{T_DIRECT, SIP_MEDIA_REMOVABLE, "ZORAN", "COACH", "*"},
  		/*quirks*/ DA_Q_NO_6_BYTE|DA_Q_NO_SYNC_CACHE
  	}
  };
 
 
 
 /Olexander
 

From: Olexander Kunytsa <kunia@zoe.istc.kiev.ua>
To: freebsd-gnats-submit@FreeBSD.org, kunia@istc.kiev.ua
Cc: ken@kdm.org
Subject: Re: kern/43580: QUIRK: PhotoClip USB Camera
Date: Mon, 4 Nov 2002 23:33:57 +0200 (EET)

 >
 >   Fix
 >          
 >--- src/sys/cam/scsi/scsi_da.c.orig     Wed Oct  2 12:29:01 2002
 >+++ src/sys/cam/scsi/scsi_da.c  Wed Oct  2 12:31:00 2002
 >@@ -373,6 +373,13 @@
 >                 */
 >                {T_DIRECT, SIP_MEDIA_REMOVABLE, "Digital", "World   DMC","*"},
 >                /*quirks*/ DA_Q_NO_6_BYTE
 >+       },
 >+       {
 >+               /*
 >+                * Daisy Technology PhotoClip on Zoran Chip
 >+                */
 >+               {T_DIRECT, SIP_MEDIA_REMOVABLE, "ZORAN", "COACH", "*"},
 >+               /*quirks*/ DA_Q_NO_6_BYTE|DA_Q_NO_SYNC_CACHE
 >        }
 > };
 >
 
 The patch should be corrected:
 
 --- scsi_da.c.old       Mon Nov  4 23:12:47 2002
 +++ scsi_da.c   Mon Nov  4 23:13:05 2002
 @@ -387,7 +387,7 @@
                  * Daisy Technology PhotoClip on Zoran chip
                  * PR: kern/43580
                  */
 -               {T_DIRECT, SIP_MEDIA_REMOVABLE, "ZORAN", "COACH DSC", "*"},
 +               {T_DIRECT, SIP_MEDIA_REMOVABLE, "ZORAN", "COACH", "*"},
                 /*quirks*/ DA_Q_NO_6_BYTE|DA_Q_NO_SYNC_CACHE
         }
  };
 
 
 
 >
 >   Audit-Trail
 >          
 >From: "Kenneth D. Merry" <ken@kdm.org>
 >To: Olexander Kunytsa <kunia@istc.kiev.ua>
 >Cc: FreeBSD-gnats-submit@FreeBSD.ORG
 >Subject: Re: kern/43580: QUIRK: PhotoClip USB Camera
 >Date: Wed, 2 Oct 2002 16:18:05 -0600
 >
 >
 > So can the filesystem be mounted without the patch?
 
 NO:(
 No dump, no mount
 
 >
 > The 6/10 byte autodetection code should switch to 10 byte CDBs after the
 > first failure.
 AFIAR, it worked at the beginning ( I mean then the code firstly appeared)
 But than, and now - it cant 
 
 > If it isn't switching, we've probably got a problem.
 seems to be truth
 
 > The synchronize cache command failure may be irritating, but shouldn't be
 > fatal.
 

From: Nate Lawson <nate@root.org>
To: Olexander Kunytsa <kunia@istc.kiev.ua>
Cc: "Kenneth D. Merry" <ken@kdm.org>,
	FreeBSD-gnats-submit@FreeBSD.org
Subject: Re: kern/43580: QUIRK: PhotoClip USB Camera
Date: Mon, 25 Nov 2002 23:44:30 -0800 (PST)

 I closed the PR and committed the change to the quirk to both current and
 stable.
 
 -Nate
 
 On Mon, 4 Nov 2002, Olexander Kunytsa wrote:
 > 
 > > So can the filesystem be mounted without the patch?
 > 
 > NO:(
 > No dump, no mount
 > 
 > 
 > > The 6/10 byte autodetection code should switch to 10 byte CDBs after
 > > the first failure.
 > AFIAR, it worked at the beginning ( I mean then the code firstly appeared)
 > But than, and now - i cant
 > 
 > > If it isn't switching, we've probably got a problem.
 > yeah
 > 
 > > The synchronize cache command failure may be irritating, but shouldn't
 > > be fatal.
 > > Ken
 > 
 > 
 > And I've mistaken in patch:(
 > 
 > please apply this patch to correct mistake, otherwise it has no use:
 > 
 > --- scsi_da.c.old	Mon Nov  4 23:12:47 2002
 > +++ scsi_da.c	Mon Nov  4 23:13:05 2002
 > @@ -387,7 +387,7 @@
 >  		 * Daisy Technology PhotoClip on Zoran chip
 >  		 * PR: kern/43580
 >  		 */
 > -		{T_DIRECT, SIP_MEDIA_REMOVABLE, "ZORAN", "COACH DSC", "*"},
 > +		{T_DIRECT, SIP_MEDIA_REMOVABLE, "ZORAN", "COACH", "*"},
 >  		/*quirks*/ DA_Q_NO_6_BYTE|DA_Q_NO_SYNC_CACHE
 >  	}
 >  };
 > 
 > 
 > 
 > /Olexander
 > 
 
State-Changed-From-To: closed->feedback 
State-Changed-By: njl 
State-Changed-When: Mon Aug 25 11:02:00 PDT 2003 
State-Changed-Why:  
Can you test this device with -stable and let me know if it works without 
adding the kernel option "DA_OLD_QUIRKS"? 

http://www.freebsd.org/cgi/query-pr.cgi?pr=43580 
State-Changed-From-To: feedback->closed 
State-Changed-By: njl 
State-Changed-When: Sun Apr 18 20:42:01 PDT 2004 
State-Changed-Why:  
This should work on -current and -stable since 2003/8/7.  Close due to 
lack of response. 

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