Re: [PATCH] [SCSI] sg.c: SG_DXFER_TO_FROM_DEV mean DMA_BIDIRECTIONAL

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

 



Luben Tuikov wrote:
> SG_DXFER_TO_FROM_DEV means DMA_BIDIRECTIONAL, not
> DMA_FROM_DEVICE.
> 
> Signed-off-by: Luben Tuikov <ltuikov@xxxxxxxxx>
> ---
>  drivers/scsi/sg.c |   11 +++++------
>  1 files changed, 5 insertions(+), 6 deletions(-)
> 
> This patch is 8 months old.

While this patch is sensible, it breaks a very arcane
usage that I inherited with the sg driver in 1998.
At that time there was no resid, so application clients
(e.g. cdrecord) had no way of knowing if the amount of
data they requested to be read, was actually read.
So, as indirect IO was the only game in town, the
hack used was to prefill the kernel buffer prior to
a read, and then check if it had been overwritten
after the read operation.
Hence SG_DXFER_TO_FROM_DEV was actually a read from
the device.

Some LLDs still do not implement resid (properly).

I'm happy to accept the change as long as people are
prepared to wear the breakage.

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

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [SCSI Target Devel]     [Linux SCSI Target Infrastructure]     [Kernel Newbies]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Linux IIO]     [Samba]     [Device Mapper]
  Powered by Linux