Re: Fwd: SANE-SENSE Support in scsi usb transport

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

 



On Mon, 10 Dec 2012, Raviraj Bhat wrote:

> Feature to truncate user sense buffer was added in the following patch:
> "http://marc.info/?l=linux-usb&m=123135651222832";

No.  There is no such feature.  The patch you're referring to added a 
feature to allow sense buffers larger than 18 bytes.

> There is a possibility of user application misinterpreting it as a
> driver bug as scsi standard or SAT spec do not mention this behavior.
> 
> I would like to ask the experts about the advantages of this feature
> for user level applications? If user buffer is capable of holding
> complete buffer as returned by device, why can't we just fill the
> complete buffer as it is instead of truncating the buffer length?

Because data cannot be transferred directly from the device to the 
user's buffer.  It has to go through a kernel buffer first, and the 
size of that kernel buffer must be known beforehand.

Furthermore, quite a few USB storage devices will crash if asked to
send anything other than 18 bytes of sense data.

Alan Stern

--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


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

  Powered by Linux