[PATCH] 2.4 ipr driver should use request_bufflen

Brian King brking at us.ibm.com
Sat Apr 17 07:59:24 EST 2004


I recently came across a bug in the ipr driver that is in the ames 2.4 tree.
Please apply.

-Brian


This patch fixes the 2.4 ipr driver to properly use request_bufflen
instead of bufflen in the scsi_cmd struct when mapping DMA buffers.
Usually these are the same value, but they are different for ERP
ops issued by the eh thread.



---


diff -puN drivers/scsi/ipr/iprdd.c~ipr-request-buffer drivers/scsi/ipr/iprdd.c
--- bk-linux-2.4-ppc64/drivers/scsi/ipr/iprdd.c~ipr-request-buffer	Fri Apr 16 10:42:22 2004
+++ bk-linux-2.4-ppc64-bjking1/drivers/scsi/ipr/iprdd.c	Fri Apr 16 10:42:22 2004
@@ -1128,7 +1128,7 @@ static IPR_INL struct ipr_cmnd* ipr_buil
      p_sis_cmnd->p_scsi_cmd = p_scsi_cmd;
      p_sis_cmnd->ccb.buffer = p_scsi_cmd->buffer;
      p_sis_cmnd->ccb.request_buffer = p_scsi_cmd->request_buffer;
-    p_sis_cmnd->ccb.bufflen = p_scsi_cmd->bufflen;
+    p_sis_cmnd->ccb.bufflen = p_scsi_cmd->request_bufflen;
      p_sis_cmnd->ccb.cmd_len = p_scsi_cmd->cmd_len;
      p_sis_cmnd->ccb.p_resource = p_resource;
      p_sis_cmnd->ccb.underflow = p_scsi_cmd->underflow;
diff -puN drivers/scsi/ipr/version.mk~ipr-request-buffer drivers/scsi/ipr/version.mk
--- bk-linux-2.4-ppc64/drivers/scsi/ipr/version.mk~ipr-request-buffer	Fri Apr 16 10:42:22 2004
+++ bk-linux-2.4-ppc64-bjking1/drivers/scsi/ipr/version.mk	Fri Apr 16 10:42:22 2004
@@ -2,8 +2,8 @@

  IPR_MAJOR_RELEASE=1
  IPR_MINOR_RELEASE=0
-IPR_FIX_LEVEL=3
-IPR_FIX_DATE=(November 10, 2003)
+IPR_FIX_LEVEL=4
+IPR_FIX_DATE=(April 15, 2004)

  IPR_VERSION_STR=Ver. $(IPR_MAJOR_RELEASE) Rev. $(IPR_MINOR_RELEASE).$(IPR_FIX_LEVEL)


_




--
Brian King
eServer Storage I/O
IBM Linux Technology Center


** Sent via the linuxppc64-dev mail list. See http://lists.linuxppc.org/





More information about the Linuxppc64-dev mailing list