diff options
-rw-r--r-- | drivers/scsi/fcoe/fcoe.c | 47 |
1 files changed, 0 insertions, 47 deletions
diff --git a/drivers/scsi/fcoe/fcoe.c b/drivers/scsi/fcoe/fcoe.c index 9e7206ebadf..34408d94517 100644 --- a/drivers/scsi/fcoe/fcoe.c +++ b/drivers/scsi/fcoe/fcoe.c | |||
@@ -1783,17 +1783,6 @@ static int fcoe_disable(struct net_device *netdev) | |||
1783 | int rc = 0; | 1783 | int rc = 0; |
1784 | 1784 | ||
1785 | mutex_lock(&fcoe_config_mutex); | 1785 | mutex_lock(&fcoe_config_mutex); |
1786 | #ifdef CONFIG_FCOE_MODULE | ||
1787 | /* | ||
1788 | * Make sure the module has been initialized, and is not about to be | ||
1789 | * removed. Module paramter sysfs files are writable before the | ||
1790 | * module_init function is called and after module_exit. | ||
1791 | */ | ||
1792 | if (THIS_MODULE->state != MODULE_STATE_LIVE) { | ||
1793 | rc = -ENODEV; | ||
1794 | goto out_nodev; | ||
1795 | } | ||
1796 | #endif | ||
1797 | 1786 | ||
1798 | rtnl_lock(); | 1787 | rtnl_lock(); |
1799 | fcoe = fcoe_hostlist_lookup_port(netdev); | 1788 | fcoe = fcoe_hostlist_lookup_port(netdev); |
@@ -1805,7 +1794,6 @@ static int fcoe_disable(struct net_device *netdev) | |||
1805 | } else | 1794 | } else |
1806 | rc = -ENODEV; | 1795 | rc = -ENODEV; |
1807 | 1796 | ||
1808 | out_nodev: | ||
1809 | mutex_unlock(&fcoe_config_mutex); | 1797 | mutex_unlock(&fcoe_config_mutex); |
1810 | return rc; | 1798 | return rc; |
1811 | } | 1799 | } |
@@ -1824,17 +1812,6 @@ static int fcoe_enable(struct net_device *netdev) | |||
1824 | int rc = 0; | 1812 | int rc = 0; |
1825 | 1813 | ||
1826 | mutex_lock(&fcoe_config_mutex); | 1814 | mutex_lock(&fcoe_config_mutex); |
1827 | #ifdef CONFIG_FCOE_MODULE | ||
1828 | /* | ||
1829 | * Make sure the module has been initialized, and is not about to be | ||
1830 | * removed. Module paramter sysfs files are writable before the | ||
1831 | * module_init function is called and after module_exit. | ||
1832 | */ | ||
1833 | if (THIS_MODULE->state != MODULE_STATE_LIVE) { | ||
1834 | rc = -ENODEV; | ||
1835 | goto out_nodev; | ||
1836 | } | ||
1837 | #endif | ||
1838 | rtnl_lock(); | 1815 | rtnl_lock(); |
1839 | fcoe = fcoe_hostlist_lookup_port(netdev); | 1816 | fcoe = fcoe_hostlist_lookup_port(netdev); |
1840 | rtnl_unlock(); | 1817 | rtnl_unlock(); |
@@ -1844,7 +1821,6 @@ static int fcoe_enable(struct net_device *netdev) | |||
1844 | else if (!fcoe_link_ok(fcoe->ctlr.lp)) | 1821 | else if (!fcoe_link_ok(fcoe->ctlr.lp)) |
1845 | fcoe_ctlr_link_up(&fcoe->ctlr); | 1822 | fcoe_ctlr_link_up(&fcoe->ctlr); |
1846 | 1823 | ||
1847 | out_nodev: | ||
1848 | mutex_unlock(&fcoe_config_mutex); | 1824 | mutex_unlock(&fcoe_config_mutex); |
1849 | return rc; | 1825 | return rc; |
1850 | } | 1826 | } |
@@ -1863,17 +1839,6 @@ static int fcoe_destroy(struct net_device *netdev) | |||
1863 | int rc = 0; | 1839 | int rc = 0; |
1864 | 1840 | ||
1865 | mutex_lock(&fcoe_config_mutex); | 1841 | mutex_lock(&fcoe_config_mutex); |
1866 | #ifdef CONFIG_FCOE_MODULE | ||
1867 | /* | ||
1868 | * Make sure the module has been initialized, and is not about to be | ||
1869 | * removed. Module paramter sysfs files are writable before the | ||
1870 | * module_init function is called and after module_exit. | ||
1871 | */ | ||
1872 | if (THIS_MODULE->state != MODULE_STATE_LIVE) { | ||
1873 | rc = -ENODEV; | ||
1874 | goto out_nodev; | ||
1875 | } | ||
1876 | #endif | ||
1877 | rtnl_lock(); | 1842 | rtnl_lock(); |
1878 | fcoe = fcoe_hostlist_lookup_port(netdev); | 1843 | fcoe = fcoe_hostlist_lookup_port(netdev); |
1879 | if (!fcoe) { | 1844 | if (!fcoe) { |
@@ -1938,18 +1903,6 @@ static int fcoe_create(struct net_device *netdev, enum fip_state fip_mode) | |||
1938 | mutex_lock(&fcoe_config_mutex); | 1903 | mutex_lock(&fcoe_config_mutex); |
1939 | rtnl_lock(); | 1904 | rtnl_lock(); |
1940 | 1905 | ||
1941 | #ifdef CONFIG_FCOE_MODULE | ||
1942 | /* | ||
1943 | * Make sure the module has been initialized, and is not about to be | ||
1944 | * removed. Module paramter sysfs files are writable before the | ||
1945 | * module_init function is called and after module_exit. | ||
1946 | */ | ||
1947 | if (THIS_MODULE->state != MODULE_STATE_LIVE) { | ||
1948 | rc = -ENODEV; | ||
1949 | goto out_nodev; | ||
1950 | } | ||
1951 | #endif | ||
1952 | |||
1953 | /* look for existing lport */ | 1906 | /* look for existing lport */ |
1954 | if (fcoe_hostlist_lookup(netdev)) { | 1907 | if (fcoe_hostlist_lookup(netdev)) { |
1955 | rc = -EEXIST; | 1908 | rc = -EEXIST; |