From: James Smart Date: Wed, 12 Jul 2017 22:28:24 +0000 (-0400) Subject: scsi: lpfc: Fix PT2PT PRLI reject (reapply patch) X-Git-Tag: v4.1.12-124.31.3~294 X-Git-Url: https://www.infradead.org/git/?a=commitdiff_plain;h=c53014e4d7755b33f675e139b8359d94ebe0c04b;p=users%2Fjedix%2Flinux-maple.git scsi: lpfc: Fix PT2PT PRLI reject (reapply patch) [backport of 114e80db15039e248eb4e458559cef57737930a8] From: rkennedy Orabug: 29281346 lpfc cannot establish connection with targets that send PRLI in P2P configurations. If lpfc rejects a PRLI that is sent from a target the target will not resend and will reject the PRLI send from the initiator. [tv: original mistakenly applied in reverse, because change was already present in the code at that point; this reapplies forwards] Signed-off-by: Dick Kennedy Signed-off-by: James Smart Signed-off-by: Martin K. Petersen Signed-off-by: Todd Vierling Reviewed-by: Fred Herard Signed-off-by: Brian Maly --- diff --git a/drivers/scsi/lpfc/lpfc_els.c b/drivers/scsi/lpfc/lpfc_els.c index 050ca5e4a9d5..1c9ff3ff31db 100644 --- a/drivers/scsi/lpfc/lpfc_els.c +++ b/drivers/scsi/lpfc/lpfc_els.c @@ -7796,7 +7796,8 @@ lpfc_els_unsol_buffer(struct lpfc_hba *phba, struct lpfc_sli_ring *pring, did, vport->port_state, ndlp->nlp_flag); phba->fc_stat.elsRcvPRLI++; - if (vport->port_state < LPFC_DISC_AUTH) { + if ((vport->port_state < LPFC_DISC_AUTH) && + (vport->fc_flag & FC_FABRIC)) { rjt_err = LSRJT_UNABLE_TPC; rjt_exp = LSEXP_NOTHING_MORE; break;