lkml.org 
[lkml]   [2004]   [Aug]   [19]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Date
From
SubjectRe: problem mounting vfat USB flash disk (usb mass storage) under 2.6.8.1
The problem you reported has also been reported by someone else; see

http://bugme.osdl.org/show_bug.cgi?id=3223

Briefly, this is a bug in your device, not in the kernel. Until 2.6.8 the
usb-storage driver ignored such bugs, but now it pays attention to them.
(The bug report you found (id 2092) was a completely different, unrelated
problem.)

Below is an updated patch, providing a workaround that should work for
your device.

Alan Stern


===== drivers/usb/storage/transport.c 1.145 vs edited =====
--- 1.145/drivers/usb/storage/transport.c Tue Aug 3 10:17:59 2004
+++ edited/drivers/usb/storage/transport.c Thu Aug 19 10:59:52 2004
@@ -1054,8 +1054,10 @@

/* try to compute the actual residue, based on how much data
* was really transferred and what the device tells us */
- residue = min(residue, transfer_length);
- srb->resid = max(srb->resid, (int) residue);
+ if (!(us->flags & US_FL_IGNORE_RESIDUE)) {
+ residue = min(residue, transfer_length);
+ srb->resid = max(srb->resid, (int) residue);
+ }

/* based on the status code, we report good or bad */
switch (bcs->Status) {
===== drivers/usb/storage/unusual_devs.h 1.144 vs edited =====
--- 1.144/drivers/usb/storage/unusual_devs.h Fri Aug 6 03:59:29 2004
+++ edited/drivers/usb/storage/unusual_devs.h Thu Aug 19 11:13:20 2004
@@ -265,6 +265,13 @@
US_SC_8070, US_PR_BULK, NULL,
US_FL_FIX_INQUIRY ),

+/* Reported by Iacopo Spalletti <avvisi@spalletti.it> */
+UNUSUAL_DEV( 0x052b, 0x1807, 0x0100, 0x0100,
+ "Tekom Technologies, Inc",
+ "300_CAMERA",
+ US_SC_DEVICE, US_PR_DEVICE, NULL,
+ US_FL_IGNORE_RESIDUE ),
+
/* This entry is needed because the device reports Sub=ff */
UNUSUAL_DEV( 0x054c, 0x0010, 0x0106, 0x0450,
"Sony",
@@ -801,7 +808,14 @@
"Solid state disk",
US_SC_DEVICE, US_PR_DEVICE, NULL,
US_FL_FIX_INQUIRY ),
-
+
+/* Reported by Rastislav Stanik <rs_kernel@yahoo.com> */
+UNUSUAL_DEV( 0x0ea0, 0x6828, 0x0110, 0x0110,
+ "USB",
+ "Flash Disk",
+ US_SC_DEVICE, US_PR_DEVICE, NULL,
+ US_FL_IGNORE_RESIDUE ),
+
/* Reported by Kevin Cernekee <kpc-usbdev@gelato.uiuc.edu>
* Tested on hardware version 1.10.
* Entry is needed only for the initializer function override.
===== drivers/usb/storage/usb.h 1.60 vs edited =====
--- 1.60/drivers/usb/storage/usb.h Tue Jul 20 19:30:35 2004
+++ edited/drivers/usb/storage/usb.h Thu Aug 19 10:59:52 2004
@@ -73,6 +73,7 @@
#define US_FL_SCM_MULT_TARG 0x00000020 /* supports multiple targets */
#define US_FL_FIX_INQUIRY 0x00000040 /* INQUIRY response needs faking */
#define US_FL_FIX_CAPACITY 0x00000080 /* READ CAPACITY response too big */
+#define US_FL_IGNORE_RESIDUE 0x00000100 /* reported residue is wrong */

/* Dynamic flag definitions: used in set_bit() etc. */
#define US_FLIDX_URB_ACTIVE 18 /* 0x00040000 current_urb is in use */
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2005-03-22 14:05    [W:0.030 / U:0.100 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site