Initialize qc->pad_len for each new command. This ensures
that pad_len is not set to a stale value for zero data
length commands.

Signed-off-by: Brian King <[EMAIL PROTECTED]>
---

 linux-2.6-bjking1/include/linux/libata.h |    1 +
 1 files changed, 1 insertion(+)

diff -puN include/linux/libata.h~libata_init_pad_len include/linux/libata.h
--- linux-2.6/include/linux/libata.h~libata_init_pad_len        2007-01-17 
11:15:30.000000000 -0600
+++ linux-2.6-bjking1/include/linux/libata.h    2007-01-17 11:15:30.000000000 
-0600
@@ -1151,6 +1151,7 @@ static inline void ata_qc_reinit(struct 
        qc->nbytes = qc->curbytes = 0;
        qc->n_elem = 0;
        qc->err_mask = 0;
+       qc->pad_len = 0;
 
        ata_tf_init(qc->dev, &qc->tf);
 
_
-
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

Reply via email to