From rnyberg@it.su.se  Mon Jun  9 06:00:53 2003
Return-Path: <rnyberg@it.su.se>
Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125])
	by hub.freebsd.org (Postfix) with ESMTP id 27C5A37B401
	for <FreeBSD-gnats-submit@freebsd.org>; Mon,  9 Jun 2003 06:00:53 -0700 (PDT)
Received: from murmeldjur.it.su.se (murmeldjur.it.su.se [130.237.95.79])
	by mx1.FreeBSD.org (Postfix) with ESMTP id A42AA43F93
	for <FreeBSD-gnats-submit@freebsd.org>; Mon,  9 Jun 2003 06:00:51 -0700 (PDT)
	(envelope-from rnyberg@it.su.se)
Received: from murmeldjur.it.su.se (localhost [127.0.0.1])
	by murmeldjur.it.su.se (8.12.8/8.12.8) with ESMTP id h59D0oQM011226
	for <FreeBSD-gnats-submit@freebsd.org>; Mon, 9 Jun 2003 15:00:50 +0200 (CEST)
	(envelope-from rnyberg@murmeldjur.it.su.se)
Received: (from rnyberg@localhost)
	by murmeldjur.it.su.se (8.12.8/8.12.8/Submit) id h59D0n02011225;
	Mon, 9 Jun 2003 15:00:49 +0200 (CEST)
	(envelope-from rnyberg)
Message-Id: <200306091300.h59D0n02011225@murmeldjur.it.su.se>
Date: Mon, 9 Jun 2003 15:00:49 +0200 (CEST)
From: Richard Nyberg <rnyberg@it.su.se>
Reply-To: Richard Nyberg <rnyberg@it.su.se>
To: FreeBSD-gnats-submit@freebsd.org
Cc:
Subject: QUIRK: Creative Nomad Muvo USB mp3 player
X-Send-Pr-Version: 3.113
X-GNATS-Notify:

>Number:         53094
>Category:       kern
>Synopsis:       QUIRK: Creative Nomad Muvo USB mp3 player
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    njl
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Mon Jun 09 06:10:16 PDT 2003
>Closed-Date:    Fri Aug 22 09:36:27 PDT 2003
>Last-Modified:  Sat Feb  7 01:50:09 PST 2004
>Originator:     Richard Nyberg <rnyberg@it.su.se>
>Release:        FreeBSD 5.1-BETA i386
>Organization:
none
>Environment:
System: FreeBSD bsd.local 5.1-BETA FreeBSD 5.1-BETA #12: Mon Jun  9 14:14:47 CEST 2003     rnyberg@bsd.local:/usr/obj/usr/src/sys/BSD  i386
	
>Description:

Quirks needed for creative nomad muvo mp3 player.
The device doesn't like the PREVENT ALLOW command
and also needs the quirks DA_Q_NO_SYNC_CACHE and
DA_Q_NO_6_BYTE to work correctly.


----------------camcontrol inquiry da0
pass0: <CREATIVE NOMAD_MUVO 0001> Removable Direct Access SCSI-4 device 
pass0: Serial Number                     
pass0: 1.000MB/s transfers 
----------------

---------------- usbdevs -v
Controller /dev/usb0:
addr 1: full speed, self powered, config 1, UHCI root hub(0x0000), VIA(0x0000), rev 1.00
 port 1 addr 2: low speed, power 100 mA, config 1, USB Mouse(0xc00b), Logitech(0x046d), rev 6.10
 port 2 addr 3: low speed, power 20 mA, config 1, SideWinder Precision 2 Joystick(0x0038), Microsoft(0x045e), rev 1.08
Controller /dev/usb1:
addr 1: full speed, self powered, config 1, UHCI root hub(0x0000), VIA(0x0000), rev 1.00
 port 1 powered
 port 2 powered
Controller /dev/usb2:
addr 1: full speed, self powered, config 1, UHCI root hub(0x0000), VIA(0x0000), rev 1.00
 port 1 powered
 port 2 addr 2: full speed, self powered, config 1, product 0x4106(0x4106), Creative(0x041e), rev 0.01
----------------

---------------- failed dmesg
Copyright (c) 1992-2003 The FreeBSD Project.
Copyright (c) 1979, 1980, 1983, 1986, 1988, 1989, 1991, 1992, 1993, 1994
        The Regents of the University of California. All rights reserved.
FreeBSD 5.1-BETA #10: Mon Jun  9 13:53:55 CEST 2003
    rnyberg@bsd.local:/usr/obj/usr/src/sys/BSD
Preloaded elf kernel "/boot/kernel.broken/kernel" at 0xc04d7000.
Preloaded elf module "/boot/kernel.broken/acpi.ko" at 0xc04d71fc.
Timecounter "i8254"  frequency 1193182 Hz
Timecounter "TSC"  frequency 1470006336 Hz
CPU: AMD Athlon(tm) XP 1700+ (1470.01-MHz 686-class CPU)
  Origin = "AuthenticAMD"  Id = 0x662  Stepping = 2
  Features=0x383f9ff<FPU,VME,DE,PSE,TSC,MSR,PAE,MCE,CX8,SEP,MTRR,PGE,MCA,CMOV,PAT,PSE36,MMX,FXSR,SSE>
  AMD Features=0xc0480000<MP,AMIE,DSP,3DNow!>
real memory  = 536805376 (511 MB)
avail memory = 516100096 (492 MB)
Pentium Pro MTRR support enabled
npx0: <math processor> on motherboard
npx0: INT 16 interface
acpi0: <VIA694 AWRDACPI> on motherboard
pcibios: BIOS version 2.10
Using $PIR table, 8 entries at 0xc00fdee0
acpi0: power button is handled as a fixed feature programming model.
Timecounter "ACPI-fast"  frequency 3579545 Hz
acpi_timer0: <24-bit timer at 3.579545MHz> port 0x4008-0x400b on acpi0
acpi_cpu0: <CPU> port 0x530-0x537 on acpi0
acpi_tz0: <thermal zone> port 0x530-0x537 on acpi0
acpi_button0: <Power Button> on acpi0
acpi_button1: <Sleep Button> on acpi0
pcib0: <ACPI Host-PCI bridge> port 0x5000-0x500f,0x4080-0x40ff,0x4000-0x407f,0xcf8-0xcff on acpi0
pci0: <ACPI PCI bus> on pcib0
pcib1: <PCI-PCI bridge> at device 1.0 on pci0
pci1: <PCI bus> on pcib1
pci1: <display, VGA> at device 0.0 (no driver attached)
pcm0: <Creative EMU10K1> port 0xd000-0xd01f irq 11 at device 9.0 on pci0
pcm0: <TriTech TR28602 AC97 Codec>
vr0: <VIA VT6102 Rhine II 10/100BaseTX> port 0xd800-0xd8ff mem 0xe3000000-0xe30000ff irq 10 at device 12.0 on pci0
vr0: Ethernet address: 00:50:ba:1c:81:29
miibus0: <MII bus> on vr0
ukphy0: <Generic IEEE 802.3u media interface> on miibus0
ukphy0:  10baseT, 10baseT-FDX, 100baseTX, 100baseTX-FDX, auto
isab0: <PCI-ISA bridge> at device 17.0 on pci0
isa0: <ISA bus> on isab0
atapci0: <VIA 8233 UDMA100 controller> port 0xdc00-0xdc0f at device 17.1 on pci0
ata0: at 0x1f0 irq 14 on atapci0
ata1: at 0x170 irq 15 on atapci0
uhci0: <VIA 83C572 USB controller> port 0xe000-0xe01f irq 10 at device 17.2 on pci0
usb0: <VIA 83C572 USB controller> on uhci0
usb0: USB revision 1.0
uhub0: VIA UHCI root hub, class 9/0, rev 1.00/1.00, addr 1
uhub0: 2 ports with 2 removable, self powered
ums0: Logitech USB Mouse, rev 1.10/6.10, addr 2, iclass 3/1
ums0: 4 buttons and Z dir.
ugen0: Microsoft SideWinder Precision 2 Joystick, rev 1.10/1.08, addr 3
uhci1: <VIA 83C572 USB controller> port 0xe400-0xe41f irq 10 at device 17.3 on pci0
usb1: <VIA 83C572 USB controller> on uhci1
usb1: USB revision 1.0
uhub1: VIA UHCI root hub, class 9/0, rev 1.00/1.00, addr 1
uhub1: 2 ports with 2 removable, self powered
uhci2: <VIA 83C572 USB controller> port 0xe800-0xe81f irq 10 at device 17.4 on pci0
usb2: <VIA 83C572 USB controller> on uhci2
usb2: USB revision 1.0
uhub2: VIA UHCI root hub, class 9/0, rev 1.00/1.00, addr 1
uhub2: 2 ports with 2 removable, self powered
fdc0: <Enhanced floppy controller (i82077, NE72065 or clone)> port 0x3f7,0x3f2-0x3f5 irq 6 drq 2 on acpi0
fdc0: FIFO enabled, 8 bytes threshold
fd0: <1440-KB 3.5" drive> on fdc0 drive 0
sio0 port 0x3f8-0x3ff irq 4 on acpi0
sio0: type 16550A
sio1 port 0x2f8-0x2ff irq 3 on acpi0
sio1: type 16550A
atkbdc0: <Keyboard controller (i8042)> port 0x64,0x60 irq 1 on acpi0
atkbd0: <AT Keyboard> flags 0x1 irq 1 on atkbdc0
kbd0 at atkbd0
orm0: <Option ROM> at iomem 0xcc000-0xd3fff on isa0
pmtimer0 on isa0
sc0: <System console> at flags 0x100 on isa0
sc0: VGA <16 virtual consoles, flags=0x300>
vga0: <Generic ISA VGA> at port 0x3c0-0x3df iomem 0xa0000-0xbffff on isa0
Timecounters tick every 10.000 msec
ad0: 57241MB <ST360021A> [116301/16/63] at ata0-master UDMA100
acd0: DVD-ROM <SAMSUNG DVD-ROM SD-616F> at ata1-master PIO4
acd1: CD-RW <12X8X32> at ata1-slave PIO4
Mounting root from ufs:/dev/ad0s2a
umass0: Creative Tech NOMAD MuVo, rev 1.10/0.01, addr 2
umass0: Get Max Lun not supported (IOERROR)
da0 at umass-sim0 bus 0 target 0 lun 0
da0: <CREATIVE NOMAD_MUVO 0001> Removable Direct Access SCSI-4 device 
da0: 1.000MB/s transfers
da0: 125MB (256001 512 byte sectors: 64H 32S/T 125C)
umass0: BBB reset failed, IOERROR
umass0: BBB bulk-in clear stall failed, IOERROR
umass0: BBB bulk-out clear stall failed, IOERROR
umass0: BBB reset failed, IOERROR
umass0: BBB bulk-in clear stall failed, IOERROR
umass0: BBB bulk-out clear stall failed, IOERROR
umass0: BBB reset failed, IOERROR
umass0: BBB bulk-in clear stall failed, IOERROR
umass0: BBB bulk-out clear stall failed, IOERROR
umass0: BBB reset failed, IOERROR
umass0: BBB bulk-in clear stall failed, IOERROR
umass0: BBB bulk-out clear stall failed, IOERROR
umass0: BBB reset failed, IOERROR
umass0: BBB bulk-in clear stall failed, IOERROR
umass0: BBB bulk-out clear stall failed, IOERROR
umass0: BBB reset failed, IOERROR
umass0: BBB bulk-in clear stall failed, IOERROR
umass0: BBB bulk-out clear stall failed, IOERROR
umass0: BBB reset failed, IOERROR
umass0: BBB bulk-in clear stall failed, IOERROR
umass0: BBB bulk-out clear stall failed, IOERROR
(da0:umass-sim0:0:0:0): Synchronize cache failed, status == 0x4, scsi status == 0x0
umass0: BBB reset failed, IOERROR
umass0: BBB bulk-in clear stall failed, IOERROR
umass0: BBB bulk-out clear stall failed, IOERROR
umass0: BBB reset failed, IOERROR
umass0: BBB bulk-in clear stall failed, IOERROR
umass0: BBB bulk-out clear stall failed, IOERROR
umass0: BBB reset failed, IOERROR
umass0: BBB bulk-in clear stall failed, IOERROR
umass0: BBB bulk-out clear stall failed, IOERROR
umass0: BBB reset failed, IOERROR
umass0: BBB bulk-in clear stall failed, IOERROR
umass0: BBB bulk-out clear stall failed, IOERROR
umass0: BBB reset failed, IOERROR
umass0: BBB bulk-in clear stall failed, IOERROR
umass0: BBB bulk-out clear stall failed, IOERROR
umass0: BBB reset failed, IOERROR
umass0: BBB bulk-in clear stall failed, IOERROR
umass0: BBB bulk-out clear stall failed, IOERROR
Opened disk da0 -> 5
----------------

---------------- working dmesg
Copyright (c) 1992-2003 The FreeBSD Project.
Copyright (c) 1979, 1980, 1983, 1986, 1988, 1989, 1991, 1992, 1993, 1994
        The Regents of the University of California. All rights reserved.
FreeBSD 5.1-BETA #12: Mon Jun  9 14:14:47 CEST 2003
    rnyberg@bsd.local:/usr/obj/usr/src/sys/BSD
Preloaded elf kernel "/boot/kernel/kernel" at 0xc0619000.
Preloaded elf module "/boot/kernel/linux.ko" at 0xc06191f4.
Preloaded elf module "/boot/kernel/nvidia.ko" at 0xc06192a0.
Preloaded elf module "/boot/kernel/acpi.ko" at 0xc061934c.
Timecounter "i8254"  frequency 1193182 Hz
Timecounter "TSC"  frequency 1470009174 Hz
CPU: AMD Athlon(tm) XP 1700+ (1470.01-MHz 686-class CPU)
  Origin = "AuthenticAMD"  Id = 0x662  Stepping = 2
  Features=0x383f9ff<FPU,VME,DE,PSE,TSC,MSR,PAE,MCE,CX8,SEP,MTRR,PGE,MCA,CMOV,PAT,PSE36,MMX,FXSR,SSE>
  AMD Features=0xc0480000<MP,AMIE,DSP,3DNow!>
real memory  = 536805376 (511 MB)
avail memory = 514772992 (490 MB)
Pentium Pro MTRR support enabled
npx0: <math processor> on motherboard
npx0: INT 16 interface
acpi0: <VIA694 AWRDACPI> on motherboard
pcibios: BIOS version 2.10
Using $PIR table, 8 entries at 0xc00fdee0
acpi0: power button is handled as a fixed feature programming model.
Timecounter "ACPI-fast"  frequency 3579545 Hz
acpi_timer0: <24-bit timer at 3.579545MHz> port 0x4008-0x400b on acpi0
acpi_cpu0: <CPU> port 0x530-0x537 on acpi0
acpi_tz0: <thermal zone> port 0x530-0x537 on acpi0
acpi_button0: <Power Button> on acpi0
acpi_button1: <Sleep Button> on acpi0
pcib0: <ACPI Host-PCI bridge> port 0x5000-0x500f,0x4080-0x40ff,0x4000-0x407f,0xcf8-0xcff on acpi0
pci0: <ACPI PCI bus> on pcib0
pcib1: <PCI-PCI bridge> at device 1.0 on pci0
pci1: <PCI bus> on pcib1
nvidia0: <GeForce3 Ti 200> mem 0xdc000000-0xdc07ffff,0xd8000000-0xdbffffff,0xe0000000-0xe0ffffff irq 11 at device 0.0 on pci1
pcm0: <Creative EMU10K1> port 0xd000-0xd01f irq 11 at device 9.0 on pci0
pcm0: <TriTech TR28602 AC97 Codec>
vr0: <VIA VT6102 Rhine II 10/100BaseTX> port 0xd800-0xd8ff mem 0xe3000000-0xe30000ff irq 10 at device 12.0 on pci0
vr0: Ethernet address: 00:50:ba:1c:81:29
miibus0: <MII bus> on vr0
ukphy0: <Generic IEEE 802.3u media interface> on miibus0
ukphy0:  10baseT, 10baseT-FDX, 100baseTX, 100baseTX-FDX, auto
isab0: <PCI-ISA bridge> at device 17.0 on pci0
isa0: <ISA bus> on isab0
atapci0: <VIA 8233 UDMA100 controller> port 0xdc00-0xdc0f at device 17.1 on pci0
ata0: at 0x1f0 irq 14 on atapci0
ata1: at 0x170 irq 15 on atapci0
uhci0: <VIA 83C572 USB controller> port 0xe000-0xe01f irq 10 at device 17.2 on pci0
usb0: <VIA 83C572 USB controller> on uhci0
usb0: USB revision 1.0
uhub0: VIA UHCI root hub, class 9/0, rev 1.00/1.00, addr 1
uhub0: 2 ports with 2 removable, self powered
ums0: Logitech USB Mouse, rev 1.10/6.10, addr 2, iclass 3/1
ums0: 4 buttons and Z dir.
ugen0: Microsoft SideWinder Precision 2 Joystick, rev 1.10/1.08, addr 3
uhci1: <VIA 83C572 USB controller> port 0xe400-0xe41f irq 10 at device 17.3 on pci0
usb1: <VIA 83C572 USB controller> on uhci1
usb1: USB revision 1.0
uhub1: VIA UHCI root hub, class 9/0, rev 1.00/1.00, addr 1
uhub1: 2 ports with 2 removable, self powered
uhci2: <VIA 83C572 USB controller> port 0xe800-0xe81f irq 10 at device 17.4 on pci0
usb2: <VIA 83C572 USB controller> on uhci2
usb2: USB revision 1.0
uhub2: VIA UHCI root hub, class 9/0, rev 1.00/1.00, addr 1
uhub2: 2 ports with 2 removable, self powered
fdc0: <Enhanced floppy controller (i82077, NE72065 or clone)> port 0x3f7,0x3f2-0x3f5 irq 6 drq 2 on acpi0
fdc0: FIFO enabled, 8 bytes threshold
fd0: <1440-KB 3.5" drive> on fdc0 drive 0
sio0 port 0x3f8-0x3ff irq 4 on acpi0
sio0: type 16550A
sio1 port 0x2f8-0x2ff irq 3 on acpi0
sio1: type 16550A
atkbdc0: <Keyboard controller (i8042)> port 0x64,0x60 irq 1 on acpi0
atkbd0: <AT Keyboard> flags 0x1 irq 1 on atkbdc0
kbd0 at atkbd0
orm0: <Option ROM> at iomem 0xcc000-0xd3fff on isa0
pmtimer0 on isa0
sc0: <System console> at flags 0x100 on isa0
sc0: VGA <16 virtual consoles, flags=0x300>
vga0: <Generic ISA VGA> at port 0x3c0-0x3df iomem 0xa0000-0xbffff on isa0
Timecounters tick every 10.000 msec
ad0: 57241MB <ST360021A> [116301/16/63] at ata0-master UDMA100
acd0: DVD-ROM <SAMSUNG DVD-ROM SD-616F> at ata1-master PIO4
acd1: CD-RW <12X8X32> at ata1-slave PIO4
Mounting root from ufs:/dev/ad0s2a
umass0: Creative Tech NOMAD MuVo, rev 1.10/0.01, addr 2
umass0: Get Max Lun not supported (IOERROR)
da0 at umass-sim0 bus 0 target 0 lun 0
da0: <CREATIVE NOMAD_MUVO 0001> Removable Direct Access SCSI-4 device 
da0: 1.000MB/s transfers
da0: 125MB (256001 512 byte sectors: 64H 32S/T 125C)
----------------
	
>How-To-Repeat:
	Connect the mp3 player to a usb port.
	
>Fix:
-----------Diff against scsi_da.c
--- sys/cam/scsi/orig-scsi_da.c Sun Jun  8 22:41:42 2003
+++ sys/cam/scsi/scsi_da.c      Mon Jun  9 14:14:29 2003
@@ -92,7 +92,8 @@
 typedef enum {
        DA_Q_NONE               = 0x00,
        DA_Q_NO_SYNC_CACHE      = 0x01,
-       DA_Q_NO_6_BYTE          = 0x02
+       DA_Q_NO_6_BYTE          = 0x02,
+       DA_Q_NO_PREVENT         = 0x04
 } da_quirks;
 
 typedef enum {
@@ -476,6 +477,10 @@
                /*quirks*/ DA_Q_NO_6_BYTE
        },
        {
+               {T_DIRECT, SIP_MEDIA_REMOVABLE, "CREATIVE", "NOMAD_MUVO", "*"},
+               /*quirks*/ DA_Q_NO_6_BYTE|DA_Q_NO_SYNC_CACHE|DA_Q_NO_PREVENT
+       },
+       {
                /*
                 * SanDisk ImageMate (I, II, ...) compact flash
                 * PR: kern/47877
@@ -627,7 +632,8 @@
        }
 
        if (error == 0) {
-               if ((softc->flags & DA_FLAG_PACK_REMOVABLE) != 0)
+               if ((softc->flags & DA_FLAG_PACK_REMOVABLE) != 0
+                   && (softc->quirks & DA_Q_NO_PREVENT) == 0)
                        daprevent(periph, PR_PREVENT);
        } else {
                softc->flags &= ~DA_FLAG_OPEN;
@@ -705,7 +711,8 @@
        }
 
        if ((softc->flags & DA_FLAG_PACK_REMOVABLE) != 0) {
-               daprevent(periph, PR_ALLOW);
+               if ((softc->quirks & DA_Q_NO_PREVENT) == 0)
+                       daprevent(periph, PR_ALLOW);
                /*
                 * If we've got removeable media, mark the blocksize as
                 * unavailable, since it could change when new media is
---------
	

>Release-Note:
>Audit-Trail:
Responsible-Changed-From-To: freebsd-bugs->joe 
Responsible-Changed-By: kris 
Responsible-Changed-When: Thu Jul 17 17:38:46 PDT 2003 
Responsible-Changed-Why:  
Assign to USB maintainer 

http://www.freebsd.org/cgi/query-pr.cgi?pr=53094 
Responsible-Changed-From-To: joe->njl 
Responsible-Changed-By: njl 
Responsible-Changed-When: Wed Aug 6 10:32:03 PDT 2003 
Responsible-Changed-Why:  
I am working with the submitter. 


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

From: Nate Lawson <nate@root.org>
To: Richard Nyberg <rnyberg@it.su.se>
Cc: freebsd-gnats-submit@freebsd.org
Subject: Re: kern/53094
Date: Fri, 8 Aug 2003 11:52:36 -0700 (PDT)

 It appears the DA_Q_NO_SYNC_CACHE may not be needed.  Can you verify
 behavior if it is left out?  Can you tell me what happens if you don't
 include the DA_Q_NO_PREVENT quirk?  I'm curious about that one.
 
 -Nate

From: Richard Nyberg <rnyberg@it.su.se>
To: Nate Lawson <nate@root.org>
Cc: freebsd-gnats-submit@freebsd.org
Subject: Re: kern/53094
Date: Sat, 09 Aug 2003 14:14:05 +0200

 At Fri, 8 Aug 2003 11:52:36 -0700 (PDT),
 Nate Lawson wrote:
 > 
 > It appears the DA_Q_NO_SYNC_CACHE may not be needed.  Can you verify
 > behavior if it is left out?
 
 Uggh, bad timing! My MuVo died last week and I'm waiting for
 a replacement. :(
 
 > Can you tell me what happens if you don't
 > include the DA_Q_NO_PREVENT quirk?  I'm curious about that one.
 
 Without DA_Q_NO_PREVENT, after that command has been issued, no other
 command succeeds at all. They all fail. You have to unplug the device
 to make it work again. The dmesg would look just as the failed one I
 included in the PR.
 
         -Richard

From: Nate Lawson <nate@root.org>
To: Richard Nyberg <rnyberg@it.su.se>
Cc: freebsd-gnats-submit@freebsd.org
Subject: Re: kern/53094
Date: Wed, 13 Aug 2003 13:56:40 -0700 (PDT)

 Please try the attached patch.  Uncomment the NO_SYNC_CACHE if it doesn't
 work and try again.
 
 Index: scsi_da.c
 ===================================================================
 RCS file: /home/ncvs/src/sys/cam/scsi/scsi_da.c,v
 retrieving revision 1.151
 diff -u -r1.151 scsi_da.c
 --- scsi_da.c	6 Aug 2003 17:30:03 -0000	1.151
 +++ scsi_da.c	13 Aug 2003 20:45:38 -0000
 @@ -94,7 +94,8 @@
  typedef enum {
  	DA_Q_NONE		= 0x00,
  	DA_Q_NO_SYNC_CACHE	= 0x01,
 -	DA_Q_NO_6_BYTE		= 0x02
 +	DA_Q_NO_6_BYTE		= 0x02,
 +	DA_Q_NO_PREVENT		= 0x04
  } da_quirks;
 
  typedef enum {
 @@ -222,9 +223,7 @@
  		/*quirks*/ DA_Q_NO_6_BYTE
  	},
  	{
 -		/*
 -		 * See above.
 -		 */
 +		/* See above. */
  		{T_DIRECT, SIP_MEDIA_FIXED, quantum, "VIKING 2*", "*"},
  		/*quirks*/ DA_Q_NO_6_BYTE
  	},
 @@ -365,6 +364,14 @@
  		/*quirks*/ DA_Q_NO_SYNC_CACHE
  	},
  #endif /* DA_OLD_QUIRKS */
 +	{
 +		/*
 +		 * Creative Nomad MUVO mp3 player (USB)
 +		 * PR: kern/53094
 +		 */
 +		{T_DIRECT, SIP_MEDIA_REMOVABLE, "CREATIVE", "NOMAD_MUVO", "*"},
 +		/*quirks*/ /*DA_Q_NO_SYNC_CACHE|*/DA_Q_NO_PREVENT
 +	},
  };
 
  static	disk_strategy_t	dastrategy;
 @@ -484,7 +491,8 @@
  	}
 
  	if (error == 0) {
 -		if ((softc->flags & DA_FLAG_PACK_REMOVABLE) != 0)
 +		if ((softc->flags & DA_FLAG_PACK_REMOVABLE) != 0 &&
 +		    (softc._quirks & DA_Q_NO_PREVENT) == 0)
  			daprevent(periph, PR_PREVENT);
  	} else {
  		softc->flags &= ~DA_FLAG_OPEN;
 @@ -562,7 +570,8 @@
  	}
 
  	if ((softc->flags & DA_FLAG_PACK_REMOVABLE) != 0) {
 -		daprevent(periph, PR_ALLOW);
 +		if ((softc->quirks & DA_Q_NO_PREVENT) == 0)
 +			daprevent(periph, PR_ALLOW);
  		/*
  		 * If we've got removeable media, mark the blocksize as
  		 * unavailable, since it could change when new media is
State-Changed-From-To: open->closed 
State-Changed-By: njl 
State-Changed-When: Fri Aug 22 09:35:09 PDT 2003 
State-Changed-Why:  
The quirk has been committed and it will be mfcd before 4.9. 


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

From: Ryan <ryan@packetwatch.net>
To: njl@FreeBSD.org, freebsd-gnats-submit@FreeBSD.org,
	rnyberg@it.su.se
Cc:  
Subject: Re: kern/53094: QUIRK: Creative Nomad Muvo USB mp3 player
Date: Fri, 06 Feb 2004 11:45:53 -0600

 Hi,
 
 I've read on the following page
 (http://www.freebsd.org/cgi/query-pr.cgi?pr=53094) how to get the
 Creative Nomad Muvo USB mp3 player to work in FreeBSD 5.1. It works
 great. I was wondering if it will ever be put in the file
 /usr/src/sys/cam/scsi/scsi_da.c. Whenever I cvsup my source for
 RELENG_5_1, the Nomad Muvo patch is never included. Everytime, I cvsup
 the sources I have to patch the scsi_da.c file to include support for my
 Nomad Muvo. I was wondering if you could please include this from now on
 in RELENG_5_1. Thanks.
 
 Ryan
 
 
>Unformatted:
