Re: [usb-storage] LPC1343 USB ISP trouble

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Tue, Jul 27, 2010 at 01:58:20PM +0200, Peter Stuge wrote:
> My issue on a high level is that when I mount the device, remove the
> old firmware.bin file, write a new file, and unmount the device - the
> thing works in Windows but not in Linux.
> 
> After doing the process in Linux, when reading back the file it has
> 1024 bytes of 0 prepended to it.
> 
> After doing the process in Windows, when reading back the file it has
> no bytes prepended to it.

In that category of "quick things to try", try mounting with -o sync and
see if that makes a difference.

Also, when you say "prepended", do you mean the file is 1024 bytes larger,
exactly, then what you wrote?  And that the data read back is 1024 bytes of
0x00 followed exactly by the exact data pattern you wrote?

What happens if you mount, write, umount, walk away for 5 min, mount,
readback, and compare -- all without actually detaching the device and
re-booting it (which triggers the upgrade process)?

> > It would seem very improbable that this was caused by a USB storage
> > issue.
> 
> I'm starting at the bottom of the driver stack. :) Maybe you can help
> me debug it in any case? Since this is a very small amount of data,
> might it be informative to add a debug print e.g. for every sector
> write?

If you turn on CONFIG_USB_STORAGE_DEBUG you will get some pretty useful but
still reasonably high-level data.

Matt


-- 
Matthew Dharm                              Home: mdharm-usb@xxxxxxxxxxxxxxxxxx 
Maintainer, Linux USB Mass Storage Driver

A:  The most ironic oxymoron wins ...
DP: "Microsoft Works"
A:  Uh, okay, you win.
					-- A.J. & Dust Puppy
User Friendly, 1/18/1998

Attachment: pgpPVQFfzQR0K.pgp
Description: PGP signature


[Index of Archives]     [Linux Media]     [Linux Input]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Old Linux USB Devel Archive]

  Powered by Linux