[PATCH 2/3] 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>
---

 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-17 11:15:17.000000000 -0600
+++ linux-2.6-bjking1/drivers/ata/libata-core.c	2007-01-17 11:15:17.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