Re: Linux scsi / usb-mass-storage and HP printer cardreader bug + fix

Hans de Goede <[email protected]> Fri, 11 Jan 2008 13:48:31 +0100
Newsgroups gmane.linux.scsi,gmane.linux.redhat.fedora.kernel,gmane.linux.usb.devel,gmane.linux.usb.general
Message-ID <[email protected]>
Boaz Harrosh wrote:
> On Thu, Jan 10 2008 at 12:52 +0200, Hans de Goede <[email protected]> wrote:
>>> I'm not sure what the proper solution should be?
>>>
>> I guess the proper solution would be to add a special case to the scsi layer 
>> where the read10 / write10 command is issued, and split the request in 2 there 
>> when it involves the last sector.
>>
>> There was another reply in this thread stating that problems reading the last 
>> sector with sd / mmc cards happen quite often, and that this is most likely not 
>> an isolated case.
>>
>> Regards,
>>
>> Hans
> 
> Yes, you're right. in ULDs it is a much proper way to do this.
> 
> So I guess you'll have to do that special host flag or device
> flag, and add a check for it in sd.c. You'll see that sd.c is 
> already doing bufflen truncation at sd_prep_fn(), just add one
> more case.
> 

Yes,

That will work nicely, I'll write an updated patch this evening (when I have 
access to the printer to test again).

Regards,

Hans


-
To unsubscribe from this list: send the line "unsubscribe linux-scsi" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html