Skip to content

Commit b0a00d8

Browse files
jsmart-ghmartinkpetersen
authored andcommitted
scsi: lpfc: Correct missing remoteport registration during link bounces
Remote port disappearance/reappearances would cause a series of RSCN events to be delivered to the driver. During the resulting GID_FT handling, the driver clears the fc4 settings on the remote port, which makes it skip registration. As such, the nvme associations eventually fail and return io errors to the applications. Correct by not clearng the nlp_fc4_types for all nodes in lpfc_issue_gidft. Instead, when the GID_FT response is handled, clear the nlp_fc4_types of FCP and NVME prior to evaluating the fc4_type returned by the GID_FT response. This approach leaves "skipped" nodes with their nlp_fc4_types intacted. Signed-off-by: Dick Kennedy <[email protected]> Signed-off-by: James Smart <[email protected]> Reviewed-by: Hannes Reinecke <[email protected]> Signed-off-by: Martin K. Petersen <[email protected]>
1 parent 66a8515 commit b0a00d8

File tree

2 files changed

+5
-4
lines changed

2 files changed

+5
-4
lines changed

drivers/scsi/lpfc/lpfc_ct.c

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -471,6 +471,11 @@ lpfc_prep_node_fc4type(struct lpfc_vport *vport, uint32_t Did, uint8_t fc4_type)
471471
"Parse GID_FTrsp: did:x%x flg:x%x x%x",
472472
Did, ndlp->nlp_flag, vport->fc_flag);
473473

474+
/* Don't assume the rport is always the previous
475+
* FC4 type.
476+
*/
477+
ndlp->nlp_fc4_type &= ~(NLP_FC4_FCP | NLP_FC4_NVME);
478+
474479
/* By default, the driver expects to support FCP FC4 */
475480
if (fc4_type == FC_TYPE_FCP)
476481
ndlp->nlp_fc4_type |= NLP_FC4_FCP;

drivers/scsi/lpfc/lpfc_hbadisc.c

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3876,10 +3876,6 @@ int
38763876
lpfc_issue_gidft(struct lpfc_vport *vport)
38773877
{
38783878
struct lpfc_hba *phba = vport->phba;
3879-
struct lpfc_nodelist *ndlp;
3880-
3881-
list_for_each_entry(ndlp, &vport->fc_nodes, nlp_listp)
3882-
ndlp->nlp_fc4_type &= ~(NLP_FC4_FCP | NLP_FC4_NVME);
38833879

38843880
/* Good status, issue CT Request to NameServer */
38853881
if ((phba->cfg_enable_fc4_type == LPFC_ENABLE_BOTH) ||

0 commit comments

Comments
 (0)