Commit 98c56ad3 authored by Calvin Owens's avatar Calvin Owens Committed by Martin K. Petersen

mpt3sas: Eliminate dead sleep_flag code

With the exception of a single call to wait_for_doorbell_int(), all this
conditional sleeping code is dead. So delete it.
Signed-off-by: default avatarCalvin Owens <calvinowens@fb.com>
Acked-by: default avatarChaitra P B <chaitra.basappa@broadcom.com>
Signed-off-by: default avatarMartin K. Petersen <martin.petersen@oracle.com>
parent 96902835
This diff is collapsed.
...@@ -119,10 +119,6 @@ ...@@ -119,10 +119,6 @@
#define MPT_MAX_CALLBACKS 32 #define MPT_MAX_CALLBACKS 32
#define CAN_SLEEP 1
#define NO_SLEEP 0
#define INTERNAL_CMDS_COUNT 10 /* reserved cmds */ #define INTERNAL_CMDS_COUNT 10 /* reserved cmds */
/* reserved for issuing internally framed scsi io cmds */ /* reserved for issuing internally framed scsi io cmds */
#define INTERNAL_SCSIIO_CMDS_COUNT 3 #define INTERNAL_SCSIIO_CMDS_COUNT 3
...@@ -1219,7 +1215,7 @@ int mpt3sas_base_attach(struct MPT3SAS_ADAPTER *ioc); ...@@ -1219,7 +1215,7 @@ int mpt3sas_base_attach(struct MPT3SAS_ADAPTER *ioc);
void mpt3sas_base_detach(struct MPT3SAS_ADAPTER *ioc); void mpt3sas_base_detach(struct MPT3SAS_ADAPTER *ioc);
int mpt3sas_base_map_resources(struct MPT3SAS_ADAPTER *ioc); int mpt3sas_base_map_resources(struct MPT3SAS_ADAPTER *ioc);
void mpt3sas_base_free_resources(struct MPT3SAS_ADAPTER *ioc); void mpt3sas_base_free_resources(struct MPT3SAS_ADAPTER *ioc);
int mpt3sas_base_hard_reset_handler(struct MPT3SAS_ADAPTER *ioc, int sleep_flag, int mpt3sas_base_hard_reset_handler(struct MPT3SAS_ADAPTER *ioc,
enum reset_type type); enum reset_type type);
void *mpt3sas_base_get_msg_frame(struct MPT3SAS_ADAPTER *ioc, u16 smid); void *mpt3sas_base_get_msg_frame(struct MPT3SAS_ADAPTER *ioc, u16 smid);
......
...@@ -491,8 +491,7 @@ _config_request(struct MPT3SAS_ADAPTER *ioc, Mpi2ConfigRequest_t ...@@ -491,8 +491,7 @@ _config_request(struct MPT3SAS_ADAPTER *ioc, Mpi2ConfigRequest_t
mutex_unlock(&ioc->config_cmds.mutex); mutex_unlock(&ioc->config_cmds.mutex);
if (issue_host_reset) if (issue_host_reset)
mpt3sas_base_hard_reset_handler(ioc, CAN_SLEEP, mpt3sas_base_hard_reset_handler(ioc, FORCE_BIG_HAMMER);
FORCE_BIG_HAMMER);
return r; return r;
} }
......
...@@ -1005,8 +1005,7 @@ _ctl_do_mpt_command(struct MPT3SAS_ADAPTER *ioc, struct mpt3_ioctl_command karg, ...@@ -1005,8 +1005,7 @@ _ctl_do_mpt_command(struct MPT3SAS_ADAPTER *ioc, struct mpt3_ioctl_command karg,
le16_to_cpu(mpi_request->FunctionDependent1), 0, 0, le16_to_cpu(mpi_request->FunctionDependent1), 0, 0,
0, MPI2_SCSITASKMGMT_TASKTYPE_TARGET_RESET, 0, 30); 0, MPI2_SCSITASKMGMT_TASKTYPE_TARGET_RESET, 0, 30);
} else } else
mpt3sas_base_hard_reset_handler(ioc, CAN_SLEEP, mpt3sas_base_hard_reset_handler(ioc, FORCE_BIG_HAMMER);
FORCE_BIG_HAMMER);
} }
out: out:
...@@ -1219,8 +1218,7 @@ _ctl_do_reset(struct MPT3SAS_ADAPTER *ioc, void __user *arg) ...@@ -1219,8 +1218,7 @@ _ctl_do_reset(struct MPT3SAS_ADAPTER *ioc, void __user *arg)
dctlprintk(ioc, pr_info(MPT3SAS_FMT "%s: enter\n", ioc->name, dctlprintk(ioc, pr_info(MPT3SAS_FMT "%s: enter\n", ioc->name,
__func__)); __func__));
retval = mpt3sas_base_hard_reset_handler(ioc, CAN_SLEEP, retval = mpt3sas_base_hard_reset_handler(ioc, FORCE_BIG_HAMMER);
FORCE_BIG_HAMMER);
pr_info(MPT3SAS_FMT "host reset: %s\n", pr_info(MPT3SAS_FMT "host reset: %s\n",
ioc->name, ((!retval) ? "SUCCESS" : "FAILED")); ioc->name, ((!retval) ? "SUCCESS" : "FAILED"));
return 0; return 0;
...@@ -1537,8 +1535,7 @@ _ctl_diag_register_2(struct MPT3SAS_ADAPTER *ioc, ...@@ -1537,8 +1535,7 @@ _ctl_diag_register_2(struct MPT3SAS_ADAPTER *ioc,
issue_host_reset: issue_host_reset:
if (issue_reset) if (issue_reset)
mpt3sas_base_hard_reset_handler(ioc, CAN_SLEEP, mpt3sas_base_hard_reset_handler(ioc, FORCE_BIG_HAMMER);
FORCE_BIG_HAMMER);
out: out:
...@@ -1973,8 +1970,7 @@ _ctl_diag_release(struct MPT3SAS_ADAPTER *ioc, void __user *arg) ...@@ -1973,8 +1970,7 @@ _ctl_diag_release(struct MPT3SAS_ADAPTER *ioc, void __user *arg)
rc = mpt3sas_send_diag_release(ioc, buffer_type, &issue_reset); rc = mpt3sas_send_diag_release(ioc, buffer_type, &issue_reset);
if (issue_reset) if (issue_reset)
mpt3sas_base_hard_reset_handler(ioc, CAN_SLEEP, mpt3sas_base_hard_reset_handler(ioc, FORCE_BIG_HAMMER);
FORCE_BIG_HAMMER);
return rc; return rc;
} }
...@@ -2154,8 +2150,7 @@ _ctl_diag_read_buffer(struct MPT3SAS_ADAPTER *ioc, void __user *arg) ...@@ -2154,8 +2150,7 @@ _ctl_diag_read_buffer(struct MPT3SAS_ADAPTER *ioc, void __user *arg)
issue_host_reset: issue_host_reset:
if (issue_reset) if (issue_reset)
mpt3sas_base_hard_reset_handler(ioc, CAN_SLEEP, mpt3sas_base_hard_reset_handler(ioc, FORCE_BIG_HAMMER);
FORCE_BIG_HAMMER);
out: out:
......
...@@ -2241,16 +2241,14 @@ mpt3sas_scsih_issue_tm(struct MPT3SAS_ADAPTER *ioc, u16 handle, uint channel, ...@@ -2241,16 +2241,14 @@ mpt3sas_scsih_issue_tm(struct MPT3SAS_ADAPTER *ioc, u16 handle, uint channel,
if (ioc_state & MPI2_DOORBELL_USED) { if (ioc_state & MPI2_DOORBELL_USED) {
dhsprintk(ioc, pr_info(MPT3SAS_FMT dhsprintk(ioc, pr_info(MPT3SAS_FMT
"unexpected doorbell active!\n", ioc->name)); "unexpected doorbell active!\n", ioc->name));
rc = mpt3sas_base_hard_reset_handler(ioc, CAN_SLEEP, rc = mpt3sas_base_hard_reset_handler(ioc, FORCE_BIG_HAMMER);
FORCE_BIG_HAMMER);
return (!rc) ? SUCCESS : FAILED; return (!rc) ? SUCCESS : FAILED;
} }
if ((ioc_state & MPI2_IOC_STATE_MASK) == MPI2_IOC_STATE_FAULT) { if ((ioc_state & MPI2_IOC_STATE_MASK) == MPI2_IOC_STATE_FAULT) {
mpt3sas_base_fault_info(ioc, ioc_state & mpt3sas_base_fault_info(ioc, ioc_state &
MPI2_DOORBELL_DATA_MASK); MPI2_DOORBELL_DATA_MASK);
rc = mpt3sas_base_hard_reset_handler(ioc, CAN_SLEEP, rc = mpt3sas_base_hard_reset_handler(ioc, FORCE_BIG_HAMMER);
FORCE_BIG_HAMMER);
return (!rc) ? SUCCESS : FAILED; return (!rc) ? SUCCESS : FAILED;
} }
...@@ -2292,8 +2290,8 @@ mpt3sas_scsih_issue_tm(struct MPT3SAS_ADAPTER *ioc, u16 handle, uint channel, ...@@ -2292,8 +2290,8 @@ mpt3sas_scsih_issue_tm(struct MPT3SAS_ADAPTER *ioc, u16 handle, uint channel,
_debug_dump_mf(mpi_request, _debug_dump_mf(mpi_request,
sizeof(Mpi2SCSITaskManagementRequest_t)/4); sizeof(Mpi2SCSITaskManagementRequest_t)/4);
if (!(ioc->tm_cmds.status & MPT3_CMD_RESET)) { if (!(ioc->tm_cmds.status & MPT3_CMD_RESET)) {
rc = mpt3sas_base_hard_reset_handler(ioc, CAN_SLEEP, rc = mpt3sas_base_hard_reset_handler(ioc,
FORCE_BIG_HAMMER); FORCE_BIG_HAMMER);
rc = (!rc) ? SUCCESS : FAILED; rc = (!rc) ? SUCCESS : FAILED;
goto out; goto out;
} }
...@@ -2638,8 +2636,7 @@ scsih_host_reset(struct scsi_cmnd *scmd) ...@@ -2638,8 +2636,7 @@ scsih_host_reset(struct scsi_cmnd *scmd)
goto out; goto out;
} }
retval = mpt3sas_base_hard_reset_handler(ioc, CAN_SLEEP, retval = mpt3sas_base_hard_reset_handler(ioc, FORCE_BIG_HAMMER);
FORCE_BIG_HAMMER);
r = (retval < 0) ? FAILED : SUCCESS; r = (retval < 0) ? FAILED : SUCCESS;
out: out:
pr_info(MPT3SAS_FMT "host reset: %s scmd(%p)\n", pr_info(MPT3SAS_FMT "host reset: %s scmd(%p)\n",
...@@ -6295,8 +6292,7 @@ _scsih_ir_fastpath(struct MPT3SAS_ADAPTER *ioc, u16 handle, u8 phys_disk_num) ...@@ -6295,8 +6292,7 @@ _scsih_ir_fastpath(struct MPT3SAS_ADAPTER *ioc, u16 handle, u8 phys_disk_num)
mutex_unlock(&ioc->scsih_cmds.mutex); mutex_unlock(&ioc->scsih_cmds.mutex);
if (issue_reset) if (issue_reset)
mpt3sas_base_hard_reset_handler(ioc, CAN_SLEEP, mpt3sas_base_hard_reset_handler(ioc, FORCE_BIG_HAMMER);
FORCE_BIG_HAMMER);
return rc; return rc;
} }
...@@ -8914,7 +8910,7 @@ scsih_resume(struct pci_dev *pdev) ...@@ -8914,7 +8910,7 @@ scsih_resume(struct pci_dev *pdev)
if (r) if (r)
return r; return r;
mpt3sas_base_hard_reset_handler(ioc, CAN_SLEEP, SOFT_RESET); mpt3sas_base_hard_reset_handler(ioc, SOFT_RESET);
scsi_unblock_requests(shost); scsi_unblock_requests(shost);
mpt3sas_base_start_watchdog(ioc); mpt3sas_base_start_watchdog(ioc);
return 0; return 0;
...@@ -8985,8 +8981,7 @@ scsih_pci_slot_reset(struct pci_dev *pdev) ...@@ -8985,8 +8981,7 @@ scsih_pci_slot_reset(struct pci_dev *pdev)
if (rc) if (rc)
return PCI_ERS_RESULT_DISCONNECT; return PCI_ERS_RESULT_DISCONNECT;
rc = mpt3sas_base_hard_reset_handler(ioc, CAN_SLEEP, rc = mpt3sas_base_hard_reset_handler(ioc, FORCE_BIG_HAMMER);
FORCE_BIG_HAMMER);
pr_warn(MPT3SAS_FMT "hard reset: %s\n", ioc->name, pr_warn(MPT3SAS_FMT "hard reset: %s\n", ioc->name,
(rc == 0) ? "success" : "failed"); (rc == 0) ? "success" : "failed");
......
...@@ -446,8 +446,7 @@ _transport_expander_report_manufacture(struct MPT3SAS_ADAPTER *ioc, ...@@ -446,8 +446,7 @@ _transport_expander_report_manufacture(struct MPT3SAS_ADAPTER *ioc,
issue_host_reset: issue_host_reset:
if (issue_reset) if (issue_reset)
mpt3sas_base_hard_reset_handler(ioc, CAN_SLEEP, mpt3sas_base_hard_reset_handler(ioc, FORCE_BIG_HAMMER);
FORCE_BIG_HAMMER);
out: out:
ioc->transport_cmds.status = MPT3_CMD_NOT_USED; ioc->transport_cmds.status = MPT3_CMD_NOT_USED;
if (data_out) if (data_out)
...@@ -1253,8 +1252,7 @@ _transport_get_expander_phy_error_log(struct MPT3SAS_ADAPTER *ioc, ...@@ -1253,8 +1252,7 @@ _transport_get_expander_phy_error_log(struct MPT3SAS_ADAPTER *ioc,
issue_host_reset: issue_host_reset:
if (issue_reset) if (issue_reset)
mpt3sas_base_hard_reset_handler(ioc, CAN_SLEEP, mpt3sas_base_hard_reset_handler(ioc, FORCE_BIG_HAMMER);
FORCE_BIG_HAMMER);
out: out:
ioc->transport_cmds.status = MPT3_CMD_NOT_USED; ioc->transport_cmds.status = MPT3_CMD_NOT_USED;
if (data_out) if (data_out)
...@@ -1564,8 +1562,7 @@ _transport_expander_phy_control(struct MPT3SAS_ADAPTER *ioc, ...@@ -1564,8 +1562,7 @@ _transport_expander_phy_control(struct MPT3SAS_ADAPTER *ioc,
issue_host_reset: issue_host_reset:
if (issue_reset) if (issue_reset)
mpt3sas_base_hard_reset_handler(ioc, CAN_SLEEP, mpt3sas_base_hard_reset_handler(ioc, FORCE_BIG_HAMMER);
FORCE_BIG_HAMMER);
out: out:
ioc->transport_cmds.status = MPT3_CMD_NOT_USED; ioc->transport_cmds.status = MPT3_CMD_NOT_USED;
if (data_out) if (data_out)
...@@ -2103,8 +2100,7 @@ _transport_smp_handler(struct Scsi_Host *shost, struct sas_rphy *rphy, ...@@ -2103,8 +2100,7 @@ _transport_smp_handler(struct Scsi_Host *shost, struct sas_rphy *rphy,
issue_host_reset: issue_host_reset:
if (issue_reset) { if (issue_reset) {
mpt3sas_base_hard_reset_handler(ioc, CAN_SLEEP, mpt3sas_base_hard_reset_handler(ioc, FORCE_BIG_HAMMER);
FORCE_BIG_HAMMER);
rc = -ETIMEDOUT; rc = -ETIMEDOUT;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment