Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 173542
b: refs/heads/master
c: 9982f59
h: refs/heads/master
v: v3
  • Loading branch information
Kashyap, Desai authored and James Bottomley committed Oct 29, 2009
1 parent ddc2b70 commit e3d2b3b
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 14 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: a28eb222e3890a4ce190a430e24c483d2b5bb13b
refs/heads/master: 9982f59450930138eb0bf9a4ebf865e8c06ba705
27 changes: 14 additions & 13 deletions trunk/drivers/scsi/mpt2sas/mpt2sas_scsih.c
Original file line number Diff line number Diff line change
Expand Up @@ -3111,7 +3111,7 @@ _scsih_scsi_ioc_info(struct MPT2SAS_ADAPTER *ioc, struct scsi_cmnd *scmd,
if (scsi_state & MPI2_SCSI_STATE_RESPONSE_INFO_VALID) {
response_info = le32_to_cpu(mpi_reply->ResponseInfo);
response_bytes = (u8 *)&response_info;
_scsih_response_code(ioc, response_bytes[3]);
_scsih_response_code(ioc, response_bytes[0]);
}
}
#endif
Expand Down Expand Up @@ -3229,7 +3229,7 @@ _scsih_io_done(struct MPT2SAS_ADAPTER *ioc, u16 smid, u8 msix_index, u32 reply)
u8 scsi_status;
u32 log_info;
struct MPT2SAS_DEVICE *sas_device_priv_data;
u32 response_code;
u32 response_code = 0;

mpi_reply = mpt2sas_base_get_reply_virt_addr(ioc, reply);
scmd = _scsih_scsi_lookup_get(ioc, smid);
Expand All @@ -3251,16 +3251,16 @@ _scsih_io_done(struct MPT2SAS_ADAPTER *ioc, u16 smid, u8 msix_index, u32 reply)
}

/* turning off TLR */
scsi_state = mpi_reply->SCSIState;
if (scsi_state & MPI2_SCSI_STATE_RESPONSE_INFO_VALID)
response_code =
le32_to_cpu(mpi_reply->ResponseInfo) & 0xFF;
if (!sas_device_priv_data->tlr_snoop_check) {
sas_device_priv_data->tlr_snoop_check++;
if (sas_device_priv_data->flags & MPT_DEVICE_TLR_ON) {
response_code = (le32_to_cpu(mpi_reply->ResponseInfo)
>> 24);
if (response_code ==
MPI2_SCSITASKMGMT_RSP_INVALID_FRAME)
sas_device_priv_data->flags &=
~MPT_DEVICE_TLR_ON;
}
if ((sas_device_priv_data->flags & MPT_DEVICE_TLR_ON) &&
response_code == MPI2_SCSITASKMGMT_RSP_INVALID_FRAME)
sas_device_priv_data->flags &=
~MPT_DEVICE_TLR_ON;
}

xfer_cnt = le32_to_cpu(mpi_reply->TransferCount);
Expand All @@ -3271,7 +3271,6 @@ _scsih_io_done(struct MPT2SAS_ADAPTER *ioc, u16 smid, u8 msix_index, u32 reply)
else
log_info = 0;
ioc_status &= MPI2_IOCSTATUS_MASK;
scsi_state = mpi_reply->SCSIState;
scsi_status = mpi_reply->SCSIStatus;

if (ioc_status == MPI2_IOCSTATUS_SCSI_DATA_UNDERRUN && xfer_cnt == 0 &&
Expand Down Expand Up @@ -3356,8 +3355,10 @@ _scsih_io_done(struct MPT2SAS_ADAPTER *ioc, u16 smid, u8 msix_index, u32 reply)
case MPI2_IOCSTATUS_SCSI_RECOVERED_ERROR:
case MPI2_IOCSTATUS_SUCCESS:
scmd->result = (DID_OK << 16) | scsi_status;
if (scsi_state & (MPI2_SCSI_STATE_AUTOSENSE_FAILED |
MPI2_SCSI_STATE_NO_SCSI_STATUS))
if (response_code ==
MPI2_SCSITASKMGMT_RSP_INVALID_FRAME ||
(scsi_state & (MPI2_SCSI_STATE_AUTOSENSE_FAILED |
MPI2_SCSI_STATE_NO_SCSI_STATUS)))
scmd->result = DID_SOFT_ERROR << 16;
else if (scsi_state & MPI2_SCSI_STATE_TERMINATED)
scmd->result = DID_RESET << 16;
Expand Down

0 comments on commit e3d2b3b

Please sign in to comment.