Browse Source

libata: Initialize nbytes for internal sg commands

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@linux.vnet.ibm.com>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
Brian King 18 years ago
parent
commit
49c8042996
1 changed files with 1 additions and 0 deletions
  1. 1 0
      drivers/ata/libata-core.c

+ 1 - 0
drivers/ata/libata-core.c

@@ -1250,6 +1250,7 @@ unsigned ata_exec_internal_sg(struct ata_device *dev,
 
 		ata_sg_init(qc, sg, n_elem);
 		qc->nsect = buflen / ATA_SECT_SIZE;
+		qc->nbytes = buflen;
 	}
 
 	qc->private_data = &wait;