aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/libata.h
diff options
context:
space:
mode:
authorBrian King <brking@linux.vnet.ibm.com>2007-01-17 13:32:12 -0500
committerJeff Garzik <jeff@garzik.org>2007-01-24 02:04:34 -0500
commit7a801184fa480e11e6431f184a5bdf31f63326fb (patch)
treeb68cc5daee76cc564f7f48cc038f52be4a855be7 /include/linux/libata.h
parent07c53dac4904206a50dd7c87adabbb1acff903fb (diff)
libata: Fixup n_elem initialization
Fixup the inialization of qc->n_elem. It currently gets initialized to 1 for commands that do not transfer any data. Fix this by initializing n_elem to 0 and only setting to 1 in ata_scsi_qc_new when there is data to transfer. This fixes some problems seen with SATA devices attached to ipr adapters. Signed-off-by: Brian King <brking@linux.vnet.ibm.com> Signed-off-by: Jeff Garzik <jeff@garzik.org>
Diffstat (limited to 'include/linux/libata.h')
-rw-r--r--include/linux/libata.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/include/linux/libata.h b/include/linux/libata.h
index e53a13ba7f78..65d318746ac6 100644
--- a/include/linux/libata.h
+++ b/include/linux/libata.h
@@ -1149,6 +1149,7 @@ static inline void ata_qc_reinit(struct ata_queued_cmd *qc)
1149 qc->cursect = qc->cursg = qc->cursg_ofs = 0; 1149 qc->cursect = qc->cursg = qc->cursg_ofs = 0;
1150 qc->nsect = 0; 1150 qc->nsect = 0;
1151 qc->nbytes = qc->curbytes = 0; 1151 qc->nbytes = qc->curbytes = 0;
1152 qc->n_elem = 0;
1152 qc->err_mask = 0; 1153 qc->err_mask = 0;
1153 1154
1154 ata_tf_init(qc->dev, &qc->tf); 1155 ata_tf_init(qc->dev, &qc->tf);