From kunia@enigma.x-telecom.net  Mon Jan  7 00:47:25 2002
Return-Path: <kunia@enigma.x-telecom.net>
Received: from enigma.x-telecom.net (enigma.x-telecom.net [80.70.64.51])
	by hub.freebsd.org (Postfix) with ESMTP id 60E7C37B41A
	for <FreeBSD-gnats-submit@freebsd.org>; Mon,  7 Jan 2002 00:47:24 -0800 (PST)
Received: from kunia by enigma.x-telecom.net with local (Exim 3.33 #1)
	id 16NVR7-0001LG-00
	for FreeBSD-gnats-submit@freebsd.org; Mon, 07 Jan 2002 10:47:17 +0200
Message-Id: <E16NVR7-0001LG-00@enigma.x-telecom.net>
Date: Mon, 07 Jan 2002 10:47:17 +0200
From: Olexander Kunytsa <kunia@ukma.kiev.ua>
Sender: "Olexander Kunytsa,XTC,239-14-29" <kunia@enigma.x-telecom.net>
Reply-To: Olexander Kunytsa <kunia@x-telecom.net>
To: FreeBSD-gnats-submit@freebsd.org
Cc:
Subject: quirk for DIVA USB Mp3 player
X-Send-Pr-Version: 3.113
X-GNATS-Notify:

>Number:         33638
>Category:       kern
>Synopsis:       quirk for DIVA USB Mp3 player
>Confidential:   no
>Severity:       non-critical
>Priority:       medium
>Responsible:    njl
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          change-request
>Submitter-Id:   current-users
>Arrival-Date:   Mon Jan 07 00:50:01 PST 2002
>Closed-Date:    Wed Oct 30 22:55:46 PST 2002
>Last-Modified:  Wed Oct 30 22:55:46 PST 2002
>Originator:     Olexander Kunytsa
>Release:        FreeBSD 5.0-CURRENT i386
>Organization:
XTC
>Environment:
System: FreeBSD enigma.x-telecom.net 5.0-CURRENT FreeBSD 5.0-CURRENT #3: Mon Jan 7 04:36:57 EET 2002 root@enigma.x-telecom.net:/usr/obj/usr/src/sys/CURRENT i386


>Description:
	DIVA USB Mp3 player is attached as umass device, it is detected on
	booting as:
da0: <DIVA USB Media Reader 2.06> Removable Direct Access SCSI-0 device
	but it fails to be mounted or hexdumped, thus it works under windoze 
	and linux-2.4

>How-To-Repeat:
	On system with attached DIVA (www.mydivaplayer.com):
$hd /dev/da0
umass0: Phase Error, residue = 0
umass0: BBB reset failed, STALLED
umass0: Phase Error, residue = 0
umass0: BBB reset failed, STALLED
umass0: Phase Error, residue = 0
umass0: BBB reset failed, STALLED
umass0: Phase Error, residue = 0
umass0: BBB reset failed, STALLED
umass0: Phase Error, residue = 0
umass0: BBB reset failed, STALLED
da0: reading primary partition table: error reading fsbn 0

>Fix:

	Apply this patch (I'd like to have it MFC'ed ASAP) :

--- /sys/cam/scsi/scsi_da.c     Mon Jan  7 05:32:56 2002
+++ scsi_da.c   Mon Jan  7 10:34:18 2002
@@ -339,6 +339,13 @@
                 */
                {T_DIRECT, SIP_MEDIA_REMOVABLE, "Nikon", "Digital Camera", "*"},
                /*quirks*/ DA_Q_NO_6_BYTE
+       },{
+               /*
+                * DIVA USB Mp3 Player.
+                * Doesn't work correctly with 6 byte reads/writes.
+                */
+               {T_DIRECT, SIP_MEDIA_REMOVABLE, "DIVA USB", "Media Reader","*"},
+               /*quirks*/ DA_Q_NO_6_BYTE
        },
        {
                /*


P.S. This patch corrects SCSI-layer DIVA's problem, but one more problem is on 
	uhub: it fails to attach DIVA after disconnecting. At the moment I can
	use the player only with detaching on boot.
>Release-Note:
>Audit-Trail:

From: John Baldwin <jhb@FreeBSD.org>
To: Olexander Kunytsa <kunia@x-telecom.net>,
	freebsd-gnats-submit@FreeBSD.org
Cc:  
Subject: kern/33638
Date: Wed, 09 Jan 2002 12:19:39 -0800 (PST)

 Hi,
 
 In regards to PR 33638, can you please include the dmesg output for the umass0
 lines.  Also, can you include bootverbose output for umass0 and da0?  If your
 device is using the UFI or ATAPI commands, it should not need this quirk as
 those command sets in -current have translated 6 byte commands in the umass
 driver since mid-December.
 
 -- 
 
 John Baldwin <jhb@FreeBSD.org>  <><  http://www.FreeBSD.org/~jhb/
 "Power Users Use the Power to Serve!"  -  http://www.FreeBSD.org/

From: Olexander Kunytsa <kunia@x-telecom.net>
To: John Baldwin <jhb@FreeBSD.org>
Cc: <freebsd-gnats-submit@FreeBSD.org>
Subject: Re: kern/33638
Date: Thu, 10 Jan 2002 02:09:01 +0200 (EET)

 On Wed, 9 Jan 2002, John Baldwin wrote:
 
 > Hi,
 Hello to U too..
 
 >
 > In regards to PR 33638, can you please include the dmesg output for the umass0
 usb0: <Intel 82371AB/EB (PIIX4) USB controller> on uhci0
 usb0: USB revision 1.0
 uhub0: Intel UHCI root hub, class 9/0, rev 1.00/1.00, addr 1
 uhub0: 2 ports with 2 removable, self powered
 umass0: Philips DIVA USB mp3 player, rev 1.00/1.00, addr 2
 umass0: Get Max Lun not supported (STALLED)
 ....
 da0 at umass-sim0 bus 0 target 0 lun 0
 da0: <DIVA USB Media Reader 2.06> Removable Direct Access SCSI-0 device
 da0: 650KB/s transfers
 da0: 62MB (127232 512 byte sectors: 64H 32S/T 62C)
 
 
 > lines.  Also, can you include bootverbose output for umass0 and da0?  If your
 I can mail bootverbose in few days, if it will be needed.
 Can't boot now;( And it is not attached by usbd on live mashine:(
 I am trying to locate where the problem is.
 
 > device is using the UFI or ATAPI commands, it should not need this quirk as
 > those command sets in -current have translated 6 byte commands in the umass
 > driver since mid-December.
 
 	First, Diva truly use SCSI commands, e.g. standing  nearby
 linux-box says:
 --------------
 Bus 001 Device 003: ID 0471:1801 Philips
   Language IDs: none (cannot get min. string descriptor; got len=-1,
 error=32:Broken pipe)
 Device Descriptor:
   bLength                18
   bDescriptorType         1
   bcdUSB               1.00
   bDeviceClass            0 Interface
   bDeviceSubClass         0
   bDeviceProtocol         0
   bMaxPacketSize0        16
   idVendor           0x0471 Philips
   idProduct          0x1801
   bcdDevice            1.00
   iManufacturer           0
   iProduct                0
   iSerial                 0
   bNumConfigurations      1
   Configuration Descriptor:
     bLength                 9
     bDescriptorType         2
     wTotalLength           32
     bNumInterfaces          1
     bConfigurationValue     1
     iConfiguration          0
     bmAttributes         0x60
       Self Powered
       Remote Wakeup
     MaxPower              100mA
     Interface Descriptor:
       bLength                 9
       bDescriptorType         4
       bInterfaceNumber        0
       bAlternateSetting       0
       bNumEndpoints           2
       bInterfaceClass         8 Mass Storage
       bInterfaceSubClass      6 SCSI
       bInterfaceProtocol     80 Bulk (Zip)
       iInterface              0
       Endpoint Descriptor:
         bLength                 7
         bDescriptorType         5
         bEndpointAddress     0x82  EP 2 IN
         bmAttributes            2
           Transfer Type            Bulk
           Synch Type               none
         wMaxPacketSize         64
         bInterval               0
       Endpoint Descriptor:
         bLength                 7
         bDescriptorType         5
         bEndpointAddress     0x02  EP 2 OUT
         bmAttributes            2
           Transfer Type            Bulk
           Synch Type               none
         wMaxPacketSize         64
         bInterval               0
   Language IDs: none (cannot get min. string descriptor; got len=-1,
 error=32:Broken pipe)
 -------------------
 
 	Second, I  made the quirk at January the 5th, and I've checked
 it on both CURRENT- and STABLE- branches.
 
 -- 
 Olexander Kunytsa
 ISP "Extreme Telecom" Technical Department
 phone:	+380-44-2391425,
 	+380-44-2391429
 fax:	+380-44-2391427
 

From: John Baldwin <jhb@FreeBSD.org>
To: Olexander Kunytsa <kunia@x-telecom.net>
Cc: freebsd-gnats-submit@FreeBSD.org
Subject: Re: kern/33638
Date: Wed, 09 Jan 2002 17:31:56 -0800 (PST)

 On 10-Jan-02 Olexander Kunytsa wrote:
 >> lines.  Also, can you include bootverbose output for umass0 and da0?  If
 >> your
 > I can mail bootverbose in few days, if it will be needed.
 > Can't boot now;( And it is not attached by usbd on live mashine:(
 > I am trying to locate where the problem is.
 
 It won't be needed, thanks.
 
 >       First, Diva truly use SCSI commands, e.g. standing  nearby
 > linux-box says:
 > --------------
 >       bInterfaceClass         8 Mass Storage
 >       bInterfaceSubClass      6 SCSI
 >       bInterfaceProtocol     80 Bulk (Zip)
 
 Ok, thanks.  This is annoying as the device is claiming to support 6_BYTE.  Oh
 well. :)
 
 -- 
 
 John Baldwin <jhb@FreeBSD.org>  <><  http://www.FreeBSD.org/~jhb/
 "Power Users Use the Power to Serve!"  -  http://www.FreeBSD.org/

From: Olexander Kunytsa <kunia@x-telecom.net>
To: John Baldwin <jhb@FreeBSD.org>
Cc: <freebsd-gnats-submit@FreeBSD.org>
Subject: Re: kern/33638
Date: Thu, 10 Jan 2002 07:03:07 +0200 (EET)

 On Wed, 9 Jan 2002, John Baldwin wrote:
 > Ok, thanks.  This is annoying as the device is claiming to support 6_BYTE.  Oh
 > well. :)
 
 	Anyways, I'm able to use it with the quirk, and no way withou the
 one.
 
 -- 
 Olexander Kunytsa
 ISP "Extreme Telecom" Technical Department
 phone:	+380-44-2391425,
 	+380-44-2391429
 fax:	+380-44-2391427
 
Responsible-Changed-From-To: freebsd-bugs->n_hibma 
Responsible-Changed-By: n_hibma 
Responsible-Changed-When: Tue Feb 12 01:12:37 PST 2002 
Responsible-Changed-Why:  

http://www.FreeBSD.org/cgi/query-pr.cgi?pr=33638 

From: Nate Lawson <nate@root.org>
To: freebsd-gnats-submit@FreeBSD.org, kunia@x-telecom.net
Cc:  
Subject: Re: kern/33638: quirk for DIVA USB Mp3 player
Date: Thu, 15 Aug 2002 16:35:49 -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:44:44 PDT 2002 
State-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 



Responsible-Changed-From-To: n_hibma->njl 
Responsible-Changed-By: njl 
Responsible-Changed-When: Tue Oct 1 13:44:44 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=33638 

From: Nate Lawson <nate@root.org>
To: Olexander Kunytsa <kunia@x-telecom.net>
Cc: sobomax@freebsd.org, freebsd-gnats-submit@freebsd.org
Subject: Re: kern/33638 DIVA usb mp3 player
Date: Wed, 30 Oct 2002 22:14:23 -0800 (PST)

 I have not heard a response from either of you.  Please test again with
 the quirk removed because a facility was added in 3/2002 to CURRENT and
 appeared in 4.6R that should fix this without needing the quirk.
 
 Thanks,
 Nate
 
State-Changed-From-To: feedback->closed 
State-Changed-By: njl 
State-Changed-When: Wed Oct 30 22:54:33 PST 2002 
State-Changed-Why:  
Referenced in MFC 1.42.2.27.  I think this quirk is no longer necessary in 
4.6+ but was not able to contact submitter. 
Note, I believe submitter's email has changed to: 
Olexander Kunytsa <kunia@istc.kiev.ua> 


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