diff options
Diffstat (limited to 'drivers/net/qlcnic')
-rw-r--r-- | drivers/net/qlcnic/qlcnic_main.c | 22 |
1 files changed, 21 insertions, 1 deletions
diff --git a/drivers/net/qlcnic/qlcnic_main.c b/drivers/net/qlcnic/qlcnic_main.c index 05275f2153be..9a98285ee791 100644 --- a/drivers/net/qlcnic/qlcnic_main.c +++ b/drivers/net/qlcnic/qlcnic_main.c | |||
@@ -1866,6 +1866,23 @@ qlcnic_set_drv_state(struct qlcnic_adapter *adapter, int state) | |||
1866 | qlcnic_api_unlock(adapter); | 1866 | qlcnic_api_unlock(adapter); |
1867 | } | 1867 | } |
1868 | 1868 | ||
1869 | static int | ||
1870 | qlcnic_clr_drv_state(struct qlcnic_adapter *adapter) | ||
1871 | { | ||
1872 | u32 val; | ||
1873 | |||
1874 | if (qlcnic_api_lock(adapter)) | ||
1875 | return -EBUSY; | ||
1876 | |||
1877 | val = QLCRD32(adapter, QLCNIC_CRB_DRV_STATE); | ||
1878 | val &= ~((u32)0x3 << (adapter->portnum * 4)); | ||
1879 | QLCWR32(adapter, QLCNIC_CRB_DRV_STATE, val); | ||
1880 | |||
1881 | qlcnic_api_unlock(adapter); | ||
1882 | |||
1883 | return 0; | ||
1884 | } | ||
1885 | |||
1869 | static void | 1886 | static void |
1870 | qlcnic_clr_all_drv_state(struct qlcnic_adapter *adapter) | 1887 | qlcnic_clr_all_drv_state(struct qlcnic_adapter *adapter) |
1871 | { | 1888 | { |
@@ -2119,7 +2136,10 @@ qlcnic_attach_work(struct work_struct *work) | |||
2119 | done: | 2136 | done: |
2120 | adapter->fw_fail_cnt = 0; | 2137 | adapter->fw_fail_cnt = 0; |
2121 | clear_bit(__QLCNIC_RESETTING, &adapter->state); | 2138 | clear_bit(__QLCNIC_RESETTING, &adapter->state); |
2122 | qlcnic_schedule_work(adapter, qlcnic_fw_poll_work, FW_POLL_DELAY); | 2139 | |
2140 | if (!qlcnic_clr_drv_state(adapter)) | ||
2141 | qlcnic_schedule_work(adapter, qlcnic_fw_poll_work, | ||
2142 | FW_POLL_DELAY); | ||
2123 | } | 2143 | } |
2124 | 2144 | ||
2125 | static int | 2145 | static int |