Skip to contentSkip to conversation

ipr: set the data list length in the request control block

PATCH In review Wayne Boyer 2 participants 2 messages May 14, 2010 – May 17, 2010 1 message not in the archive

Subsystems (2)
lore
Share & tools
lore
#1 lore raw

PATCH 1/1 ipr: set the data list length in the request control block

In reply to a message not in the archive

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.

---
 drivers/scsi/ipr.c |    2 ++
 1 file changed, 2 insertions(+)
drivers/scsi/ipr.c +2 -0
Index: b/drivers/scsi/ipr.c
===================================================================
@@ -5018,6 +5018,8 @@ static int ipr_build_ioadl64(struct ipr_
 	ipr_cmd->dma_use_sg = nseg;
 
 	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) {
 		ioadl_flags = IPR_IOADL_FLAGS_WRITE;
Acked-by on v1 1/1
#2 lore raw
Quoted 29 lines · Wayne Boyer

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.

---
 drivers/scsi/ipr.c |    2 ++
 1 file changed, 2 insertions(+)

Index: b/drivers/scsi/ipr.c
===================================================================

drivers/scsi/ipr.c +2 -1
@@ -5018,6 +5018,8 @@ static int ipr_build_ioadl64(struct ipr_
 	ipr_cmd->dma_use_sg = nseg;
 
 	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) {
 		ioadl_flags = IPR_IOADL_FLAGS_WRITE;
 
--

To unsubscribe from this list: send the line "unsubscribe linux-scsi" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html

Signature · 3 lines
Brian King
Linux on Power Virtualization
IBM Linux Technology Center