diff options
Diffstat (limited to 'drivers/scsi')
-rw-r--r-- | drivers/scsi/ibmvscsi/ibmvfc.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/drivers/scsi/ibmvscsi/ibmvfc.c b/drivers/scsi/ibmvscsi/ibmvfc.c index 58f8c9e39ae8..6ecc0ddd4440 100644 --- a/drivers/scsi/ibmvscsi/ibmvfc.c +++ b/drivers/scsi/ibmvscsi/ibmvfc.c | |||
@@ -1457,8 +1457,8 @@ static void ibmvfc_scsi_done(struct ibmvfc_event *evt) | |||
1457 | struct ibmvfc_cmd *vfc_cmd = &evt->xfer_iu->cmd; | 1457 | struct ibmvfc_cmd *vfc_cmd = &evt->xfer_iu->cmd; |
1458 | struct ibmvfc_fcp_rsp *rsp = &vfc_cmd->rsp; | 1458 | struct ibmvfc_fcp_rsp *rsp = &vfc_cmd->rsp; |
1459 | struct scsi_cmnd *cmnd = evt->cmnd; | 1459 | struct scsi_cmnd *cmnd = evt->cmnd; |
1460 | int rsp_len = 0; | 1460 | u32 rsp_len = 0; |
1461 | int sense_len = rsp->fcp_sense_len; | 1461 | u32 sense_len = rsp->fcp_sense_len; |
1462 | 1462 | ||
1463 | if (cmnd) { | 1463 | if (cmnd) { |
1464 | if (vfc_cmd->response_flags & IBMVFC_ADAPTER_RESID_VALID) | 1464 | if (vfc_cmd->response_flags & IBMVFC_ADAPTER_RESID_VALID) |
@@ -1475,7 +1475,7 @@ static void ibmvfc_scsi_done(struct ibmvfc_event *evt) | |||
1475 | rsp_len = rsp->fcp_rsp_len; | 1475 | rsp_len = rsp->fcp_rsp_len; |
1476 | if ((sense_len + rsp_len) > SCSI_SENSE_BUFFERSIZE) | 1476 | if ((sense_len + rsp_len) > SCSI_SENSE_BUFFERSIZE) |
1477 | sense_len = SCSI_SENSE_BUFFERSIZE - rsp_len; | 1477 | sense_len = SCSI_SENSE_BUFFERSIZE - rsp_len; |
1478 | if ((rsp->flags & FCP_SNS_LEN_VALID) && rsp->fcp_sense_len) | 1478 | if ((rsp->flags & FCP_SNS_LEN_VALID) && rsp->fcp_sense_len && rsp_len <= 8) |
1479 | memcpy(cmnd->sense_buffer, rsp->data.sense + rsp_len, sense_len); | 1479 | memcpy(cmnd->sense_buffer, rsp->data.sense + rsp_len, sense_len); |
1480 | 1480 | ||
1481 | ibmvfc_log_error(evt); | 1481 | ibmvfc_log_error(evt); |