On Tue, 19 Sep 2006, Florian Echtler wrote:

> > Any such workaround would have to go into the SCSI disk driver, not
> > usb-storage.  All usb-storage does is transfer commands and results back
> > and forth between the SCSI core and the USB device.  If the commands
> > themselves are bad, the SCSI driver needs to be changed to prevent it from
> > issuing them.
> Oh, okay, I didn't know that. But aren't there a bunch of 
> workarounds based on USB ID in the usb-storage driver?

Yes.  However this can't be one of them.  The workarounds in usb-storage 
affect the transport of commands, but they don't affect the contents of 
those commands.

(Well, that's not entirely true.  Some of the workarounds set flags which 
then cause the SCSI layer to modify the commands.  The majority of the 
work still has to be done outside of usb-storage.)

> > Although perhaps nothing really needs to be changed.  Can you set the
> > low-level format of the SD card (e.g., fdisk) so that the main partition
> > doesn't include the last 8 sectors?
> That's exactly what I tried first - unfortunately, the camera insists on
> formatting the card afterwards and it was back to square one. What did 
> work is shrinking the partition by 16 sectors with a hex editor (the 
> partition table generated by the camera is utterly broken and seems to 
> confuse fdisk). This is even a permanent fix, as long as the card isn't 
> formatted in the camera - I was only hoping that there could be a 
> kernel-based fix so that people who are not readily at hand with a hex 
> editor can use it, too..
> 
> BTW: does the SCSI disk driver know about USB IDs? I presume not, in which 
> case fixing this in the SCSI subsystem isn't possible anyway..

The SCSI disk driver does not know about USB IDs.  But the SCSI core 
_does_ know about SCSI vendor and product IDs.  Those can be used to set 
all kinds of blacklist flags.

Alan Stern


-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys -- and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
linux-usb-devel@lists.sourceforge.net
To unsubscribe, use the last form field at:
https://lists.sourceforge.net/lists/listinfo/linux-usb-devel

Reply via email to