[PATCH 1/1] libata: Initialize nbytes for internal sg commands

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Some LLDDs, like ipr, use nbytes and pad_len to determine
the total data transfer length of a command. Make sure
nbytes gets initialized for internally generated commands.

Signed-off-by: Brian King <brking@xxxxxxxxxxxxxxxxxx>
---

Jeff,

This bug is already fixed in #upstream, with Tejun's patch,
which does away with nsect, but it is still broken in 2.6.20.
This is a resend of my original, 1 line patch. If this doesn't
make 2.6.20, it might be a candidate for -stable, since without
it, libata is not able to find SATA devices attached with ipr.

Thanks,

Brian

Signed-off-by: Brian King <brking@xxxxxxxxxxxxxxxxxx>
---

 linux-2.6-bjking1/drivers/ata/libata-core.c |    1 +
 1 files changed, 1 insertion(+)

diff -puN drivers/ata/libata-core.c~libata_fix_nbytes drivers/ata/libata-core.c
--- linux-2.6/drivers/ata/libata-core.c~libata_fix_nbytes	2007-01-30 11:24:20.000000000 -0600
+++ linux-2.6-bjking1/drivers/ata/libata-core.c	2007-01-30 11:24:20.000000000 -0600
@@ -1250,6 +1250,7 @@ unsigned ata_exec_internal_sg(struct ata
 
 		ata_sg_init(qc, sg, n_elem);
 		qc->nsect = buflen / ATA_SECT_SIZE;
+		qc->nbytes = buflen;
 	}
 
 	qc->private_data = &wait;
_
-
To unsubscribe from this list: send the line "unsubscribe linux-ide" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Filesystems]     [Linux SCSI]     [Linux RAID]     [Git]     [Kernel Newbies]     [Linux Newbie]     [Security]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Samba]     [Device Mapper]

  Powered by Linux