Skip to content

Commit 9d4cbc0

Browse files
Vasu DevJames Bottomley
authored andcommitted
[SCSI] fcoe: cleans up fcoe_disable and fcoe_enable
The fc_fabric_logoff and fc_fabric_login are redundant here after recently added fcoe_ctlr_link_down/up to these functions, therefore this patch removes logoff and login to only use link down and up here. This works best for their current usages with fcoe DCB link down or up. This also works well to avoid EIO errors when fcoe DCB link goes down as lport state moves out of ready quickly from fcoe_ctlr_link_down and that allows re-queuing timed out IOs for this case also. Signed-off-by: Vasu Dev <vasu.dev@intel.com> Signed-off-by: Robert Love <robert.w.love@intel.com> Signed-off-by: James Bottomley <James.Bottomley@suse.de>
1 parent e0d93c5 commit 9d4cbc0

1 file changed

Lines changed: 4 additions & 6 deletions

File tree

‎drivers/scsi/fcoe/fcoe.c‎

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1918,8 +1918,8 @@ static int fcoe_disable(const char *buffer, struct kernel_param *kp)
19181918
rtnl_unlock();
19191919

19201920
if (fcoe) {
1921-
fc_fabric_logoff(fcoe->ctlr.lp);
19221921
fcoe_ctlr_link_down(&fcoe->ctlr);
1922+
fcoe_clean_pending_queue(fcoe->ctlr.lp);
19231923
} else
19241924
rc = -ENODEV;
19251925

@@ -1972,12 +1972,10 @@ static int fcoe_enable(const char *buffer, struct kernel_param *kp)
19721972
fcoe = fcoe_hostlist_lookup_port(netdev);
19731973
rtnl_unlock();
19741974

1975-
if (fcoe) {
1976-
if (!fcoe_link_ok(fcoe->ctlr.lp))
1977-
fcoe_ctlr_link_up(&fcoe->ctlr);
1978-
rc = fc_fabric_login(fcoe->ctlr.lp);
1979-
} else
1975+
if (!fcoe)
19801976
rc = -ENODEV;
1977+
else if (!fcoe_link_ok(fcoe->ctlr.lp))
1978+
fcoe_ctlr_link_up(&fcoe->ctlr);
19811979

19821980
dev_put(netdev);
19831981
out_nodev:

0 commit comments

Comments
 (0)