瀏覽代碼

[SCSI] ipr: set the data list length in the request control block

In bring up testing for the new 64 bit adapters, the first read command failed
after loading the driver.  The cause was that the command requires more than
one scatter gather element and the corresponding code to set the data list
length in the request control block was missing.  This patch adds the correct
assignment.

Signed-off-by: Wayne Boyer <wayneb@linux.vnet.ibm.com>
Acked-by: Brian King <brking@linux.vnet.ibm.com>
Signed-off-by: James Bottomley <James.Bottomley@suse.de>
Wayne Boyer 15 年之前
父節點
當前提交
b8803b1cef
共有 1 個文件被更改,包括 2 次插入0 次删除
  1. 2 0
      drivers/scsi/ipr.c

+ 2 - 0
drivers/scsi/ipr.c

@@ -5021,6 +5021,8 @@ static int ipr_build_ioadl64(struct ipr_ioa_cfg *ioa_cfg,
 	ipr_cmd->dma_use_sg = nseg;
 	ipr_cmd->dma_use_sg = nseg;
 
 
 	ioarcb->data_transfer_length = cpu_to_be32(length);
 	ioarcb->data_transfer_length = cpu_to_be32(length);
+	ioarcb->ioadl_len =
+		cpu_to_be32(sizeof(struct ipr_ioadl64_desc) * ipr_cmd->dma_use_sg);
 
 
 	if (scsi_cmd->sc_data_direction == DMA_TO_DEVICE) {
 	if (scsi_cmd->sc_data_direction == DMA_TO_DEVICE) {
 		ioadl_flags = IPR_IOADL_FLAGS_WRITE;
 		ioadl_flags = IPR_IOADL_FLAGS_WRITE;