From rizzo@icir.org  Fri Sep 17 16:11:47 2004
Return-Path: <rizzo@icir.org>
Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125])
	by hub.freebsd.org (Postfix) with ESMTP id 4D0D316A4CF
	for <FreeBSD-gnats-submit@freebsd.org>; Fri, 17 Sep 2004 16:11:47 +0000 (GMT)
Received: from xorpc.icir.org (xorpc.icir.org [192.150.187.68])
	by mx1.FreeBSD.org (Postfix) with ESMTP id 3256643D39
	for <FreeBSD-gnats-submit@freebsd.org>; Fri, 17 Sep 2004 16:11:47 +0000 (GMT)
	(envelope-from rizzo@icir.org)
Received: from xorpc.icir.org (localhost [127.0.0.1])
	by xorpc.icir.org (8.12.9p1/8.12.8) with ESMTP id i8HGBlIb022076
	for <FreeBSD-gnats-submit@freebsd.org>; Fri, 17 Sep 2004 09:11:47 -0700 (PDT)
	(envelope-from rizzo@xorpc.icir.org)
Received: (from rizzo@localhost)
	by xorpc.icir.org (8.12.9p1/8.12.3/Submit) id i8HGBl2n022075;
	Fri, 17 Sep 2004 09:11:47 -0700 (PDT)
	(envelope-from rizzo)
Message-Id: <200409171611.i8HGBl2n022075@xorpc.icir.org>
Date: Fri, 17 Sep 2004 09:11:47 -0700 (PDT)
From: Luigi Rizzo <rizzo@icir.org>
Reply-To: Luigi Rizzo <rizzo@icir.org>
To: FreeBSD-gnats-submit@freebsd.org
Cc:
Subject: support for DMR1000 USP flash pen/mp3 player
X-Send-Pr-Version: 3.113
X-GNATS-Notify:

>Number:         71818
>Category:       kern
>Synopsis:       QUIRK: support for DMR1000 USP flash pen/mp3 player
>Confidential:   no
>Severity:       non-critical
>Priority:       medium
>Responsible:    sanpei
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          change-request
>Submitter-Id:   current-users
>Arrival-Date:   Fri Sep 17 16:20:23 GMT 2004
>Closed-Date:    Sun Sep 24 18:08:20 GMT 2006
>Last-Modified:  Sun Sep 24 18:08:20 GMT 2006
>Originator:     Luigi Rizzo
>Release:        RELENG_4
>Organization:
Univ di Pisa
>Environment:
System: FreeBSD xorpc.icir.org 4.8-RELEASE FreeBSD 4.8-RELEASE #0: Mon Apr 7 20:59:56 PDT 2003 root@xorpc.icir.org:/usr/src/sys/compile/ICIR-4.8-USB i386

RELENG_4 trying to use a USB Flash Pen/MP3 player labeled DMR1000
or DMR1128/DMR1256 (USB vendor 0x8206 Product 0x066f)
The one I have identifies as "Digital" "MP3 Music Player"

	
>Description:
The device is recognised by umass, but accessing it with fdisk or
other things hangs. Upon investigation, it turns out that the device
does not like a couple of scsi commands (PREVENT_ALLOW_REMOV*
and SYNC_CACHE), and the following quirks suffice to remove
the problem and make everything work:

	DA_Q_NO_SYNC_CACHE|DA_Q_NO_PREVENT

On 5.2.1 the quirk is not necessary, but i have not been able to
figure out why -- on both systems i believe the device tries to
use SCSI over BBB only, I have tried (in umass.c) to use different
protocols such as ATAPI or UFI but it did not help, nor it helped
to use DA_Q_NO_6_BYTE.

>How-To-Repeat:
	
>Fix:

The attached patch (RELENG_4 only) fixes the problem.


Index: scsi_da.c
===================================================================
RCS file: /home/ncvs/src/sys/cam/scsi/scsi_da.c,v
retrieving revision 1.42.2.50
diff -u -r1.42.2.50 scsi_da.c
--- scsi_da.c	8 May 2004 04:02:34 -0000	1.42.2.50
+++ scsi_da.c	17 Sep 2004 15:57:55 -0000
@@ -312,6 +312,13 @@
 	},
 	{
 		/*
+		 * DMR1000 USB Flash MP3 Player
+		 */
+		{T_DIRECT, SIP_MEDIA_REMOVABLE, "Digital", "MP3*", "*"},
+		/*quirks*/ DA_Q_NO_SYNC_CACHE|DA_Q_NO_PREVENT
+	},
+	{
+		/*
 		 * Neuros USB Digital Audio Computer
 		 * PR: kern/63645
 		 */
>Release-Note:
>Audit-Trail:
State-Changed-From-To: open->feedback 
State-Changed-By: sanpei 
State-Changed-When: Mon Sep 20 07:00:47 GMT 2004 
State-Changed-Why:  
Plase read FreeBSD Quirk Guidelines and report us  
http://root.org/~nate/freebsd/quirks.html  


Responsible-Changed-From-To: freebsd-bugs->sanpei 
Responsible-Changed-By: sanpei 
Responsible-Changed-When: Mon Sep 20 07:00:47 GMT 2004 
Responsible-Changed-Why:  
Plase read FreeBSD Quirk Guidelines and report us  
http://root.org/~nate/freebsd/quirks.html  

http://www.freebsd.org/cgi/query-pr.cgi?pr=71818 
State-Changed-From-To: feedback->closed 
State-Changed-By: bms 
State-Changed-When: Sun Sep 24 18:07:53 UTC 2006 
State-Changed-Why:  
Timeout on feedback, and we changed how we dealt with da quirks 
because there were so many of them. 

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