diff options
Diffstat (limited to 'drivers/scsi/fcoe/fcoe.c')
-rw-r--r-- | drivers/scsi/fcoe/fcoe.c | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/drivers/scsi/fcoe/fcoe.c b/drivers/scsi/fcoe/fcoe.c index 927b3e63d871..0d8127e58feb 100644 --- a/drivers/scsi/fcoe/fcoe.c +++ b/drivers/scsi/fcoe/fcoe.c | |||
@@ -1901,9 +1901,10 @@ static int fcoe_disable(const char *buffer, struct kernel_param *kp) | |||
1901 | fcoe = fcoe_hostlist_lookup_port(netdev); | 1901 | fcoe = fcoe_hostlist_lookup_port(netdev); |
1902 | rtnl_unlock(); | 1902 | rtnl_unlock(); |
1903 | 1903 | ||
1904 | if (fcoe) | 1904 | if (fcoe) { |
1905 | fc_fabric_logoff(fcoe->ctlr.lp); | 1905 | fc_fabric_logoff(fcoe->ctlr.lp); |
1906 | else | 1906 | fcoe_ctlr_link_down(&fcoe->ctlr); |
1907 | } else | ||
1907 | rc = -ENODEV; | 1908 | rc = -ENODEV; |
1908 | 1909 | ||
1909 | dev_put(netdev); | 1910 | dev_put(netdev); |
@@ -1950,9 +1951,11 @@ static int fcoe_enable(const char *buffer, struct kernel_param *kp) | |||
1950 | fcoe = fcoe_hostlist_lookup_port(netdev); | 1951 | fcoe = fcoe_hostlist_lookup_port(netdev); |
1951 | rtnl_unlock(); | 1952 | rtnl_unlock(); |
1952 | 1953 | ||
1953 | if (fcoe) | 1954 | if (fcoe) { |
1955 | if (!fcoe_link_ok(fcoe->ctlr.lp)) | ||
1956 | fcoe_ctlr_link_up(&fcoe->ctlr); | ||
1954 | rc = fc_fabric_login(fcoe->ctlr.lp); | 1957 | rc = fc_fabric_login(fcoe->ctlr.lp); |
1955 | else | 1958 | } else |
1956 | rc = -ENODEV; | 1959 | rc = -ENODEV; |
1957 | 1960 | ||
1958 | dev_put(netdev); | 1961 | dev_put(netdev); |