Tejun Heo wrote:
qc->nbytes doesn't include extra buffers setup by libata core layer
and my be odd. This patch adds qc->dma_nbytes which includes any
extra buffers setup by libata core layer and is guaranteed to be
aligned on 4 byte boundary.
This value is to be used to program the host controller. As this
represents the actual length of buffer available to the controller and
the controller must be able to deal with short transfers for ATAPI
commands which can transfer variable length, this shouldn't break any
controllers while making problems like rounding-down and controllers
choking up on odd transfer bytes much less likely.
Signed-off-by: Tejun Heo <[EMAIL PROTECTED]>
---
drivers/ata/libata-core.c | 11 +++++++----
drivers/ata/pata_pdc202xx_old.c | 2 +-
drivers/ata/sata_inic162x.c | 2 +-
drivers/ata/sata_qstor.c | 2 +-
include/linux/libata.h | 3 ++-
5 files changed, 12 insertions(+), 8 deletions(-)
I would suggest two values:
qc->nbytes -> value to program host controllers with
qc->raw_nbytes -> the precise value, without any padding etc.
IMO this makes it more likely that people will use the "right" value
-
To unsubscribe from this list: send the line "unsubscribe linux-ide" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at http://vger.kernel.org/majordomo-info.html