Commit 9ee50e48 authored by Chris Leech's avatar Chris Leech Committed by James Bottomley

[SCSI] fcoe: reset FIP ctlr link state on disable/enable

The FIP controler state wasn't being reset on a disable.
A disable/enable sequence should be treated as a link event.
Otherwise, when using disable to mask a time when the link
is up but unusable, FCF discovery would attempt to continue
and login would jump directly to the non-FIP fallback on
enable.
Signed-off-by: default avatarChris Leech <christopher.leech@intel.com>
Signed-off-by: default avatarRobert Love <robert.w.love@intel.com>
Signed-off-by: default avatarJames Bottomley <James.Bottomley@suse.de>
parent 593abc07
...@@ -1901,9 +1901,10 @@ static int fcoe_disable(const char *buffer, struct kernel_param *kp) ...@@ -1901,9 +1901,10 @@ static int fcoe_disable(const char *buffer, struct kernel_param *kp)
fcoe = fcoe_hostlist_lookup_port(netdev); fcoe = fcoe_hostlist_lookup_port(netdev);
rtnl_unlock(); rtnl_unlock();
if (fcoe) if (fcoe) {
fc_fabric_logoff(fcoe->ctlr.lp); fc_fabric_logoff(fcoe->ctlr.lp);
else fcoe_ctlr_link_down(&fcoe->ctlr);
} else
rc = -ENODEV; rc = -ENODEV;
dev_put(netdev); dev_put(netdev);
...@@ -1950,9 +1951,11 @@ static int fcoe_enable(const char *buffer, struct kernel_param *kp) ...@@ -1950,9 +1951,11 @@ static int fcoe_enable(const char *buffer, struct kernel_param *kp)
fcoe = fcoe_hostlist_lookup_port(netdev); fcoe = fcoe_hostlist_lookup_port(netdev);
rtnl_unlock(); rtnl_unlock();
if (fcoe) if (fcoe) {
if (!fcoe_link_ok(fcoe->ctlr.lp))
fcoe_ctlr_link_up(&fcoe->ctlr);
rc = fc_fabric_login(fcoe->ctlr.lp); rc = fc_fabric_login(fcoe->ctlr.lp);
else } else
rc = -ENODEV; rc = -ENODEV;
dev_put(netdev); dev_put(netdev);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment