···13331333 struct timer_list fabric_block_timer;13341334 unsigned long bit_flags;13351335 atomic_t num_rsrc_err;13361336- atomic_t num_cmd_success;13371336 unsigned long last_rsrc_error_time;13381337 unsigned long last_ramp_down_time;13391338#ifdef CONFIG_SCSI_LPFC_DEBUG_FS···14371438 struct timer_list inactive_vmid_poll;1438143914391440 /* RAS Support */14411441+ spinlock_t ras_fwlog_lock; /* do not take while holding another lock */14401442 struct lpfc_ras_fwlog ras_fwlog;1441144314421444 uint32_t iocb_cnt;
+2-2
drivers/scsi/lpfc/lpfc_attr.c
···58655865 if (phba->cfg_ras_fwlog_func != PCI_FUNC(phba->pcidev->devfn))58665866 return -EINVAL;5867586758685868- spin_lock_irq(&phba->hbalock);58685868+ spin_lock_irq(&phba->ras_fwlog_lock);58695869 state = phba->ras_fwlog.state;58705870- spin_unlock_irq(&phba->hbalock);58705870+ spin_unlock_irq(&phba->ras_fwlog_lock);5871587158725872 if (state == REG_INPROGRESS) {58735873 lpfc_printf_log(phba, KERN_ERR, LOG_SLI, "6147 RAS Logging "
+18-18
drivers/scsi/lpfc/lpfc_bsg.c
···25132513 return -ENOMEM;25142514 }2515251525162516- dmabuff = (struct lpfc_dmabuf *)mbox->ctx_buf;25162516+ dmabuff = mbox->ctx_buf;25172517 mbox->ctx_buf = NULL;25182518 mbox->ctx_ndlp = NULL;25192519 status = lpfc_sli_issue_mbox_wait(phba, mbox, LPFC_MBOX_TMO);···33763376 unsigned long flags;33773377 uint8_t *pmb, *pmb_buf;3378337833793379- dd_data = pmboxq->ctx_ndlp;33793379+ dd_data = pmboxq->ctx_u.dd_data;3380338033813381 /*33823382 * The outgoing buffer is readily referred from the dma buffer,···35533553 struct lpfc_sli_config_mbox *sli_cfg_mbx;35543554 uint8_t *pmbx;3555355535563556- dd_data = pmboxq->ctx_buf;35563556+ dd_data = pmboxq->ctx_u.dd_data;3557355735583558 /* Determine if job has been aborted */35593559 spin_lock_irqsave(&phba->ct_ev_lock, flags);···39403940 pmboxq->mbox_cmpl = lpfc_bsg_issue_read_mbox_ext_cmpl;3941394139423942 /* context fields to callback function */39433943- pmboxq->ctx_buf = dd_data;39433943+ pmboxq->ctx_u.dd_data = dd_data;39443944 dd_data->type = TYPE_MBOX;39453945 dd_data->set_job = job;39463946 dd_data->context_un.mbox.pmboxq = pmboxq;···41124112 pmboxq->mbox_cmpl = lpfc_bsg_issue_write_mbox_ext_cmpl;4113411341144114 /* context fields to callback function */41154115- pmboxq->ctx_buf = dd_data;41154115+ pmboxq->ctx_u.dd_data = dd_data;41164116 dd_data->type = TYPE_MBOX;41174117 dd_data->set_job = job;41184118 dd_data->context_un.mbox.pmboxq = pmboxq;···44604460 pmboxq->mbox_cmpl = lpfc_bsg_issue_write_mbox_ext_cmpl;4461446144624462 /* context fields to callback function */44634463- pmboxq->ctx_buf = dd_data;44634463+ pmboxq->ctx_u.dd_data = dd_data;44644464 dd_data->type = TYPE_MBOX;44654465 dd_data->set_job = job;44664466 dd_data->context_un.mbox.pmboxq = pmboxq;···47474747 if (mbox_req->inExtWLen || mbox_req->outExtWLen) {47484748 from = pmbx;47494749 ext = from + sizeof(MAILBOX_t);47504750- pmboxq->ctx_buf = ext;47504750+ pmboxq->ext_buf = ext;47514751 pmboxq->in_ext_byte_len =47524752 mbox_req->inExtWLen * sizeof(uint32_t);47534753 pmboxq->out_ext_byte_len =···48754875 pmboxq->mbox_cmpl = lpfc_bsg_issue_mbox_cmpl;4876487648774877 /* setup context field to pass wait_queue pointer to wake function */48784878- pmboxq->ctx_ndlp = dd_data;48784878+ pmboxq->ctx_u.dd_data = dd_data;48794879 dd_data->type = TYPE_MBOX;48804880 dd_data->set_job = job;48814881 dd_data->context_un.mbox.pmboxq = pmboxq;···50705070 bsg_reply->reply_data.vendor_reply.vendor_rsp;5071507150725072 /* Current logging state */50735073- spin_lock_irq(&phba->hbalock);50735073+ spin_lock_irq(&phba->ras_fwlog_lock);50745074 if (ras_fwlog->state == ACTIVE)50755075 ras_reply->state = LPFC_RASLOG_STATE_RUNNING;50765076 else50775077 ras_reply->state = LPFC_RASLOG_STATE_STOPPED;50785078- spin_unlock_irq(&phba->hbalock);50785078+ spin_unlock_irq(&phba->ras_fwlog_lock);5079507950805080 ras_reply->log_level = phba->ras_fwlog.fw_loglevel;50815081 ras_reply->log_buff_sz = phba->cfg_ras_fwlog_buffsize;···5132513251335133 if (action == LPFC_RASACTION_STOP_LOGGING) {51345134 /* Check if already disabled */51355135- spin_lock_irq(&phba->hbalock);51355135+ spin_lock_irq(&phba->ras_fwlog_lock);51365136 if (ras_fwlog->state != ACTIVE) {51375137- spin_unlock_irq(&phba->hbalock);51375137+ spin_unlock_irq(&phba->ras_fwlog_lock);51385138 rc = -ESRCH;51395139 goto ras_job_error;51405140 }51415141- spin_unlock_irq(&phba->hbalock);51415141+ spin_unlock_irq(&phba->ras_fwlog_lock);5142514251435143 /* Disable logging */51445144 lpfc_ras_stop_fwlog(phba);···51495149 * FW-logging with new log-level. Return status51505150 * "Logging already Running" to caller.51515151 **/51525152- spin_lock_irq(&phba->hbalock);51525152+ spin_lock_irq(&phba->ras_fwlog_lock);51535153 if (ras_fwlog->state != INACTIVE)51545154 action_status = -EINPROGRESS;51555155- spin_unlock_irq(&phba->hbalock);51555155+ spin_unlock_irq(&phba->ras_fwlog_lock);5156515651575157 /* Enable logging */51585158 rc = lpfc_sli4_ras_fwlog_init(phba, log_level,···52685268 goto ras_job_error;5269526952705270 /* Logging to be stopped before reading */52715271- spin_lock_irq(&phba->hbalock);52715271+ spin_lock_irq(&phba->ras_fwlog_lock);52725272 if (ras_fwlog->state == ACTIVE) {52735273- spin_unlock_irq(&phba->hbalock);52735273+ spin_unlock_irq(&phba->ras_fwlog_lock);52745274 rc = -EINPROGRESS;52755275 goto ras_job_error;52765276 }52775277- spin_unlock_irq(&phba->hbalock);52775277+ spin_unlock_irq(&phba->ras_fwlog_lock);5278527852795279 if (job->request_len <52805280 sizeof(struct fc_bsg_request) +
+6-6
drivers/scsi/lpfc/lpfc_debugfs.c
···2194219421952195 memset(buffer, 0, size);2196219621972197- spin_lock_irq(&phba->hbalock);21972197+ spin_lock_irq(&phba->ras_fwlog_lock);21982198 if (phba->ras_fwlog.state != ACTIVE) {21992199- spin_unlock_irq(&phba->hbalock);21992199+ spin_unlock_irq(&phba->ras_fwlog_lock);22002200 return -EINVAL;22012201 }22022202- spin_unlock_irq(&phba->hbalock);22022202+ spin_unlock_irq(&phba->ras_fwlog_lock);2203220322042204 list_for_each_entry_safe(dmabuf, next,22052205 &phba->ras_fwlog.fwlog_buff_list, list) {···22502250 int size;22512251 int rc = -ENOMEM;2252225222532253- spin_lock_irq(&phba->hbalock);22532253+ spin_lock_irq(&phba->ras_fwlog_lock);22542254 if (phba->ras_fwlog.state != ACTIVE) {22552255- spin_unlock_irq(&phba->hbalock);22552255+ spin_unlock_irq(&phba->ras_fwlog_lock);22562256 rc = -EINVAL;22572257 goto out;22582258 }22592259- spin_unlock_irq(&phba->hbalock);22592259+ spin_unlock_irq(&phba->ras_fwlog_lock);2260226022612261 if (check_mul_overflow(LPFC_RAS_MIN_BUFF_POST_SIZE,22622262 phba->cfg_ras_fwlog_buffsize, &size))
···26162616 /* No concern about the role change on the nvme remoteport.26172617 * The transport will update it.26182618 */26192619- spin_lock_irq(&vport->phba->hbalock);26192619+ spin_lock_irq(&ndlp->lock);26202620 ndlp->fc4_xpt_flags |= NVME_XPT_UNREG_WAIT;26212621- spin_unlock_irq(&vport->phba->hbalock);26212621+ spin_unlock_irq(&ndlp->lock);2622262226232623 /* Don't let the host nvme transport keep sending keep-alives26242624 * on this remoteport. Vport is unloading, no recovery. The
+4-19
drivers/scsi/lpfc/lpfc_scsi.c
···167167 struct Scsi_Host *shost;168168 struct scsi_device *sdev;169169 unsigned long new_queue_depth;170170- unsigned long num_rsrc_err, num_cmd_success;170170+ unsigned long num_rsrc_err;171171 int i;172172173173 num_rsrc_err = atomic_read(&phba->num_rsrc_err);174174- num_cmd_success = atomic_read(&phba->num_cmd_success);175174176175 /*177176 * The error and success command counters are global per···185186 for (i = 0; i <= phba->max_vports && vports[i] != NULL; i++) {186187 shost = lpfc_shost_from_vport(vports[i]);187188 shost_for_each_device(sdev, shost) {188188- new_queue_depth =189189- sdev->queue_depth * num_rsrc_err /190190- (num_rsrc_err + num_cmd_success);191191- if (!new_queue_depth)192192- new_queue_depth = sdev->queue_depth - 1;189189+ if (num_rsrc_err >= sdev->queue_depth)190190+ new_queue_depth = 1;193191 else194192 new_queue_depth = sdev->queue_depth -195195- new_queue_depth;193193+ num_rsrc_err;196194 scsi_change_queue_depth(sdev, new_queue_depth);197195 }198196 }199197 lpfc_destroy_vport_work_array(phba, vports);200198 atomic_set(&phba->num_rsrc_err, 0);201201- atomic_set(&phba->num_cmd_success, 0);202199}203200204201/**···53315336 }53325337 err = lpfc_bg_scsi_prep_dma_buf(phba, lpfc_cmd);53335338 } else {53345334- if (vport->phba->cfg_enable_bg) {53355335- lpfc_printf_vlog(vport,53365336- KERN_INFO, LOG_SCSI_CMD,53375337- "9038 BLKGRD: rcvd PROT_NORMAL cmd: "53385338- "x%x reftag x%x cnt %u pt %x\n",53395339- cmnd->cmnd[0],53405340- scsi_prot_ref_tag(cmnd),53415341- scsi_logical_block_count(cmnd),53425342- (cmnd->cmnd[1]>>5));53435343- }53445339 err = lpfc_scsi_prep_dma_buf(phba, lpfc_cmd);53455340 }53465341
+49-50
drivers/scsi/lpfc/lpfc_sli.c
···12171217 empty = list_empty(&phba->active_rrq_list);12181218 list_add_tail(&rrq->list, &phba->active_rrq_list);12191219 phba->hba_flag |= HBA_RRQ_ACTIVE;12201220+ spin_unlock_irqrestore(&phba->hbalock, iflags);12201221 if (empty)12211222 lpfc_worker_wake_up(phba);12221222- spin_unlock_irqrestore(&phba->hbalock, iflags);12231223 return 0;12241224out:12251225 spin_unlock_irqrestore(&phba->hbalock, iflags);···28302830 */28312831 pmboxq->mbox_flag |= LPFC_MBX_WAKE;28322832 spin_lock_irqsave(&phba->hbalock, drvr_flag);28332833- pmbox_done = (struct completion *)pmboxq->context3;28332833+ pmbox_done = pmboxq->ctx_u.mbox_wait;28342834 if (pmbox_done)28352835 complete(pmbox_done);28362836 spin_unlock_irqrestore(&phba->hbalock, drvr_flag);···28852885 if (!test_bit(FC_UNLOADING, &phba->pport->load_flag) &&28862886 pmb->u.mb.mbxCommand == MBX_REG_LOGIN64 &&28872887 !pmb->u.mb.mbxStatus) {28882888- mp = (struct lpfc_dmabuf *)pmb->ctx_buf;28882888+ mp = pmb->ctx_buf;28892889 if (mp) {28902890 pmb->ctx_buf = NULL;28912891 lpfc_mbuf_free(phba, mp->virt, mp->phys);···29142914 }2915291529162916 if (pmb->u.mb.mbxCommand == MBX_REG_LOGIN64) {29172917- ndlp = (struct lpfc_nodelist *)pmb->ctx_ndlp;29172917+ ndlp = pmb->ctx_ndlp;29182918 lpfc_nlp_put(ndlp);29192919 }2920292029212921 if (pmb->u.mb.mbxCommand == MBX_UNREG_LOGIN) {29222922- ndlp = (struct lpfc_nodelist *)pmb->ctx_ndlp;29222922+ ndlp = pmb->ctx_ndlp;2923292329242924 /* Check to see if there are any deferred events to process */29252925 if (ndlp) {···2952295229532953 /* This nlp_put pairs with lpfc_sli4_resume_rpi */29542954 if (pmb->u.mb.mbxCommand == MBX_RESUME_RPI) {29552955- ndlp = (struct lpfc_nodelist *)pmb->ctx_ndlp;29552955+ ndlp = pmb->ctx_ndlp;29562956 lpfc_nlp_put(ndlp);29572957 }29582958···58195819 goto out_free_mboxq;58205820 }5821582158225822- mp = (struct lpfc_dmabuf *)mboxq->ctx_buf;58225822+ mp = mboxq->ctx_buf;58235823 rc = lpfc_sli_issue_mbox(phba, mboxq, MBX_POLL);5824582458255825 lpfc_printf_log(phba, KERN_INFO, LOG_MBOX | LOG_SLI,···68496849{68506850 struct lpfc_ras_fwlog *ras_fwlog = &phba->ras_fwlog;6851685168526852- spin_lock_irq(&phba->hbalock);68526852+ spin_lock_irq(&phba->ras_fwlog_lock);68536853 ras_fwlog->state = INACTIVE;68546854- spin_unlock_irq(&phba->hbalock);68546854+ spin_unlock_irq(&phba->ras_fwlog_lock);6855685568566856 /* Disable FW logging to host memory */68576857 writel(LPFC_CTL_PDEV_CTL_DDL_RAS,···68946894 ras_fwlog->lwpd.virt = NULL;68956895 }6896689668976897- spin_lock_irq(&phba->hbalock);68976897+ spin_lock_irq(&phba->ras_fwlog_lock);68986898 ras_fwlog->state = INACTIVE;68996899- spin_unlock_irq(&phba->hbalock);68996899+ spin_unlock_irq(&phba->ras_fwlog_lock);69006900}6901690169026902/**···69986998 goto disable_ras;69996999 }7000700070017001- spin_lock_irq(&phba->hbalock);70017001+ spin_lock_irq(&phba->ras_fwlog_lock);70027002 ras_fwlog->state = ACTIVE;70037003- spin_unlock_irq(&phba->hbalock);70037003+ spin_unlock_irq(&phba->ras_fwlog_lock);70047004 mempool_free(pmb, phba->mbox_mem_pool);7005700570067006 return;···70327032 uint32_t len = 0, fwlog_buffsize, fwlog_entry_count;70337033 int rc = 0;7034703470357035- spin_lock_irq(&phba->hbalock);70357035+ spin_lock_irq(&phba->ras_fwlog_lock);70367036 ras_fwlog->state = INACTIVE;70377037- spin_unlock_irq(&phba->hbalock);70377037+ spin_unlock_irq(&phba->ras_fwlog_lock);7038703870397039 fwlog_buffsize = (LPFC_RAS_MIN_BUFF_POST_SIZE *70407040 phba->cfg_ras_fwlog_buffsize);···70957095 mbx_fwlog->u.request.lwpd.addr_lo = putPaddrLow(ras_fwlog->lwpd.phys);70967096 mbx_fwlog->u.request.lwpd.addr_hi = putPaddrHigh(ras_fwlog->lwpd.phys);7097709770987098- spin_lock_irq(&phba->hbalock);70987098+ spin_lock_irq(&phba->ras_fwlog_lock);70997099 ras_fwlog->state = REG_INPROGRESS;71007100- spin_unlock_irq(&phba->hbalock);71007100+ spin_unlock_irq(&phba->ras_fwlog_lock);71017101 mbox->vport = phba->pport;71027102 mbox->mbox_cmpl = lpfc_sli4_ras_mbox_cmpl;71037103···8766876687678767 mboxq->vport = vport;87688768 rc = lpfc_sli_issue_mbox(phba, mboxq, MBX_POLL);87698769- mp = (struct lpfc_dmabuf *)mboxq->ctx_buf;87698769+ mp = mboxq->ctx_buf;87708770 if (rc == MBX_SUCCESS) {87718771 memcpy(&vport->fc_sparam, mp->virt, sizeof(struct serv_parm));87728772 rc = 0;···95489548 }9549954995509550 /* Copy the mailbox extension data */95519551- if (pmbox->in_ext_byte_len && pmbox->ctx_buf) {95529552- lpfc_sli_pcimem_bcopy(pmbox->ctx_buf,95519551+ if (pmbox->in_ext_byte_len && pmbox->ext_buf) {95529552+ lpfc_sli_pcimem_bcopy(pmbox->ext_buf,95539553 (uint8_t *)phba->mbox_ext,95549554 pmbox->in_ext_byte_len);95559555 }···95629562 = MAILBOX_HBA_EXT_OFFSET;9563956395649564 /* Copy the mailbox extension data */95659565- if (pmbox->in_ext_byte_len && pmbox->ctx_buf)95659565+ if (pmbox->in_ext_byte_len && pmbox->ext_buf)95669566 lpfc_memcpy_to_slim(phba->MBslimaddr +95679567 MAILBOX_HBA_EXT_OFFSET,95689568- pmbox->ctx_buf, pmbox->in_ext_byte_len);95689568+ pmbox->ext_buf, pmbox->in_ext_byte_len);9569956995709570 if (mbx->mbxCommand == MBX_CONFIG_PORT)95719571 /* copy command data into host mbox for cmpl */···96889688 lpfc_sli_pcimem_bcopy(phba->mbox, mbx,96899689 MAILBOX_CMD_SIZE);96909690 /* Copy the mailbox extension data */96919691- if (pmbox->out_ext_byte_len && pmbox->ctx_buf) {96919691+ if (pmbox->out_ext_byte_len && pmbox->ext_buf) {96929692 lpfc_sli_pcimem_bcopy(phba->mbox_ext,96939693- pmbox->ctx_buf,96939693+ pmbox->ext_buf,96949694 pmbox->out_ext_byte_len);96959695 }96969696 } else {···96989698 lpfc_memcpy_from_slim(mbx, phba->MBslimaddr,96999699 MAILBOX_CMD_SIZE);97009700 /* Copy the mailbox extension data */97019701- if (pmbox->out_ext_byte_len && pmbox->ctx_buf) {97019701+ if (pmbox->out_ext_byte_len && pmbox->ext_buf) {97029702 lpfc_memcpy_from_slim(97039703- pmbox->ctx_buf,97039703+ pmbox->ext_buf,97049704 phba->MBslimaddr +97059705 MAILBOX_HBA_EXT_OFFSET,97069706 pmbox->out_ext_byte_len);···1137311373 unsigned long iflags;1137411374 struct lpfc_work_evt *evtp = &ndlp->recovery_evt;11375113751137611376+ /* Hold a node reference for outstanding queued work */1137711377+ if (!lpfc_nlp_get(ndlp))1137811378+ return;1137911379+1137611380 spin_lock_irqsave(&phba->hbalock, iflags);1137711381 if (!list_empty(&evtp->evt_listp)) {1137811382 spin_unlock_irqrestore(&phba->hbalock, iflags);1138311383+ lpfc_nlp_put(ndlp);1137911384 return;1138011385 }11381113861138211382- /* Incrementing the reference count until the queued work is done. */1138311383- evtp->evt_arg1 = lpfc_nlp_get(ndlp);1138411384- if (!evtp->evt_arg1) {1138511385- spin_unlock_irqrestore(&phba->hbalock, iflags);1138611386- return;1138711387- }1138711387+ evtp->evt_arg1 = ndlp;1138811388 evtp->evt = LPFC_EVT_RECOVER_PORT;1138911389 list_add_tail(&evtp->evt_listp, &phba->work_list);1139011390 spin_unlock_irqrestore(&phba->hbalock, iflags);···1326213262 /* setup wake call as IOCB callback */1326313263 pmboxq->mbox_cmpl = lpfc_sli_wake_mbox_wait;13264132641326513265- /* setup context3 field to pass wait_queue pointer to wake function */1326513265+ /* setup ctx_u field to pass wait_queue pointer to wake function */1326613266 init_completion(&mbox_done);1326713267- pmboxq->context3 = &mbox_done;1326713267+ pmboxq->ctx_u.mbox_wait = &mbox_done;1326813268 /* now issue the command */1326913269 retval = lpfc_sli_issue_mbox(phba, pmboxq, MBX_NOWAIT);1327013270 if (retval == MBX_BUSY || retval == MBX_SUCCESS) {···1327213272 msecs_to_jiffies(timeout * 1000));13273132731327413274 spin_lock_irqsave(&phba->hbalock, flag);1327513275- pmboxq->context3 = NULL;1327513275+ pmboxq->ctx_u.mbox_wait = NULL;1327613276 /*1327713277 * if LPFC_MBX_WAKE flag is set the mailbox is completed1327813278 * else do not free the resources.···1381313813 lpfc_sli_pcimem_bcopy(mbox, pmbox,1381413814 MAILBOX_CMD_SIZE);1381513815 if (pmb->out_ext_byte_len &&1381613816- pmb->ctx_buf)1381613816+ pmb->ext_buf)1381713817 lpfc_sli_pcimem_bcopy(1381813818 phba->mbox_ext,1381913819- pmb->ctx_buf,1381913819+ pmb->ext_buf,1382013820 pmb->out_ext_byte_len);1382113821 }1382213822 if (pmb->mbox_flag & LPFC_MBX_IMED_UNREG) {···1383013830 pmbox->un.varWords[0], 0);13831138311383213832 if (!pmbox->mbxStatus) {1383313833- mp = (struct lpfc_dmabuf *)1383413834- (pmb->ctx_buf);1383513835- ndlp = (struct lpfc_nodelist *)1383613836- pmb->ctx_ndlp;1383313833+ mp = pmb->ctx_buf;1383413834+ ndlp = pmb->ctx_ndlp;13837138351383813836 /* Reg_LOGIN of dflt RPI was1383913837 * successful. new lets get···1433814340 mcqe_status,1433914341 pmbox->un.varWords[0], 0);1434014342 if (mcqe_status == MB_CQE_STATUS_SUCCESS) {1434114341- mp = (struct lpfc_dmabuf *)(pmb->ctx_buf);1434214342- ndlp = (struct lpfc_nodelist *)pmb->ctx_ndlp;1434314343+ mp = pmb->ctx_buf;1434414344+ ndlp = pmb->ctx_ndlp;14343143451434414346 /* Reg_LOGIN of dflt RPI was successful. Mark the1434514347 * node as having an UNREG_LOGIN in progress to stop···1982119823 * lpfc_sli4_resume_rpi - Remove the rpi bitmask region1982219824 * @ndlp: pointer to lpfc nodelist data structure.1982319825 * @cmpl: completion call-back.1982419824- * @arg: data to load as MBox 'caller buffer information'1982619826+ * @iocbq: data to load as mbox ctx_u information1982519827 *1982619828 * This routine is invoked to remove the memory region that1982719829 * provided rpi via a bitmask.1982819830 **/1982919831int1983019832lpfc_sli4_resume_rpi(struct lpfc_nodelist *ndlp,1983119831- void (*cmpl)(struct lpfc_hba *, LPFC_MBOXQ_t *), void *arg)1983319833+ void (*cmpl)(struct lpfc_hba *, LPFC_MBOXQ_t *),1983419834+ struct lpfc_iocbq *iocbq)1983219835{1983319836 LPFC_MBOXQ_t *mboxq;1983419837 struct lpfc_hba *phba = ndlp->phba;···1985819859 lpfc_resume_rpi(mboxq, ndlp);1985919860 if (cmpl) {1986019861 mboxq->mbox_cmpl = cmpl;1986119861- mboxq->ctx_buf = arg;1986219862+ mboxq->ctx_u.save_iocb = iocbq;1986219863 } else1986319864 mboxq->mbox_cmpl = lpfc_sli_def_mbox_cmpl;1986419865 mboxq->ctx_ndlp = ndlp;···2067520676 if (lpfc_sli4_dump_cfg_rg23(phba, mboxq))2067620677 goto out;2067720678 mqe = &mboxq->u.mqe;2067820678- mp = (struct lpfc_dmabuf *)mboxq->ctx_buf;2067920679+ mp = mboxq->ctx_buf;2067920680 rc = lpfc_sli_issue_mbox(phba, mboxq, MBX_POLL);2068020681 if (rc)2068120682 goto out;···2103421035 (mb->u.mb.mbxCommand == MBX_REG_VPI))2103521036 mb->mbox_cmpl = lpfc_sli_def_mbox_cmpl;2103621037 if (mb->u.mb.mbxCommand == MBX_REG_LOGIN64) {2103721037- act_mbx_ndlp = (struct lpfc_nodelist *)mb->ctx_ndlp;2103821038+ act_mbx_ndlp = mb->ctx_ndlp;21038210392103921040 /* This reference is local to this routine. The2104021041 * reference is removed at routine exit.···21063210642106421065 mb->mbox_cmpl = lpfc_sli_def_mbox_cmpl;2106521066 if (mb->u.mb.mbxCommand == MBX_REG_LOGIN64) {2106621066- ndlp = (struct lpfc_nodelist *)mb->ctx_ndlp;2106721067+ ndlp = mb->ctx_ndlp;2106721068 /* Unregister the RPI when mailbox complete */2106821069 mb->mbox_flag |= LPFC_MBX_IMED_UNREG;2106921070 restart_loop = 1;···2108321084 while (!list_empty(&mbox_cmd_list)) {2108421085 list_remove_head(&mbox_cmd_list, mb, LPFC_MBOXQ_t, list);2108521086 if (mb->u.mb.mbxCommand == MBX_REG_LOGIN64) {2108621086- ndlp = (struct lpfc_nodelist *)mb->ctx_ndlp;2108721087+ ndlp = mb->ctx_ndlp;2108721088 mb->ctx_ndlp = NULL;2108821089 if (ndlp) {2108921090 spin_lock(&ndlp->lock);
+24-6
drivers/scsi/lpfc/lpfc_sli.h
···11/*******************************************************************22 * This file is part of the Emulex Linux Device Driver for *33 * Fibre Channel Host Bus Adapters. *44- * Copyright (C) 2017-2023 Broadcom. All Rights Reserved. The term *44+ * Copyright (C) 2017-2024 Broadcom. All Rights Reserved. The term *55 * “Broadcom” refers to Broadcom Inc. and/or its subsidiaries. *66 * Copyright (C) 2004-2016 Emulex. All rights reserved. *77 * EMULEX and SLI are trademarks of Emulex. *···182182 struct lpfc_mqe mqe;183183 } u;184184 struct lpfc_vport *vport; /* virtual port pointer */185185- void *ctx_ndlp; /* an lpfc_nodelist pointer */186186- void *ctx_buf; /* an lpfc_dmabuf pointer */187187- void *context3; /* a generic pointer. Code must188188- * accommodate the actual datatype.189189- */185185+ struct lpfc_nodelist *ctx_ndlp; /* caller ndlp pointer */186186+ struct lpfc_dmabuf *ctx_buf; /* caller buffer information */187187+ void *ext_buf; /* extended buffer for extended mbox188188+ * cmds. Not a generic pointer.189189+ * Use for storing virtual address.190190+ */191191+192192+ /* Pointers that are seldom used during mbox execution, but require193193+ * a saved context.194194+ */195195+ union {196196+ unsigned long ox_rx_id; /* Used in els_rsp_rls_acc */197197+ struct lpfc_rdp_context *rdp; /* Used in get_rdp_info */198198+ struct lpfc_lcb_context *lcb; /* Used in set_beacon */199199+ struct completion *mbox_wait; /* Used in issue_mbox_wait */200200+ struct bsg_job_data *dd_data; /* Used in bsg_issue_mbox_cmpl201201+ * and202202+ * bsg_issue_mbox_ext_handle_job203203+ */204204+ struct lpfc_iocbq *save_iocb; /* Used in defer_plogi_acc and205205+ * lpfc_mbx_cmpl_resume_rpi206206+ */207207+ } ctx_u;190208191209 void (*mbox_cmpl) (struct lpfc_hba *, struct lpfcMboxq *);192210 uint8_t mbox_flag;
+4-3
drivers/scsi/lpfc/lpfc_sli4.h
···11/*******************************************************************22 * This file is part of the Emulex Linux Device Driver for *33 * Fibre Channel Host Bus Adapters. *44- * Copyright (C) 2017-2023 Broadcom. All Rights Reserved. The term *44+ * Copyright (C) 2017-2024 Broadcom. All Rights Reserved. The term *55 * “Broadcom” refers to Broadcom Inc. and/or its subsidiaries. *66 * Copyright (C) 2009-2016 Emulex. All rights reserved. *77 * EMULEX and SLI are trademarks of Emulex. *···11181118void lpfc_sli4_remove_rpis(struct lpfc_hba *);11191119void lpfc_sli4_async_event_proc(struct lpfc_hba *);11201120void lpfc_sli4_fcf_redisc_event_proc(struct lpfc_hba *);11211121-int lpfc_sli4_resume_rpi(struct lpfc_nodelist *,11221122- void (*)(struct lpfc_hba *, LPFC_MBOXQ_t *), void *);11211121+int lpfc_sli4_resume_rpi(struct lpfc_nodelist *ndlp,11221122+ void (*cmpl)(struct lpfc_hba *, LPFC_MBOXQ_t *),11231123+ struct lpfc_iocbq *iocbq);11231124void lpfc_sli4_els_xri_abort_event_proc(struct lpfc_hba *phba);11241125void lpfc_sli4_nvme_pci_offline_aborted(struct lpfc_hba *phba,11251126 struct lpfc_io_buf *lpfc_ncmd);
+1-1
drivers/scsi/lpfc/lpfc_version.h
···2020 * included with this package. *2121 *******************************************************************/22222323-#define LPFC_DRIVER_VERSION "14.4.0.0"2323+#define LPFC_DRIVER_VERSION "14.4.0.1"2424#define LPFC_DRIVER_NAME "lpfc"25252626/* Used for SLI 2/3 */
+5-5
drivers/scsi/lpfc/lpfc_vport.c
···166166 }167167 }168168169169- mp = (struct lpfc_dmabuf *)pmb->ctx_buf;169169+ mp = pmb->ctx_buf;170170 memcpy(&vport->fc_sparam, mp->virt, sizeof (struct serv_parm));171171 memcpy(&vport->fc_nodename, &vport->fc_sparam.nodeName,172172 sizeof (struct lpfc_name));···674674 lpfc_free_sysfs_attr(vport);675675 lpfc_debugfs_terminate(vport);676676677677- /* Remove FC host to break driver binding. */678678- fc_remove_host(shost);679679- scsi_remove_host(shost);680680-681677 /* Send the DA_ID and Fabric LOGO to cleanup Nameserver entries. */682678 ndlp = lpfc_findnode_did(vport, Fabric_DID);683679 if (!ndlp)···716720 lpfc_discovery_wait(vport);717721718722skip_logo:723723+724724+ /* Remove FC host to break driver binding. */725725+ fc_remove_host(shost);726726+ scsi_remove_host(shost);719727720728 lpfc_cleanup(vport);721729