Skip to content

Commit

Permalink
[SCSI] fcoe: reset FIP ctlr link state on disable/enable
Browse files Browse the repository at this point in the history
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: Chris Leech <christopher.leech@intel.com>
Signed-off-by: Robert Love <robert.w.love@intel.com>
Signed-off-by: James Bottomley <James.Bottomley@suse.de>
  • Loading branch information
Chris Leech authored and James Bottomley committed Apr 11, 2010
1 parent 593abc0 commit 9ee50e4
Showing 1 changed file with 7 additions and 4 deletions.
11 changes: 7 additions & 4 deletions drivers/scsi/fcoe/fcoe.c
Original file line number Diff line number Diff line change
Expand Up @@ -1901,9 +1901,10 @@ static int fcoe_disable(const char *buffer, struct kernel_param *kp)
fcoe = fcoe_hostlist_lookup_port(netdev);
rtnl_unlock();

if (fcoe)
if (fcoe) {
fc_fabric_logoff(fcoe->ctlr.lp);
else
fcoe_ctlr_link_down(&fcoe->ctlr);
} else
rc = -ENODEV;

dev_put(netdev);
Expand Down Expand Up @@ -1950,9 +1951,11 @@ static int fcoe_enable(const char *buffer, struct kernel_param *kp)
fcoe = fcoe_hostlist_lookup_port(netdev);
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);
else
} else
rc = -ENODEV;

dev_put(netdev);
Expand Down

0 comments on commit 9ee50e4

Please sign in to comment.