mirror of
https://github.com/torvalds/linux.git
synced 2026-03-08 03:44:45 +01:00
Merge patch series "mpt3sas: Improve device readiness handling and event recovery"
Ranjan Kumar <ranjan.kumar@broadcom.com> says: This patch series enhances the mpt3sas driver’s device bring-up, readiness detection, and event recovery mechanisms to improve robustness in environments with slow-responding or transient SAS/PCIe devices. The series introduces optional control over issuing TEST UNIT READY (TUR) commands during device unblocking, configurable retry limits, and a mechanism to requeue firmware topology events when devices are temporarily busy. Together, these updates reduce discovery failures and improve recovery reliability following firmware or link events. Link: https://patch.msgid.link/20251113153712.31850-1-ranjan.kumar@broadcom.com Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
This commit is contained in:
commit
c6e9ddc099
3 changed files with 1313 additions and 37 deletions
|
|
@ -843,7 +843,7 @@ mpt3sas_base_start_watchdog(struct MPT3SAS_ADAPTER *ioc)
|
|||
/* initialize fault polling */
|
||||
|
||||
INIT_DELAYED_WORK(&ioc->fault_reset_work, _base_fault_reset_work);
|
||||
snprintf(ioc->fault_reset_work_q_name,
|
||||
scnprintf(ioc->fault_reset_work_q_name,
|
||||
sizeof(ioc->fault_reset_work_q_name), "poll_%s%d_status",
|
||||
ioc->driver_name, ioc->id);
|
||||
ioc->fault_reset_work_q = alloc_ordered_workqueue(
|
||||
|
|
@ -1564,6 +1564,8 @@ _base_get_cb_idx(struct MPT3SAS_ADAPTER *ioc, u16 smid)
|
|||
int i;
|
||||
u16 ctl_smid = ioc->scsiio_depth - INTERNAL_SCSIIO_CMDS_COUNT + 1;
|
||||
u8 cb_idx = 0xFF;
|
||||
u16 discovery_smid =
|
||||
ioc->shost->can_queue + INTERNAL_SCSIIO_FOR_DISCOVERY;
|
||||
|
||||
if (smid < ioc->hi_priority_smid) {
|
||||
struct scsiio_tracker *st;
|
||||
|
|
@ -1572,8 +1574,10 @@ _base_get_cb_idx(struct MPT3SAS_ADAPTER *ioc, u16 smid)
|
|||
st = _get_st_from_smid(ioc, smid);
|
||||
if (st)
|
||||
cb_idx = st->cb_idx;
|
||||
} else if (smid == ctl_smid)
|
||||
} else if (smid < discovery_smid)
|
||||
cb_idx = ioc->ctl_cb_idx;
|
||||
else
|
||||
cb_idx = ioc->scsih_cb_idx;
|
||||
} else if (smid < ioc->internal_smid) {
|
||||
i = smid - ioc->hi_priority_smid;
|
||||
cb_idx = ioc->hpr_lookup[i].cb_idx;
|
||||
|
|
@ -3174,7 +3178,7 @@ _base_request_irq(struct MPT3SAS_ADAPTER *ioc, u8 index)
|
|||
|
||||
if (index >= ioc->iopoll_q_start_index) {
|
||||
qid = index - ioc->iopoll_q_start_index;
|
||||
snprintf(reply_q->name, MPT_NAME_LENGTH, "%s%d-mq-poll%d",
|
||||
scnprintf(reply_q->name, MPT_NAME_LENGTH, "%s%d-mq-poll%d",
|
||||
ioc->driver_name, ioc->id, qid);
|
||||
reply_q->is_iouring_poll_q = 1;
|
||||
ioc->io_uring_poll_queues[qid].reply_q = reply_q;
|
||||
|
|
@ -3183,10 +3187,10 @@ _base_request_irq(struct MPT3SAS_ADAPTER *ioc, u8 index)
|
|||
|
||||
|
||||
if (ioc->msix_enable)
|
||||
snprintf(reply_q->name, MPT_NAME_LENGTH, "%s%d-msix%d",
|
||||
scnprintf(reply_q->name, MPT_NAME_LENGTH, "%s%d-msix%d",
|
||||
ioc->driver_name, ioc->id, index);
|
||||
else
|
||||
snprintf(reply_q->name, MPT_NAME_LENGTH, "%s%d",
|
||||
scnprintf(reply_q->name, MPT_NAME_LENGTH, "%s%d",
|
||||
ioc->driver_name, ioc->id);
|
||||
r = request_irq(pci_irq_vector(pdev, index), _base_interrupt,
|
||||
IRQF_SHARED, reply_q->name, reply_q);
|
||||
|
|
|
|||
|
|
@ -147,6 +147,7 @@
|
|||
#define INTERNAL_CMDS_COUNT 10 /* reserved cmds */
|
||||
/* reserved for issuing internally framed scsi io cmds */
|
||||
#define INTERNAL_SCSIIO_CMDS_COUNT 3
|
||||
#define INTERNAL_SCSIIO_FOR_DISCOVERY 2
|
||||
|
||||
#define MPI3_HIM_MASK 0xFFFFFFFF /* mask every bit*/
|
||||
|
||||
|
|
@ -480,6 +481,7 @@ struct MPT3SAS_DEVICE {
|
|||
u32 flags;
|
||||
u8 configured_lun;
|
||||
u8 block;
|
||||
u8 deleted;
|
||||
u8 tlr_snoop_check;
|
||||
u8 ignore_delay_remove;
|
||||
/* Iopriority Command Handling */
|
||||
|
|
@ -577,7 +579,9 @@ struct _sas_device {
|
|||
u8 chassis_slot;
|
||||
u8 is_chassis_slot_valid;
|
||||
u8 connector_name[5];
|
||||
u8 ssd_device;
|
||||
struct kref refcount;
|
||||
|
||||
u8 port_type;
|
||||
struct hba_port *port;
|
||||
struct sas_rphy *rphy;
|
||||
|
|
|
|||
File diff suppressed because it is too large
Load diff
Loading…
Add table
Add a link
Reference in a new issue