On Mon, 18 Apr 2005, Grant Grundler wrote:

> On Mon, Apr 18, 2005 at 11:47:41AM -0400, Alan Stern wrote:
> > > I could dd the entire /dev/sda1 to a file and then loopback
> > > mount the file to "unload" the .jpg files from the "usb disk".
> > > 
> > > "dd if=/dev/sda1" stopped working too with 2.6.11.
> > > I would get bad block errors at the same location:
> > > -rw-r--r--    1 root      root       63275008 Apr 10 22:35 sda1.bad-01
> > > -rw-r--r--    1 root      root       63275008 Apr 11 08:12 sda1.bad-02
> > 
> > I don't think there were any significant changes to the USB subsystem 
> > between 2.6.10 and 2.6.11.  At least, not significant enough to cause 
> > this.
> 
> Sorry - I didn't want to imply I knew 2.6.11 was the first
> broken rev. I just happen to be using 2.6.11 now.

You said that "dd" worked under 2.6.10 and failed under 2.6.11.  Or did I 
misunderstand?

> > It's possible that this is a throughput issue, that the camera can't 
> > handle transfers occurring too rapidly.  I can't think of any other 
> > reason why changing the elevator algorithm should have an effect.
> 
> Well, the HP r707 camera worked fine with 2.4.25.
> Are 2.4.x USB storage drivers slower than 2.6.x implementation?
> async vs sysnc xfer or something like that perhaps?

2.6 does do USB storage transfers much faster than 2.4.  Something like 
async vs. sync, yes.  In more detail, 2.6 queues an entire transfer at 
once so it can take place at the maximum speed of the bus and device, 
whereas 2.4 queues only a page or two at a time.

You could try using the "Low-Performance USB Block driver" (ub) instead of 
usb-storage.  As the name implies, it runs more slowly than usb-storage.  
It's under the Device Drivers/Block devices menu in the kernel 
configuration.

> > I have submitted a couple of patches to try and improve error recovery in 
> > usb-storage.
> 
> While I've tried to apply these patches to 2.6.11, I feel like we
> are going down the wrong path. Is error recovery a normal part of
> block read when talking at device and no one is physically touching
> the USB bus?

Your question isn't entirely clear.  Error do happen from time to time,
even when nobody is physically touching the USB cable.  They can be caused
by several factors, including electromagnetic interference, faulty
electrical termination on the connectors, clock instability, bad firmware
on the device, and who knows what else.  When an error occurs, error
recovery is normal and important.

> My experience is primarily with SCSI and PCI bus devices where it
> is not.

USB hardware seems to be of lower quality generally.  I've heard good 
things about NEC's EHCI controller chips; you could try getting a PCI card 
with one of those.  It might work better than your computer's controller.

> > I think they will apply okay to 2.6.12-rc2.  Maybe they will help; other 
> > prople have reported improvements when using them.
> 
> The first patch applied to 2.6.11 with fuzz.
> The second patch rejected hunk #5:
> patching file drivers/usb/storage/transport.c
> ...
>       Hunk #5 FAILED at 1150.
> 
> I fixed that up by hand but have to abandon ship because
> us_to_host() definition is missing:
> 
> drivers/usb/storage/scsiglue.c: In function `usb_stor_report_bus_reset':
> drivers/usb/storage/scsiglue.c:327: warning: implicit declaration of function 
> `us_to_host'
> 
> grundler <505>cd /usr/src/linux-2.6
> grundler <506>cd drivers/usb
> grundler <507>fgrep us_to_host */*.c
> storage/scsiglue.c:     scsi_report_bus_reset(us_to_host(us), 0);
> storage/transport.c:    scsi_lock(us_to_host(us));
> storage/transport.c:    scsi_unlock(us_to_host(us));
> storage/transport.c:            scsi_lock(us_to_host(us));
> storage/transport.c:            scsi_unlock(us_to_host(us));

Yes, this is one of the changes added after 2.6.11.

> I'll pull a 2.6.12-rcX kernel and see if it works better
> and then apply the patches there if they aren't already included.

Good luck.

Alan Stern



-------------------------------------------------------
This SF.Net email is sponsored by: New Crystal Reports XI.
Version 11 adds new functionality designed to reduce time involved in
creating, integrating, and deploying reporting solutions. Free runtime info,
new features, or free trial, at: http://www.businessobjects.com/devxi/728
_______________________________________________
[email protected]
To unsubscribe, use the last form field at:
https://lists.sourceforge.net/lists/listinfo/linux-usb-users

Reply via email to