I'm a bit confused by your report. I'm including the whole thing so that the folks on the list can see it - you seem to have sent to only to greg (with a BCC to me?)

I'm guessing you took Alan's patch from the bug report you list (the patch that added IGNORE_RESIDUE support) And tried to modify it accordingly for your device? The rest of the patch - short of the entry for your device - is already in the kernel, and only the entry would be needed.

However, before decreeing this device needy of the RESIDUE flag, I'd like to see the output of usb-storage with verbose debugging mode on. Can you turn that on and send the output of dmesg?

I wouldn't surprise me if this device needs that, as I just added this flag for another "Ours Technology" device...

m0sia wrote:
> Hello,
>
> Please add new "unusual" device.
>
> Hardware Environment: asus p4p800 motherboard + seitec usb stick
> Problem Description:
>
> # lsusb
> Bus 005 Device 001: ID 0000:0000
> Bus 004 Device 001: ID 0000:0000
> Bus 003 Device 003: ID 0ea0:6828 Ours Technology, Inc. OTI-6828 Flash Disk
> Bus 003 Device 001: ID 0000:0000
> Bus 002 Device 003: ID 045e:0059 Microsoft Corp. Wireless IntelliMouse Explorer
> Bus 002 Device 001: ID 0000:0000
> Bus 001 Device 001: ID 0000:0000
>
> # lsmod|grep usb
> usbhid 23936 0
> usbcore 101732 7 ub,ohci_hcd,ehci_hcd,usbhid,uhci_hcd
>
> I tried scsi emulation(Low Performance USB Block driver (BLK_DEV_UB) is off):
> #mount /dev/sdb1 /mnt/usb
> mount: /dev/sdb1: can't read superblock
> #dmesg|tail
>
> USB Mass Storage support registered.
> <skiped>
> usb-storage: *** thread sleeping.
> SCSI error : <2 0 0 0> return code = 0x10070000
> end_request: I/O error, dev sdb, sector 42
> FAT: unable to read boot sector
>
> btw usb2.0 flash disk works perfectly.
>
> Problem exisit on all 2.6.8-* and 2.6.9-* sources(love,gentoo,nitro,mm,ck)
>
> SOLVED:
>
> 1) Disabled "Low Performance USB Block driver (BLK_DEV_UB)"
> 2) same bug here: http://bugme.osdl.org/show_bug.cgi?id=3223
>
> #cat /proc/bus/usb/devices
> T: Bus=04 Lev=01 Prnt=01 Port=00 Cnt=01 Dev#= 3 Spd=12 MxCh= 0
> D: Ver= 1.10 Cls=00(>ifc ) Sub=00 Prot=00 MxPS=64 #Cfgs= 1
> P: Vendor=0ea0 ProdID=6828 Rev= 1.10
> S: Manufacturer=USB
> S: Product=Flash Disk
> C:* #Ifs= 1 Cfg#= 1 Atr=80 MxPwr=100mA
> I: If#= 0 Alt= 0 #EPs= 3 Cls=08(stor.) Sub=06 Prot=50 Driver=usb-storage
> E: Ad=81(I) Atr=02(Bulk) MxPS= 64 Ivl=0ms
> E: Ad=02(O) Atr=02(Bulk) MxPS= 64 Ivl=0ms
> E: Ad=83(I) Atr=03(Int.) MxPS= 2 Ivl=255ms
>
> Patch to fix:
>
> ===== 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 Wed Aug 18 11:48:27 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 Wed Aug 18 11:47:06 2004
> @@ -265,6 +265,13 @@
> US_SC_8070, US_PR_BULK, NULL,
> US_FL_FIX_INQUIRY ),
>
> +/* Reported by m0sia <[EMAIL PROTECTED]> */
> +UNUSUAL_DEV( 0x0ea0, 0x6828, 0x0110, 0x0110,
> + "USB",
> + "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",
> ===== 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 Wed Aug 18 11:46:58 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 */
> Best regards, m0sia.
>
>
>
>


-- Phil Dibowitz [EMAIL PROTECTED] Freeware and Technical Pages Insanity Palace of Metallica http://www.phildev.net/ http://www.ipom.com/

"They that can give up essential liberty to obtain a little temporary
safety deserve neither liberty nor safety."
 - Benjamin Franklin, 1759


Attachment: signature.asc
Description: OpenPGP digital signature

Reply via email to