On Tue, 14 Mar 2000, Jens Axboe wrote:

> On Tue, Mar 14 2000, Matthew Dharm wrote:
> > Unfortunately, for USB Mass Storage, getting an accurate idea of how much
> > data there is to transfer (especially for commands that can only transfer
> > a fixed amount of information) is very important.  So far, this is the
> > only case I've found where it's wrong, and I'm afraid I don't have the
> > time to discover where is is going wrong before 2.4.0
> 
> This must be a loose requirement, I hope.

"loose" is an odd word... for my driver, it's pretty loose.  For some
devices, it's not.  That is, the protocol has the capacity to handle
requests for more data than is there.  However, some devices do not
respond well to this condition, but most do.  In general, the device
firmware code paths have been tested for command which you expect to
return a different amount of information (MODE_SENSE, for example), but
not for commands which expect a fixed amount of information
(READ_CAPACITY, for example).  This is a device firmware problem, but
really it's being caused by the SCSI layer doing the wrong thing.

For my driver, I've tested code paths to deal with both cases very
intensively.  But I generally rely on the SCSI command to tell me how much
data to expect, and I have a CD-ROM that freaks out if that's wrong.

> > Would someone who is more familiar with these layer (Eric?  someone else?)
> > please fix this?  And let me know when you do so I can test it.  I imagine
> > that it's probably, as you indicate, just a quick little fix to some relic
> > code.  Hopefully we can get this in before 2.4.0
> 
> Ok, fixes attached for sr to set transfer length correctly for READ_CAPACITY.
> SD already does this correctly.
> 
> I assume that you meant CD-ROM then?

This is correct.  Has this patch been sent to Linus?

Matt Dharm

-- 
Matthew Dharm                              Home: [EMAIL PROTECTED] 
Engineer, Qualcomm, Inc.                         Work: [EMAIL PROTECTED]

I want my GPFs!!!
                                        -- Stef
User Friendly, 11/9/1998


-
To unsubscribe from this list: send the line "unsubscribe linux-scsi" in
the body of a message to [EMAIL PROTECTED]

Reply via email to