Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

Merge tag 'scsi-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi

Pull SCSI fixes from James Bottomley:
"Three fixes, all in drivers.

The ufs and qedi fixes are minor; the lpfc one is a bit bigger because
it involves adding a heuristic to detect and deal with common but not
standards compliant behaviour"

* tag 'scsi-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi:
scsi: ufs: core: Fix divide by zero in ufshcd_map_queues()
scsi: lpfc: Fix pt2pt NVMe PRLI reject LOGO loop
scsi: qedi: Fix ABBA deadlock in qedi_process_tmf_resp() and qedi_process_cmd_cleanup_resp()

+29 -8
+1
drivers/scsi/lpfc/lpfc.h
··· 592 592 #define FC_VPORT_LOGO_RCVD 0x200 /* LOGO received on vport */ 593 593 #define FC_RSCN_DISCOVERY 0x400 /* Auth all devices after RSCN */ 594 594 #define FC_LOGO_RCVD_DID_CHNG 0x800 /* FDISC on phys port detect DID chng*/ 595 + #define FC_PT2PT_NO_NVME 0x1000 /* Don't send NVME PRLI */ 595 596 #define FC_SCSI_SCAN_TMO 0x4000 /* scsi scan timer running */ 596 597 #define FC_ABORT_DISCOVERY 0x8000 /* we want to abort discovery */ 597 598 #define FC_NDISC_ACTIVE 0x10000 /* NPort discovery active */
+3
drivers/scsi/lpfc/lpfc_attr.c
··· 1315 1315 pmboxq->u.mb.mbxCommand = MBX_DOWN_LINK; 1316 1316 pmboxq->u.mb.mbxOwner = OWN_HOST; 1317 1317 1318 + if ((vport->fc_flag & FC_PT2PT) && (vport->fc_flag & FC_PT2PT_NO_NVME)) 1319 + vport->fc_flag &= ~FC_PT2PT_NO_NVME; 1320 + 1318 1321 mbxstatus = lpfc_sli_issue_mbox_wait(phba, pmboxq, LPFC_MBOX_TMO * 2); 1319 1322 1320 1323 if ((mbxstatus == MBX_SUCCESS) &&
+19 -1
drivers/scsi/lpfc/lpfc_els.c
··· 1072 1072 1073 1073 /* FLOGI failed, so there is no fabric */ 1074 1074 spin_lock_irq(shost->host_lock); 1075 - vport->fc_flag &= ~(FC_FABRIC | FC_PUBLIC_LOOP); 1075 + vport->fc_flag &= ~(FC_FABRIC | FC_PUBLIC_LOOP | 1076 + FC_PT2PT_NO_NVME); 1076 1077 spin_unlock_irq(shost->host_lock); 1077 1078 1078 1079 /* If private loop, then allow max outstanding els to be ··· 4608 4607 /* Added for Vendor specifc support 4609 4608 * Just keep retrying for these Rsn / Exp codes 4610 4609 */ 4610 + if ((vport->fc_flag & FC_PT2PT) && 4611 + cmd == ELS_CMD_NVMEPRLI) { 4612 + switch (stat.un.b.lsRjtRsnCode) { 4613 + case LSRJT_UNABLE_TPC: 4614 + case LSRJT_INVALID_CMD: 4615 + case LSRJT_LOGICAL_ERR: 4616 + case LSRJT_CMD_UNSUPPORTED: 4617 + lpfc_printf_vlog(vport, KERN_WARNING, LOG_ELS, 4618 + "0168 NVME PRLI LS_RJT " 4619 + "reason %x port doesn't " 4620 + "support NVME, disabling NVME\n", 4621 + stat.un.b.lsRjtRsnCode); 4622 + retry = 0; 4623 + vport->fc_flag |= FC_PT2PT_NO_NVME; 4624 + goto out_retry; 4625 + } 4626 + } 4611 4627 switch (stat.un.b.lsRjtRsnCode) { 4612 4628 case LSRJT_UNABLE_TPC: 4613 4629 /* The driver has a VALID PLOGI but the rport has
+3 -2
drivers/scsi/lpfc/lpfc_nportdisc.c
··· 1961 1961 * is configured try it. 1962 1962 */ 1963 1963 ndlp->nlp_fc4_type |= NLP_FC4_FCP; 1964 - if ((vport->cfg_enable_fc4_type == LPFC_ENABLE_BOTH) || 1965 - (vport->cfg_enable_fc4_type == LPFC_ENABLE_NVME)) { 1964 + if ((!(vport->fc_flag & FC_PT2PT_NO_NVME)) && 1965 + (vport->cfg_enable_fc4_type == LPFC_ENABLE_BOTH || 1966 + vport->cfg_enable_fc4_type == LPFC_ENABLE_NVME)) { 1966 1967 ndlp->nlp_fc4_type |= NLP_FC4_NVME; 1967 1968 /* We need to update the localport also */ 1968 1969 lpfc_nvme_update_localport(vport);
+2 -4
drivers/scsi/qedi/qedi_fw.c
··· 771 771 qedi_cmd->list_tmf_work = NULL; 772 772 } 773 773 } 774 + spin_unlock_bh(&qedi_conn->tmf_work_lock); 774 775 775 - if (!found) { 776 - spin_unlock_bh(&qedi_conn->tmf_work_lock); 776 + if (!found) 777 777 goto check_cleanup_reqs; 778 - } 779 778 780 779 QEDI_INFO(&qedi->dbg_ctx, QEDI_LOG_SCSI_TM, 781 780 "TMF work, cqe->tid=0x%x, tmf flags=0x%x, cid=0x%x\n", ··· 805 806 qedi_cmd->state = CLEANUP_RECV; 806 807 unlock: 807 808 spin_unlock_bh(&conn->session->back_lock); 808 - spin_unlock_bh(&qedi_conn->tmf_work_lock); 809 809 wake_up_interruptible(&qedi_conn->wait_queue); 810 810 return; 811 811
+1 -1
drivers/scsi/ufs/ufshcd.c
··· 2681 2681 break; 2682 2682 case HCTX_TYPE_READ: 2683 2683 map->nr_queues = 0; 2684 - break; 2684 + continue; 2685 2685 default: 2686 2686 WARN_ON_ONCE(true); 2687 2687 }