Re: [PATCH 05/14] libata: make ->data_xfer return the number of consumed bytes

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

 



> It's for draining.  Let's say drive says it wanna transfer 18 bytes but
> the buffer is only 13 bytes long.  If the transfer method consumes 2
> bytes per read, it would consume 14 bytes.  If the transfer method
> consumes 4 bytes per read, it would consume 16 bytes.  If we drain too
> much, we risk hanging the machine.

Do we have any actual cases where trying to drain beyond the controller
granuality is a problem ?

Might be cleaner to sort this (and the DMA assumption of 2 byte
alignment, and possibly 16 byte for some devices/controllers) with 

	dev->pio_io_size;
	dev->dma_io_size;

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

[Index of Archives]     [Linux Filesystems]     [Linux SCSI]     [Linux RAID]     [Git]     [Kernel Newbies]     [Linux Newbie]     [Security]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Samba]     [Device Mapper]

  Powered by Linux