Re: USB Stick Problem mit 2.6.8.1 und 2.6.9
On Thu, Oct 21, 2004 at 10:57:27AM +0200, Gerald Holl wrote:
> Joerg Rieger wrote:
> > Schick mir doch mal deinen output von "cat /proc/bus/usb/devices"
> > mit eingestecktem Stick.
>
[...]
Danke.
Wende mal anhängenden Patch auf den Source ohne den anderen Patch an
(der ist in diesem diff enthalten).
--
diff -ur /home/joerg/develop/linux-2.6.9_org/drivers/usb/storage/transport.c linux-2.6.9_rijo/drivers/usb/storage/transport.c
--- /home/joerg/develop/linux-2.6.9_org/drivers/usb/storage/transport.c 2004-10-18 23:53:51.000000000 +0200
+++ linux-2.6.9_rijo/drivers/usb/storage/transport.c 2004-10-21 11:05:11.000000000 +0200
@@ -1055,8 +1055,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) {
Only in linux-2.6.9_rijo/drivers/usb/storage/: transport.c.orig
diff -ur /home/joerg/develop/linux-2.6.9_org/drivers/usb/storage/unusual_devs.h linux-2.6.9_rijo/drivers/usb/storage/unusual_devs.h
--- /home/joerg/develop/linux-2.6.9_org/drivers/usb/storage/unusual_devs.h 2004-10-18 23:54:55.000000000 +0200
+++ linux-2.6.9_rijo/drivers/usb/storage/unusual_devs.h 2004-10-21 11:08:49.000000000 +0200
@@ -265,6 +265,20 @@
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 ),
+
+/* Reported by Gerald Holl <gerald@holl.co.at> */
+UNUSUAL_DEV( 0x0ea0, 0x6828, 0x0100, 0x0100,
+ "OTi",
+ "UStorage Flash Disk",
+ 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",
diff -ur /home/joerg/develop/linux-2.6.9_org/drivers/usb/storage/usb.h linux-2.6.9_rijo/drivers/usb/storage/usb.h
--- /home/joerg/develop/linux-2.6.9_org/drivers/usb/storage/usb.h 2004-10-18 23:54:37.000000000 +0200
+++ linux-2.6.9_rijo/drivers/usb/storage/usb.h 2004-10-21 11:05:11.000000000 +0200
@@ -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 */
Reply to: