From: Tejun Heo Date: Tue, 14 Nov 2006 13:37:35 +0000 (+0900) Subject: [PATCH] libata: fix passthru sense data header X-Git-Tag: v2.6.20-rc1~15^2~9^2~10^2~44 X-Git-Url: http://git.cascardo.eti.br/?a=commitdiff_plain;h=f38621b3109068adc8430bc2d170ccea59df4261;p=cascardo%2Flinux.git [PATCH] libata: fix passthru sense data header sb[7] should contain the length of whole information sense data descriptor while desc[1] should contain the number of following bytes in the descriptor. ie. 14 for sb[7] but 12 for desc[1]. Signed-off-by: Tejun Heo Signed-off-by: Jeff Garzik --- diff --git a/drivers/ata/libata-scsi.c b/drivers/ata/libata-scsi.c index 7a55c2e4ea6e..87f82827c1bf 100644 --- a/drivers/ata/libata-scsi.c +++ b/drivers/ata/libata-scsi.c @@ -713,12 +713,9 @@ void ata_gen_ata_desc_sense(struct ata_queued_cmd *qc) desc[0] = 0x09; - /* - * Set length of additional sense data. - * Since we only populate descriptor 0, the total - * length is the same (fixed) length as descriptor 0. - */ - desc[1] = sb[7] = 14; + /* set length of additional sense data */ + sb[7] = 14; + desc[1] = 12; /* * Copy registers into sense buffer.