From old@home.old.com.ua  Fri Apr 30 14:19:51 2004
Return-Path: <old@home.old.com.ua>
Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125])
	by hub.freebsd.org (Postfix) with ESMTP id 8B70116A4CE
	for <FreeBSD-gnats-submit@freebsd.org>; Fri, 30 Apr 2004 14:19:51 -0700 (PDT)
Received: from mail.ipnet.kiev.ua (ns.ip.net.ua [82.193.96.6])
	by mx1.FreeBSD.org (Postfix) with ESMTP id B4C5B43D1F
	for <FreeBSD-gnats-submit@freebsd.org>; Fri, 30 Apr 2004 14:19:45 -0700 (PDT)
	(envelope-from old@home.old.com.ua)
Received: from home.old.com.ua (old.ipnet.kiev.ua [82.193.110.225])
	by mail.ipnet.kiev.ua (8.12.10/8.12.6) with ESMTP id i3ULJaD2073857
	(version=TLSv1/SSLv3 cipher=EDH-RSA-DES-CBC3-SHA bits=168 verify=NO)
	for <FreeBSD-gnats-submit@freebsd.org>; Sat, 1 May 2004 00:19:37 +0300 (EEST)
	(envelope-from old@home.old.com.ua)
Received: from home.old.com.ua (localhost [127.0.0.1])
	by home.old.com.ua (8.12.11/8.12.11) with ESMTP id i3ULKDt8023990
	for <FreeBSD-gnats-submit@freebsd.org>; Sat, 1 May 2004 00:20:13 +0300 (EEST)
	(envelope-from old@home.old.com.ua)
Received: (from old@localhost)
	by home.old.com.ua (8.12.11/8.12.11/Submit) id i3ULKDaf023988;
	Sat, 1 May 2004 00:20:13 +0300 (EEST)
	(envelope-from old)
Message-Id: <200404302120.i3ULKDaf023988@home.old.com.ua>
Date: Sat, 1 May 2004 00:20:13 +0300 (EEST)
From: Dmitry Dyomin <old@old.com.ua>
Reply-To: Dmitry Dyomin <old@old.com.ua>
To: FreeBSD-gnats-submit@freebsd.org
Cc:
Subject: Device/vendor quirks for iRiver iFP MP3 player series
X-Send-Pr-Version: 3.113
X-GNATS-Notify:

>Number:         66124
>Category:       kern
>Synopsis:       QUIRK: Device/vendor quirks for iRiver iFP MP3 player series
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    sanpei
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Fri Apr 30 14:20:12 PDT 2004
>Closed-Date:    Mon Aug 30 00:57:17 GMT 2004
>Last-Modified:  Mon Aug 30 00:57:17 GMT 2004
>Originator:     Dmitry Dyomin
>Release:        FreeBSD 5.2-CURRENT i386
>Organization:
>Environment:
System: FreeBSD home.old.com.ua 5.2-CURRENT FreeBSD 5.2-CURRENT #0: Mon Apr 19 13:44:50 EEST 2004 root@home.old.com.ua:/usr/obj/usr/src/sys/HOME i386


	
>Description:
This PR attempts to raise kern/54881 and i386/63941 which are still opened.
iRiver iFP MP3 player series need DA_Q_NO_SYNC_CACHE to function properly.
	
>How-To-Repeat:
da1 at umass-sim1 bus 1 target 0 lun 0
da1: <iRiver iFP Mass Driver 1.00> Removable Direct Access SCSI-0 device 
da1: 1.000MB/s transfers
da1: 250MB (512000 512 byte sectors: 64H 32S/T 250C)
(da1:umass-sim1:1:0:0): SYNCHRONIZE CACHE. CDB: 35 0 0 0 0 0 0 0 0 0 
(da1:umass-sim1:1:0:0): UNIT ATTENTION asc:29,0
(da1:umass-sim1:1:0:0): Power on, reset, or bus device reset occurred
(da1:umass-sim1:1:0:0): SYNCHRONIZE CACHE. CDB: 35 0 0 0 0 0 0 0 0 0 
(da1:umass-sim1:1:0:0): UNIT ATTENTION asc:29,0
(da1:umass-sim1:1:0:0): Power on, reset, or bus device reset occurred


Relevant information:

# camcontrol inquiry da0
pass0: <iRiver iFP Mass Driver 1.00> Removable Direct Access SCSI-0 device
pass0: Serial Number u
pass0: 1.000MB/s transfers

# usbdevs -v
<snip>
Controller /dev/usb2:
addr 1: full speed, self powered, config 1, UHCI root hub(0x0000), VIA(0x0000),
rev 1.00
 port 1 addr 2: full speed, self powered, config 1, iFP Mass Driver(0x1103), iRi
ver(0x4102), rev 1.00
 port 2 powered

After the following patch applied, during boot you'll see:

umass0: iRiver iFP Mass Driver, rev 1.10/1.00, addr 2
umass0: Get Max Lun not supported (STALLED)
da0 at umass-sim0 bus 0 target 0 lun 0
da0: <iRiver iFP Mass Driver 1.00> Removable Direct Access SCSI-0 device
da0: 1.000MB/s transfers
da0: 250MB (512000 512 byte sectors: 64H 32S/T 250C)

and device appears to work correctly.
	
>Fix:
--- src/sys/dev/usb/usbdevs.orig        Sat May  1 00:18:14 2004
+++ src/sys/dev/usb/usbdevs     Sat May  1 00:18:20 2004
@@ -374,6 +374,7 @@
 vendor DLINK           0x2001  D-Link
 vendor VIDZMEDIA       0x3275  VidzMedia Pte Ltd
 vendor DAISY           0x3579  Daisy Technology
+vendor IRIVER          0x4102  iRiver
 vendor DELL            0x413c  Dell
 vendor INTEL           0x8086  Intel
 vendor HP2             0xf003  Hewlett Packard
@@ -802,6 +803,9 @@
 /* Iomega products */
 product IOMEGA ZIP100          0x0001  Zip 100
 product IOMEGA ZIP250          0x0030  Zip 250
+
+/* iRiver products */
+product        IRIVER IFP              0x1103  iFP Mass Driver
 
 /* JVC products */
 product        JVC GR_DX95             0x000a  GR-DX95




--- src/sys/cam/scsi/scsi_da.c.orig     Sat May  1 00:18:17 2004
+++ src/sys/cam/scsi/scsi_da.c  Sat May  1 00:18:25 2004
@@ -248,6 +248,13 @@
        },
        {
                /*
+                * iRiver iFP MP3 player (with UMS Firmware)
+                */
+               {T_DIRECT, SIP_MEDIA_REMOVABLE, "iRiver", "iFP*", "*"},
+               /*quirks*/ DA_Q_NO_SYNC_CACHE
+       },
+       {
+               /*
                 * Power Quotient Int. (PQI) USB flash key
                 * PR: kern/53067
                 */
	


>Release-Note:
>Audit-Trail:
State-Changed-From-To: open->patched 
State-Changed-By: sanpei 
State-Changed-When: Sun Aug 8 09:13:19 GMT 2004 
State-Changed-Why:  
Committed scsi_da.c rev. 1.170 
Thanks 

http://www.freebsd.org/cgi/query-pr.cgi?pr=66124 
State-Changed-From-To: patched->closed 
State-Changed-By: sanpei 
State-Changed-When: Mon Aug 30 00:54:25 GMT 2004 
State-Changed-Why:  
Committed, scsi_da.c 1.42.2.54, Thanks(I forgot to close this PR) 


Responsible-Changed-From-To: freebsd-bugs->sanpei 
Responsible-Changed-By: sanpei 
Responsible-Changed-When: Mon Aug 30 00:54:25 GMT 2004 
Responsible-Changed-Why:  


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