MPT fusion data transfer residuals
Subsystems (2)
PATCH 1/1 MPT fusion data transfer residuals
This patch to lk 2.4.27 fixes two problems with the MPT fusion driver:
1) Data transfer commands that transfer no data but have GOOD status should not return DID_SOFT_ERROR.
2) Set the data transfer residual for commands that return CHECK CONDITION status. Without this patch, only commands that return GOOD status have the data transfer residual set.
Anthony J. Battersby
Cybernetics
drivers/message/fusion/mptscsih.c +5 -1
@@ -885,7 +885,7 @@*/ ; }else { -if ( (xfer_cnt ==0 ) || (sc->underflow > xfer_cnt)) { +if (sc->underflow > xfer_cnt) { sc->result =DID_SOFT_ERROR <<16 ; }if (scsi_state & (MPI_SCSI_STATE_AUTOSENSE_FAILED |MPI_SCSI_STATE_NO_SCSI_STATUS )) {
@@ -1004,6 +1004,10 @@ sc->buffer, xfer_cnt); } + +#if LINUX_VERSION_CODE >=KERNEL_VERSION (2 ,3 ,0 ) + sc->resid = sc->request_bufflen - xfer_cnt; +#endif break ;case MPI_IOCSTATUS_SCSI_PROTOCOL_ERROR :/* 0x0047 */