Gitweb: http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=501e0c500217e38276d61445ee0839b3f2c66d05 Commit: 501e0c500217e38276d61445ee0839b3f2c66d05 Parent: 96bc103f4c4e470d82ba5e372191d02ad715da45 Author: Tejun Heo <[EMAIL PROTECTED]> AuthorDate: Wed Jan 17 11:34:02 2007 +0900 Committer: Jeff Garzik <[EMAIL PROTECTED]> CommitDate: Fri Jan 19 19:18:49 2007 -0500
libata: initialize qc->dma_dir to DMA_NONE libata didn't used to init qc->dma_dir to any specific value on qc initialization and command translation path didn't set qc->dma_dir if the command doesn't need data transfer. This made non-data commands to have random qc->dma_dir. This usually doesn't cause problem because LLDs usually check qc->protocol first and look at qc->dma_dir iff the command needs data transfer but this doesn't hold for all LLDs. It might be worthwhile to rename qc->dma_dir to qc->data_dir as we use the field to tag data direction for both PIO and DMA protocols. This problem has been spotted by James Bottomley. Signed-off-by: Tejun Heo <[EMAIL PROTECTED]> Cc: James Bottomley <[EMAIL PROTECTED]> Signed-off-by: Jeff Garzik <[EMAIL PROTECTED]> --- include/linux/libata.h | 1 + 1 files changed, 1 insertions(+), 0 deletions(-) diff --git a/include/linux/libata.h b/include/linux/libata.h index ab27548..e53a13b 100644 --- a/include/linux/libata.h +++ b/include/linux/libata.h @@ -1143,6 +1143,7 @@ static inline void ata_tf_init(struct ata_device *dev, struct ata_taskfile *tf) static inline void ata_qc_reinit(struct ata_queued_cmd *qc) { + qc->dma_dir = DMA_NONE; qc->__sg = NULL; qc->flags = 0; qc->cursect = qc->cursg = qc->cursg_ofs = 0; - To unsubscribe from this list: send the line "unsubscribe git-commits-head" in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html