kern/137138: QUIRK: ASUS PDA Flash disk emulation

Ilya Bakulin kibab at backbone.deglitch.com
Sat Jul 25 19:50:01 UTC 2009


>Number:         137138
>Category:       kern
>Synopsis:       QUIRK: ASUS PDA Flash disk emulation
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    freebsd-bugs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          update
>Submitter-Id:   current-users
>Arrival-Date:   Sat Jul 25 19:50:01 UTC 2009
>Closed-Date:
>Last-Modified:
>Originator:     Ilya Bakulin
>Release:        FreeBSD 8.0-BETA2 i386
>Organization:
Deglitch Networks
>Environment:
System: FreeBSD kibab-nb.kibab.com 8.0-BETA2 FreeBSD 8.0-BETA2 #2: Sat Jul 25 19:47:18 MSD 2009 root at kibab-nb.kibab.com:/usr/obj/home/kibab/repos/fbsd-src-HEAD/src/src/sys/KIBAB-NB i386



>Description:
	ASUS PDAs have an exciting feature -- they can export plugged-in SD card filesystem as Mass Storage Device. One should just activate "Card Reader" option in PDA settings and connect it to PC.
However, plugging in PDA results in errors due to failing Synchronize Cache operation.
I've discovered that this problem disappears if "NO_SYNCHRONIZE_CACHE" quirk is applied during initial negotiation.
 
>How-To-Repeat:
	Plug-in ASUS PDA with Card Reader options activated in USB configuration. Watch dmesg. You will see the following output:

Jul 25 19:23:12 kibab-nb kernel: ugen3.3: <ASUS> at usbus3
Jul 25 19:23:12 kibab-nb kernel: umass0: <ASUS Generic Mass Storage, class 0/0, rev 2.00/0.00, addr 3> on usbus3
Jul 25 19:23:12 kibab-nb kernel: umass0:  SCSI over Bulk-Only; quirks = 0x0000
Jul 25 19:23:12 kibab-nb root: Unknown USB device: vendor 0x0b05 product 0x422f bus uhub0
Jul 25 19:23:13 kibab-nb kernel: umass0:2:0:-1: Attached to scbus2
Jul 25 19:23:13 kibab-nb kernel: da0 at umass-sim0 bus 0 target 0 lun 0
Jul 25 19:23:13 kibab-nb kernel: da0: <  > Removable Direct Access SCSI-0 device
Jul 25 19:23:13 kibab-nb kernel: da0: 1.000MB/s transfers
Jul 25 19:23:13 kibab-nb kernel: da0: 1876MB (3842048 512 byte sectors: 255H 63S/T 239C)
Jul 25 19:23:13 kibab-nb kernel: (da0:umass-sim0:0:0:0): Synchronize cache failed, status == 0x4, scsi status == 0x0


After applying attached patch to umass.c the problem disappears:

Jul 25 20:04:14 kibab-nb kernel: ugen2.2: <ASUS> at usbus2
Jul 25 20:04:14 kibab-nb kernel: umass0: <ASUS Generic Mass Storage, class 0/0, rev 2.00/0.00, addr 2> on usbus2
Jul 25 20:04:14 kibab-nb kernel: umass0:  SCSI over Bulk-Only; quirks = 0x4000
Jul 25 20:04:14 kibab-nb root: Unknown USB device: vendor 0x0b05 product 0x422f bus uhub2
Jul 25 20:04:15 kibab-nb kernel: umass0:2:0:-1: Attached to scbus2
Jul 25 20:04:15 kibab-nb kernel: da0 at umass-sim0 bus 0 target 0 lun 0
Jul 25 20:04:15 kibab-nb kernel: da0: <  > Removable Direct Access SCSI-0 device
Jul 25 20:04:15 kibab-nb kernel: da0: 1.000MB/s transfers
Jul 25 20:04:15 kibab-nb kernel: da0: 1876MB (3842048 512 byte sectors: 255H 63S/T 239C)


>Fix:

	Apply attached patch, recompile kernel and reboot.

--- umass.c.diff begins here ---
--- sys/dev/usb/storage/umass.c	2009-07-25 19:41:20.000000000 +0400
+++ sys/dev/usb/storage/umass.c	2009-07-25 20:02:09.000000000 +0400
@@ -965,6 +965,11 @@
 		UMASS_PROTO_SCSI | UMASS_PROTO_BBB,
 		NO_SYNCHRONIZE_CACHE
 	},
+	{USB_VENDOR_ASUS, 0x422f, RID_WILDCARD,
+		UMASS_PROTO_SCSI | UMASS_PROTO_BBB,
+		NO_SYNCHRONIZE_CACHE
+	},
+
 	{VID_EOT, PID_EOT, RID_EOT, 0, 0}
 };
 
--- umass.c.diff ends here ---


>Release-Note:
>Audit-Trail:
>Unformatted:


More information about the freebsd-bugs mailing list