aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/netxen
diff options
context:
space:
mode:
authorDhananjay Phadke <dhananjay@netxen.com>2008-08-08 03:08:41 -0400
committerJeff Garzik <jgarzik@redhat.com>2008-08-14 04:43:12 -0400
commit922c4f2c70c156ac38b4e6affbd30d4b1efd5864 (patch)
tree42184bba52d97f188e8f39651ad0f2c29fd1df35 /drivers/net/netxen
parent9e410778047d0f2887adb888b44eda4d72d4f67d (diff)
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: Dhananjay Phadke <dhananjay@netxen.com> Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
Diffstat (limited to 'drivers/net/netxen')
-rw-r--r--drivers/net/netxen/netxen_nic_main.c11
1 files changed, 5 insertions, 6 deletions
diff --git a/drivers/net/netxen/netxen_nic_main.c b/drivers/net/netxen/netxen_nic_main.c
index 056f6b17a331..f69807c9432b 100644
--- a/drivers/net/netxen/netxen_nic_main.c
+++ b/drivers/net/netxen/netxen_nic_main.c
@@ -934,7 +934,6 @@ request_msi:
934 goto err_out_disable_msi; 934 goto err_out_disable_msi;
935 935
936 init_timer(&adapter->watchdog_timer); 936 init_timer(&adapter->watchdog_timer);
937 adapter->ahw.linkup = 0;
938 adapter->watchdog_timer.function = &netxen_watchdog; 937 adapter->watchdog_timer.function = &netxen_watchdog;
939 adapter->watchdog_timer.data = (unsigned long)adapter; 938 adapter->watchdog_timer.data = (unsigned long)adapter;
940 INIT_WORK(&adapter->watchdog_task, netxen_watchdog_task); 939 INIT_WORK(&adapter->watchdog_task, netxen_watchdog_task);
@@ -1134,6 +1133,7 @@ static int netxen_nic_open(struct net_device *netdev)
1134 if (adapter->set_mtu) 1133 if (adapter->set_mtu)
1135 adapter->set_mtu(adapter, netdev->mtu); 1134 adapter->set_mtu(adapter, netdev->mtu);
1136 1135
1136 adapter->ahw.linkup = 0;
1137 mod_timer(&adapter->watchdog_timer, jiffies); 1137 mod_timer(&adapter->watchdog_timer, jiffies);
1138 1138
1139 napi_enable(&adapter->napi); 1139 napi_enable(&adapter->napi);
@@ -1171,10 +1171,8 @@ static int netxen_nic_close(struct net_device *netdev)
1171 1171
1172 netxen_release_tx_buffers(adapter); 1172 netxen_release_tx_buffers(adapter);
1173 1173
1174 if (adapter->is_up == NETXEN_ADAPTER_UP_MAGIC) { 1174 FLUSH_SCHEDULED_WORK();
1175 FLUSH_SCHEDULED_WORK(); 1175 del_timer_sync(&adapter->watchdog_timer);
1176 del_timer_sync(&adapter->watchdog_timer);
1177 }
1178 1176
1179 return 0; 1177 return 0;
1180} 1178}
@@ -1477,7 +1475,8 @@ void netxen_watchdog_task(struct work_struct *work)
1477 1475
1478 netxen_nic_handle_phy_intr(adapter); 1476 netxen_nic_handle_phy_intr(adapter);
1479 1477
1480 mod_timer(&adapter->watchdog_timer, jiffies + 2 * HZ); 1478 if (netif_running(adapter->netdev))
1479 mod_timer(&adapter->watchdog_timer, jiffies + 2 * HZ);
1481} 1480}
1482 1481
1483static void netxen_tx_timeout(struct net_device *netdev) 1482static void netxen_tx_timeout(struct net_device *netdev)