Signed-off-by: Vasu Dev <[email protected]>
---

 drivers/scsi/libfc/fc_lport.c |    8 ++++++--
 1 files changed, 6 insertions(+), 2 deletions(-)

diff --git a/drivers/scsi/libfc/fc_lport.c b/drivers/scsi/libfc/fc_lport.c
index 903a5db..b32b7a2 100644
--- a/drivers/scsi/libfc/fc_lport.c
+++ b/drivers/scsi/libfc/fc_lport.c
@@ -975,8 +975,12 @@ static void fc_lport_enter_reset(struct fc_lport *lport)
                        fc_vport_set_state(lport->vport, FC_VPORT_LINKDOWN);
        }
        fc_lport_state_enter(lport, LPORT_ST_RESET);
-       fc_vports_linkchange(lport);
-       fc_lport_reset_locked(lport);
+
+       if (lport->port_id) {
+               fc_vports_linkchange(lport);
+               fc_lport_reset_locked(lport);
+       }
+
        if (lport->link_up)
                fc_lport_enter_flogi(lport);
 }

_______________________________________________
devel mailing list
[email protected]
https://lists.open-fcoe.org/mailman/listinfo/devel

Reply via email to