aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/scsi/fcoe
diff options
context:
space:
mode:
authorVasu Dev <vasu.dev@intel.com>2010-07-20 18:19:26 -0400
committerJames Bottomley <James.Bottomley@suse.de>2010-07-28 10:05:46 -0400
commit9d4cbc05f32fc0a1024de2a9d5635bc9d180e4ae (patch)
tree89dcff72ec501b015dc867a33a4cef33466ab0a8 /drivers/scsi/fcoe
parente0d93c5bc47ae270ea38192c9a49f660e0406060 (diff)
[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>
Diffstat (limited to 'drivers/scsi/fcoe')
-rw-r--r--drivers/scsi/fcoe/fcoe.c10
1 files changed, 4 insertions, 6 deletions
diff --git a/drivers/scsi/fcoe/fcoe.c b/drivers/scsi/fcoe/fcoe.c
index 44a07593de56..d340cf2d857a 100644
--- a/drivers/scsi/fcoe/fcoe.c
+++ b/drivers/scsi/fcoe/fcoe.c
@@ -1918,8 +1918,8 @@ static int fcoe_disable(const char *buffer, struct kernel_param *kp)
1918 rtnl_unlock(); 1918 rtnl_unlock();
1919 1919
1920 if (fcoe) { 1920 if (fcoe) {
1921 fc_fabric_logoff(fcoe->ctlr.lp);
1922 fcoe_ctlr_link_down(&fcoe->ctlr); 1921 fcoe_ctlr_link_down(&fcoe->ctlr);
1922 fcoe_clean_pending_queue(fcoe->ctlr.lp);
1923 } else 1923 } else
1924 rc = -ENODEV; 1924 rc = -ENODEV;
1925 1925
@@ -1972,12 +1972,10 @@ static int fcoe_enable(const char *buffer, struct kernel_param *kp)
1972 fcoe = fcoe_hostlist_lookup_port(netdev); 1972 fcoe = fcoe_hostlist_lookup_port(netdev);
1973 rtnl_unlock(); 1973 rtnl_unlock();
1974 1974
1975 if (fcoe) { 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
1980 rc = -ENODEV; 1976 rc = -ENODEV;
1977 else if (!fcoe_link_ok(fcoe->ctlr.lp))
1978 fcoe_ctlr_link_up(&fcoe->ctlr);
1981 1979
1982 dev_put(netdev); 1980 dev_put(netdev);
1983out_nodev: 1981out_nodev: