kern/96901: [patch] Add support for X-Micro Flash Disk

Szalai Andras szalai.andras at t-online.hu
Sun May 7 10:20:17 UTC 2006


>Number:         96901
>Category:       kern
>Synopsis:       [patch] Add support for X-Micro Flash Disk
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    freebsd-bugs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          change-request
>Submitter-Id:   current-users
>Arrival-Date:   Sun May 07 10:20:16 GMT 2006
>Closed-Date:
>Last-Modified:
>Originator:     Szalai Andras
>Release:        FreeBSD 6.0-RELEASE-p7 i386
>Organization:
none
>Environment:
System: FreeBSD tristania.kispest.home 6.0-RELEASE-p7 FreeBSD 6.0-RELEASE-p7 #6: Sun Apr 30 17:39:34 CEST 2006 root at tristania.kispest.home:/usr/src/sys/i386/compile/TRISTANIA i386

This device is an ordinary USB flash disk made by X-Micro.

Device identification:

# camcontrol inquiry da0

pass0: <X-Micro Flash Disk 1.13> Removable Direct Access SCSI-0 device 
pass0: Serial Number 
pass0: 40.000MB/s transfers 

# usbdevs -v (only relevant lines are shown)

Controller /dev/usb1:
addr 1: high speed, self powered, config 1, EHCI root hub(0x0000), nVidia(0x0000), rev 1.00
 port 2 addr 2: high speed, power 200 mA, config 1, Flash Disk(0x1600), X-Micro(0x0d7d), rev 1.00

>Description:

With a stock kernel, the device doesn't work after plugging it in.
Kernel log:

May  6 09:42:42 tristania kernel: umass0: X-Micro Flash Disk, rev 2.00/1.00, addr 2
May  6 09:42:42 tristania kernel: da0 at umass-sim0 bus 0 target 0 lun 0
May  6 09:42:42 tristania kernel: da0: <X-Micro Flash Disk 1.13> Removable Direct Access SCSI-0 device 
May  6 09:42:42 tristania kernel: da0: 40.000MB/s transfers
May  6 09:42:42 tristania kernel: da0: 492MB (1007616 512 byte sectors: 64H 32S/T 492C)
May  6 09:42:42 tristania kernel: umass0: Phase Error, residue = 0
May  6 09:42:42 tristania kernel: (da0:umass-sim0:0:0:0): Synchronize cache failed, status == 0x4, scsi status == 0x0
May  6 09:42:42 tristania kernel: umass0: Phase Error, residue = 0
May  6 09:42:42 tristania kernel: (da0:umass-sim0:0:0:0): Synchronize cache failed, status == 0x4, scsi status == 0x0
May  6 09:42:42 tristania kernel: umass0: Phase Error, residue = 0
May  6 09:42:42 tristania kernel: (da0:umass-sim0:0:0:0): Synchronize cache failed, status == 0x4, scsi status == 0x0
May  6 09:42:42 tristania kernel: umass0: Phase Error, residue = 0
May  6 09:42:42 tristania kernel: (da0:umass-sim0:0:0:0): Synchronize cache failed, status == 0x4, scsi status == 0x0
May  6 09:42:42 tristania kernel: umass0: Phase Error, residue = 0
May  6 09:42:42 tristania kernel: (da0:umass-sim0:0:0:0): Synchronize cache failed, status == 0x4, scsi status == 0x0
May  6 09:42:42 tristania kernel: umass0: Phase Error, residue = 0
May  6 09:42:42 tristania kernel: (da0:umass-sim0:0:0:0): Synchronize cache failed, status == 0x4, scsi status == 0x0

The problem seems to be that the device doesn't like the
SYNCHRONIZE CACHE command which therefore must not be
issued.

>How-To-Repeat:

Just plug in the device.

>Fix:

Here is my patch which corrects the problem.

--- xmicro.patch begins here ---
diff -ru --new-file orig/sys/cam/scsi/scsi_da.c new/sys/cam/scsi/scsi_da.c
--- orig/sys/cam/scsi/scsi_da.c	Thu Jun  9 19:35:04 2005
+++ new/sys/cam/scsi/scsi_da.c	Sat Apr 29 09:47:55 2006
@@ -354,6 +354,13 @@
 		{T_DIRECT, SIP_MEDIA_REMOVABLE, "Kingston" , "DataTraveler II+", "*"},
 		/*quirks*/ DA_Q_NO_SYNC_CACHE
 	},
+	{
+		/*
+		 * X-Micro Flash Disk
+		 */
+		{T_DIRECT, SIP_MEDIA_REMOVABLE, "X-Micro" , "Flash Disk", "*"},
+		/*quirks*/ DA_Q_NO_SYNC_CACHE
+	},
 };
 
 static	disk_strategy_t	dastrategy;
--- xmicro.patch ends here ---
>Release-Note:
>Audit-Trail:
>Unformatted:


More information about the freebsd-bugs mailing list