Commit 922c4f2c authored by Dhananjay Phadke's avatar Dhananjay Phadke Committed by Jeff Garzik

netxen: force link update across ifdown/ifup

Re-read link status in dev open(). Schedule link watchdog only
if dev is up.
Signed-off-by: default avatarDhananjay Phadke <dhananjay@netxen.com>
Signed-off-by: default avatarJeff Garzik <jgarzik@redhat.com>
parent 9e410778
...@@ -934,7 +934,6 @@ request_msi: ...@@ -934,7 +934,6 @@ request_msi:
goto err_out_disable_msi; goto err_out_disable_msi;
init_timer(&adapter->watchdog_timer); init_timer(&adapter->watchdog_timer);
adapter->ahw.linkup = 0;
adapter->watchdog_timer.function = &netxen_watchdog; adapter->watchdog_timer.function = &netxen_watchdog;
adapter->watchdog_timer.data = (unsigned long)adapter; adapter->watchdog_timer.data = (unsigned long)adapter;
INIT_WORK(&adapter->watchdog_task, netxen_watchdog_task); INIT_WORK(&adapter->watchdog_task, netxen_watchdog_task);
...@@ -1134,6 +1133,7 @@ static int netxen_nic_open(struct net_device *netdev) ...@@ -1134,6 +1133,7 @@ static int netxen_nic_open(struct net_device *netdev)
if (adapter->set_mtu) if (adapter->set_mtu)
adapter->set_mtu(adapter, netdev->mtu); adapter->set_mtu(adapter, netdev->mtu);
adapter->ahw.linkup = 0;
mod_timer(&adapter->watchdog_timer, jiffies); mod_timer(&adapter->watchdog_timer, jiffies);
napi_enable(&adapter->napi); napi_enable(&adapter->napi);
...@@ -1171,10 +1171,8 @@ static int netxen_nic_close(struct net_device *netdev) ...@@ -1171,10 +1171,8 @@ static int netxen_nic_close(struct net_device *netdev)
netxen_release_tx_buffers(adapter); netxen_release_tx_buffers(adapter);
if (adapter->is_up == NETXEN_ADAPTER_UP_MAGIC) {
FLUSH_SCHEDULED_WORK(); FLUSH_SCHEDULED_WORK();
del_timer_sync(&adapter->watchdog_timer); del_timer_sync(&adapter->watchdog_timer);
}
return 0; return 0;
} }
...@@ -1477,6 +1475,7 @@ void netxen_watchdog_task(struct work_struct *work) ...@@ -1477,6 +1475,7 @@ void netxen_watchdog_task(struct work_struct *work)
netxen_nic_handle_phy_intr(adapter); netxen_nic_handle_phy_intr(adapter);
if (netif_running(adapter->netdev))
mod_timer(&adapter->watchdog_timer, jiffies + 2 * HZ); mod_timer(&adapter->watchdog_timer, jiffies + 2 * HZ);
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment