From: Bhanu Prakash Gollapudi Date: Mon, 3 Oct 2011 23:45:00 +0000 (-0700) Subject: bnx2fc: call ctlr_link_up only when the interface is enabled X-Git-Tag: v2.6.39-400.9.0~423^2~19^2~11^2~420 X-Git-Url: https://www.infradead.org/git/?a=commitdiff_plain;h=299aabca95f4d3c16eca0fd3a2a0e45b22aeecdd;p=users%2Fjedix%2Flinux-maple.git bnx2fc: call ctlr_link_up only when the interface is enabled Link may not be up when the driver receives ulp_start event, and hence fcoe_ctlr_link_up is not called. Call fcoe_ctlr_link_up during indicate_netevent only when the interface is enabled. (It has to be called when enabled because that is an indication that the vlan discovery is completed). Signed-off-by: Bhanu Prakash Gollapudi Signed-off-by: James Bottomley (cherry picked from commit fd8fa9071e49a56cc91f739813ea88f16b7c1240) Signed-off-by: Joe Jin --- diff --git a/drivers/scsi/bnx2fc/bnx2fc_fcoe.c b/drivers/scsi/bnx2fc/bnx2fc_fcoe.c index 3fc120495eaf..6caa12d1e400 100644 --- a/drivers/scsi/bnx2fc/bnx2fc_fcoe.c +++ b/drivers/scsi/bnx2fc/bnx2fc_fcoe.c @@ -871,6 +871,8 @@ static void bnx2fc_indicate_netevent(void *context, unsigned long event, * enable to avoid sending discovery solicitation * on a stale vlan */ + if (interface->enabled) + fcoe_ctlr_link_up(&interface->ctlr); } else if (fcoe_ctlr_link_down(&interface->ctlr)) { mutex_lock(&lport->lp_mutex); list_for_each_entry(vport, &lport->vports, list)