Re: SCSI over USB showstopper bug?



On Tue, 2006-10-31 at 23:08 +0100, Joerg Schilling wrote:
Hi,

it looks as if SG_GET_RESERVED_SIZE & SG_SET_RESERVED_SIZE
are not in interaction with the underlying SCSI transport.

Programs like readcd and cdda2wav that try to get very large SCSI
transfer buffers get a confirmation for nearly any SCSI transfer size
but later when readcd/cdda2wav try to transfer data with an
actual SCSI command, they fail with ENOMEM.

Correct fix: let sg.c make a callback to the underlying SCSI transport
and let it get a confirmation tfor the buffer size.

Quick and dirty fix: reduce the maximum allowed DMA size to the smallest
max DMA size of all SCSI transports.

real good fix:

use SG_IO on the device directly that checks this already




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



Relevant Pages

  • SCSI over USB showstopper bug?
    ... Programs like readcd and cdda2wav that try to get very large SCSI ... transfer buffers get a confirmation for nearly any SCSI transfer size ... let sg.c make a callback to the underlying SCSI transport ... and let it get a confirmation tfor the buffer size. ...
    (Linux-Kernel)
  • Re: SCSI over USB showstopper bug?
    ... Programs like readcd and cdda2wav that try to get very large SCSI ... transfer buffers get a confirmation for nearly any SCSI transfer size ... let sg.c make a callback to the underlying SCSI transport ...
    (Linux-Kernel)
  • Re: SCSI over USB showstopper bug?
    ... Programs like readcd and cdda2wav that try to get very large SCSI ... let sg.c make a callback to the underlying SCSI transport ... Quick and dirty fix: reduce the maximum allowed DMA size to the smallest ...
    (Linux-Kernel)