diff options
author | Mithlesh Thukral <mithlesh@netxen.com> | 2007-06-11 06:30:58 -0400 |
---|---|---|
committer | Jeff Garzik <jeff@garzik.org> | 2007-06-12 18:58:58 -0400 |
commit | c27e672172def41924ea8410398554c49c17b3c1 (patch) | |
tree | 9dbce89a10d6724ecfbfdc1078d3472c862be9d0 /drivers/net/netxen/netxen_nic_init.c | |
parent | ca93ca428b8e09973f19e2725bf19cb3f1836034 (diff) |
NetXen: Fix link status messages
NetXen: Fix incorrect link status even with switch turned OFF.
NetXen driver failed to accurately indicate when a link is up or down.
This was encountered during failover testing, when the first port
indicated that the link was up even when the 10G switch it was assigned
to in the Bladecenter was turned off completely.
Signed-off by: Wen Xiong <wenxiong@us.ibm.com>
Signed-off by: Mithlesh Thukral <mithlesh@netxen.com>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
Diffstat (limited to 'drivers/net/netxen/netxen_nic_init.c')
-rw-r--r-- | drivers/net/netxen/netxen_nic_init.c | 21 |
1 files changed, 13 insertions, 8 deletions
diff --git a/drivers/net/netxen/netxen_nic_init.c b/drivers/net/netxen/netxen_nic_init.c index 8e7c4a5bc26a..bb23f4c360db 100644 --- a/drivers/net/netxen/netxen_nic_init.c +++ b/drivers/net/netxen/netxen_nic_init.c | |||
@@ -1037,18 +1037,23 @@ void netxen_watchdog_task(struct work_struct *work) | |||
1037 | if ((adapter->portnum == 0) && netxen_nic_check_temp(adapter)) | 1037 | if ((adapter->portnum == 0) && netxen_nic_check_temp(adapter)) |
1038 | return; | 1038 | return; |
1039 | 1039 | ||
1040 | if (adapter->handle_phy_intr) | ||
1041 | adapter->handle_phy_intr(adapter); | ||
1042 | |||
1040 | netdev = adapter->netdev; | 1043 | netdev = adapter->netdev; |
1041 | if ((netif_running(netdev)) && !netif_carrier_ok(netdev)) { | 1044 | if ((netif_running(netdev)) && !netif_carrier_ok(netdev) && |
1042 | printk(KERN_INFO "%s port %d, %s carrier is now ok\n", | 1045 | netxen_nic_link_ok(adapter) ) { |
1043 | netxen_nic_driver_name, adapter->portnum, netdev->name); | 1046 | printk(KERN_INFO "%s %s (port %d), Link is up\n", |
1047 | netxen_nic_driver_name, netdev->name, adapter->portnum); | ||
1044 | netif_carrier_on(netdev); | 1048 | netif_carrier_on(netdev); |
1045 | } | ||
1046 | |||
1047 | if (netif_queue_stopped(netdev)) | ||
1048 | netif_wake_queue(netdev); | 1049 | netif_wake_queue(netdev); |
1050 | } else if(!(netif_running(netdev)) && netif_carrier_ok(netdev)) { | ||
1051 | printk(KERN_ERR "%s %s Link is Down\n", | ||
1052 | netxen_nic_driver_name, netdev->name); | ||
1053 | netif_carrier_off(netdev); | ||
1054 | netif_stop_queue(netdev); | ||
1055 | } | ||
1049 | 1056 | ||
1050 | if (adapter->handle_phy_intr) | ||
1051 | adapter->handle_phy_intr(adapter); | ||
1052 | mod_timer(&adapter->watchdog_timer, jiffies + 2 * HZ); | 1057 | mod_timer(&adapter->watchdog_timer, jiffies + 2 * HZ); |
1053 | } | 1058 | } |
1054 | 1059 | ||