Re: Fw: Elitegroup K7S5A + usb_storage problem

2005-08-07 Thread Pete Zaitcev
> when i delete the files which are on the stick and do an umount/mount cycle, 
> the files are there again. 
>[... other mail ...]

> I did the usbmon thing (hopefully correctly). Attached is the output.

Yes, that was perfect, thanks a lot. Unfortunately, I do not see a lot
of interesting things. The last write before the disconnect is a FAT
update:

c31650b8 1617078003 S Bo:006:01 -115 31 = 55534243 c600 0002 0a2a 
 3001  00
c31650b8 1617078987 C Bo:006:01 0 31 >
c31650b8 1617078997 S Bo:006:01 -115 512 = f8ff    
   
c31650b8 1617080988 C Bo:006:01 0 512 >
c31650b8 1617080998 S Bi:006:02 -115 13 <
c31650b8 1617084987 C Bi:006:02 0 13 = 55534253 c600  00

Only one cluster was taken, when compared with the FAT that was read.
Everything seems to be in order. But the next trace (after replug -
see the device number changing from 6 to 7) shows FAT with old contents
being read (same block number 0x30):

> cd6960b8 1874976301 S Bo:007:01 -115 31 = 55534243 0b00 0002 8a28 
>  3001  00
> cd6960b8 1874977274 C Bo:007:01 0 31 >
> cd6960b8 1874977288 S Bi:007:02 -115 512 <
> cd6960b8 1874979271 C Bi:007:02 0 512 = f8ff    
>    
> cd6960b8 1874979282 S Bi:007:02 -115 13 <
> cd6960b8 1874981271 C Bi:007:02 0 13 = 55534253 0b00  00

So, the device replies that writes were successful, but does not
actually commit them to the stable storage.

I suspect that this device may require some delays. I seem to recall
that we added delayes to usb-storage when we worked with Genesys
Logic. But ub contains no delays.

How about this:

--- linux-2.6.13-rc4/drivers/block/ub.c 2005-07-29 19:51:00.0 -0700
+++ linux-2.6.13-rc4-lem/drivers/block/ub.c 2005-08-07 13:48:11.0 
-0700
@@ -1209,6 +1279,8 @@
return;
}
 
+   udelay(125);// XXX for Martin Maurer <[EMAIL PROTECTED]> 
+
UB_INIT_COMPLETION(sc->work_done);
 
if (cmd->dir == UB_DIR_READ)

Please try this patchlet and let us know how it went.

-- Pete
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


Re: Fw: Elitegroup K7S5A + usb_storage problem

2005-08-07 Thread Pete Zaitcev
 when i delete the files which are on the stick and do an umount/mount cycle, 
 the files are there again. 
[... other mail ...]

 I did the usbmon thing (hopefully correctly). Attached is the output.

Yes, that was perfect, thanks a lot. Unfortunately, I do not see a lot
of interesting things. The last write before the disconnect is a FAT
update:

c31650b8 1617078003 S Bo:006:01 -115 31 = 55534243 c600 0002 0a2a 
 3001  00
c31650b8 1617078987 C Bo:006:01 0 31 
c31650b8 1617078997 S Bo:006:01 -115 512 = f8ff    
   
c31650b8 1617080988 C Bo:006:01 0 512 
c31650b8 1617080998 S Bi:006:02 -115 13 
c31650b8 1617084987 C Bi:006:02 0 13 = 55534253 c600  00

Only one cluster was taken, when compared with the FAT that was read.
Everything seems to be in order. But the next trace (after replug -
see the device number changing from 6 to 7) shows FAT with old contents
being read (same block number 0x30):

 cd6960b8 1874976301 S Bo:007:01 -115 31 = 55534243 0b00 0002 8a28 
  3001  00
 cd6960b8 1874977274 C Bo:007:01 0 31 
 cd6960b8 1874977288 S Bi:007:02 -115 512 
 cd6960b8 1874979271 C Bi:007:02 0 512 = f8ff    
    
 cd6960b8 1874979282 S Bi:007:02 -115 13 
 cd6960b8 1874981271 C Bi:007:02 0 13 = 55534253 0b00  00

So, the device replies that writes were successful, but does not
actually commit them to the stable storage.

I suspect that this device may require some delays. I seem to recall
that we added delayes to usb-storage when we worked with Genesys
Logic. But ub contains no delays.

How about this:

--- linux-2.6.13-rc4/drivers/block/ub.c 2005-07-29 19:51:00.0 -0700
+++ linux-2.6.13-rc4-lem/drivers/block/ub.c 2005-08-07 13:48:11.0 
-0700
@@ -1209,6 +1279,8 @@
return;
}
 
+   udelay(125);// XXX for Martin Maurer [EMAIL PROTECTED] 
+
UB_INIT_COMPLETION(sc-work_done);
 
if (cmd-dir == UB_DIR_READ)

Please try this patchlet and let us know how it went.

-- Pete
-
To unsubscribe from this list: send the line unsubscribe linux-kernel in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/