From: alexander.levin@verizon.com
To: "linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
"stable@vger.kernel.org" <stable@vger.kernel.org>
Cc: James Smart <jsmart2021@gmail.com>,
Dick Kennedy <dick.kennedy@broadcom.com>,
James Smart <james.smart@broadcom.com>,
"Martin K . Petersen" <martin.petersen@oracle.com>,
alexander.levin@verizon.com
Subject: [PATCH AUTOSEL for 3.18 06/16] scsi: lpfc: Fix crash during Hardware error recovery on SLI3 adapters
Date: Wed, 29 Nov 2017 17:22:20 +0000 [thread overview]
Message-ID: <20171129172213.29007-6-alexander.levin@verizon.com> (raw)
In-Reply-To: <20171129172213.29007-1-alexander.levin@verizon.com>
From: James Smart <jsmart2021@gmail.com>
[ Upstream commit 5d181531bc6169e19a02a27d202cf0e982db9d0e ]
if REG_VPI fails, the driver was incorrectly issuing INIT_VFI
(a SLI4 command) on a SLI3 adapter.
Signed-off-by: Dick Kennedy <dick.kennedy@broadcom.com>
Signed-off-by: James Smart <james.smart@broadcom.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
Signed-off-by: Sasha Levin <alexander.levin@verizon.com>
---
drivers/scsi/lpfc/lpfc_els.c | 14 ++++++++++----
1 file changed, 10 insertions(+), 4 deletions(-)
diff --git a/drivers/scsi/lpfc/lpfc_els.c b/drivers/scsi/lpfc/lpfc_els.c
index 4c25485aa934..c76279926ad6 100644
--- a/drivers/scsi/lpfc/lpfc_els.c
+++ b/drivers/scsi/lpfc/lpfc_els.c
@@ -7265,11 +7265,17 @@ lpfc_cmpl_reg_new_vport(struct lpfc_hba *phba, LPFC_MBOXQ_t *pmb)
spin_lock_irq(shost->host_lock);
vport->fc_flag |= FC_VPORT_NEEDS_REG_VPI;
spin_unlock_irq(shost->host_lock);
- if (vport->port_type == LPFC_PHYSICAL_PORT
- && !(vport->fc_flag & FC_LOGO_RCVD_DID_CHNG))
- lpfc_issue_init_vfi(vport);
- else
+ if (mb->mbxStatus == MBX_NOT_FINISHED)
+ break;
+ if ((vport->port_type == LPFC_PHYSICAL_PORT) &&
+ !(vport->fc_flag & FC_LOGO_RCVD_DID_CHNG)) {
+ if (phba->sli_rev == LPFC_SLI_REV4)
+ lpfc_issue_init_vfi(vport);
+ else
+ lpfc_initial_flogi(vport);
+ } else {
lpfc_initial_fdisc(vport);
+ }
break;
}
} else {
--
2.11.0
next prev parent reply other threads:[~2017-11-29 17:32 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-11-29 17:22 [PATCH AUTOSEL for 3.18 01/16] selftest/powerpc: Fix false failures for skipped tests alexander.levin
2017-11-29 17:22 ` [PATCH AUTOSEL for 3.18 03/16] USB: gadgetfs: Fix a potential memory leak in 'dev_config()' alexander.levin
2017-11-29 17:22 ` [PATCH AUTOSEL for 3.18 04/16] libata: drop WARN from protocol error in ata_sff_qc_issue() alexander.levin
2017-11-29 17:22 ` [PATCH AUTOSEL for 3.18 02/16] usb: gadget: configs: plug memory leak alexander.levin
2017-11-29 17:22 ` [PATCH AUTOSEL for 3.18 07/16] irqchip/crossbar: Fix incorrect type of register size alexander.levin
2017-11-29 17:22 ` [PATCH AUTOSEL for 3.18 05/16] workqueue: trigger WARN if queue_delayed_work() is called with NULL @wq alexander.levin
2017-11-29 17:22 ` alexander.levin [this message]
2017-11-29 17:22 ` [PATCH AUTOSEL for 3.18 08/16] KVM: nVMX: reset nested_run_pending if the vCPU is going to be reset alexander.levin
2017-11-29 17:22 ` [PATCH AUTOSEL for 3.18 12/16] ipv6: reorder icmpv6_init() and ip6_mr_init() alexander.levin
2017-11-29 17:22 ` [PATCH AUTOSEL for 3.18 09/16] arm: KVM: Survive unknown traps from guests alexander.levin
2017-11-29 17:22 ` [PATCH AUTOSEL for 3.18 10/16] spi_ks8995: fix "BUG: key accdaa28 not in .data!" alexander.levin
2017-11-29 17:22 ` [PATCH AUTOSEL for 3.18 11/16] bnx2x: fix possible overrun of VFPF multicast addresses array alexander.levin
2017-11-29 17:22 ` [PATCH AUTOSEL for 3.18 13/16] crypto: s5p-sss - Fix completing crypto request in IRQ handler alexander.levin
2017-11-29 17:22 ` [PATCH AUTOSEL for 3.18 14/16] i2c: riic: fix restart condition alexander.levin
2017-11-29 17:22 ` [PATCH AUTOSEL for 3.18 15/16] axonram: Fix gendisk handling alexander.levin
2017-11-29 17:22 ` [PATCH AUTOSEL for 3.18 16/16] EDAC, i5000, i5400: Fix use of MTR_DRAM_WIDTH macro alexander.levin
2017-11-30 1:34 ` Jérémy Lefaure
2017-11-30 21:33 ` alexander.levin
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20171129172213.29007-6-alexander.levin@verizon.com \
--to=alexander.levin@verizon.com \
--cc=dick.kennedy@broadcom.com \
--cc=james.smart@broadcom.com \
--cc=jsmart2021@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=martin.petersen@oracle.com \
--cc=stable@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®