aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/netxen/netxen_nic_isr.c
diff options
context:
space:
mode:
authorPaul Mackerras <paulus@samba.org>2008-04-14 07:11:02 -0400
committerPaul Mackerras <paulus@samba.org>2008-04-14 07:11:02 -0400
commitac7c5353b189e10cf5dd27399f64f7b013abffc6 (patch)
tree8222d92b774c256d6ec4399c716d76b3f05ddc4b /drivers/net/netxen/netxen_nic_isr.c
parenta8f75ea70c58546205fb7673be41455b9da5d9a7 (diff)
parent120dd64cacd4fb796bca0acba3665553f1d9ecaa (diff)
Merge branch 'linux-2.6'
Diffstat (limited to 'drivers/net/netxen/netxen_nic_isr.c')
-rw-r--r--drivers/net/netxen/netxen_nic_isr.c19
1 files changed, 5 insertions, 14 deletions
diff --git a/drivers/net/netxen/netxen_nic_isr.c b/drivers/net/netxen/netxen_nic_isr.c
index 48a404aa66ce..c81313b717bd 100644
--- a/drivers/net/netxen/netxen_nic_isr.c
+++ b/drivers/net/netxen/netxen_nic_isr.c
@@ -59,7 +59,7 @@ struct net_device_stats *netxen_nic_get_stats(struct net_device *netdev)
59 /* packet transmit problems */ 59 /* packet transmit problems */
60 stats->tx_errors = adapter->stats.nocmddescriptor; 60 stats->tx_errors = adapter->stats.nocmddescriptor;
61 /* no space in linux buffers */ 61 /* no space in linux buffers */
62 stats->rx_dropped = adapter->stats.updropped; 62 stats->rx_dropped = adapter->stats.rxdropped;
63 /* no space available in linux */ 63 /* no space available in linux */
64 stats->tx_dropped = adapter->stats.txdropped; 64 stats->tx_dropped = adapter->stats.txdropped;
65 65
@@ -193,14 +193,14 @@ int netxen_nic_link_ok(struct netxen_adapter *adapter)
193void netxen_nic_xgbe_handle_phy_intr(struct netxen_adapter *adapter) 193void netxen_nic_xgbe_handle_phy_intr(struct netxen_adapter *adapter)
194{ 194{
195 struct net_device *netdev = adapter->netdev; 195 struct net_device *netdev = adapter->netdev;
196 u32 val, val1; 196 u32 val;
197 197
198 /* WINDOW = 1 */ 198 /* WINDOW = 1 */
199 val = readl(NETXEN_CRB_NORMALIZE(adapter, CRB_XG_STATE)); 199 val = readl(NETXEN_CRB_NORMALIZE(adapter, CRB_XG_STATE));
200 val >>= (physical_port[adapter->portnum] * 8); 200 val >>= (physical_port[adapter->portnum] * 8);
201 val1 = val & 0xff; 201 val &= 0xff;
202 202
203 if (adapter->ahw.xg_linkup == 1 && val1 != XG_LINK_UP) { 203 if (adapter->ahw.xg_linkup == 1 && val != XG_LINK_UP) {
204 printk(KERN_INFO "%s: %s NIC Link is down\n", 204 printk(KERN_INFO "%s: %s NIC Link is down\n",
205 netxen_nic_driver_name, netdev->name); 205 netxen_nic_driver_name, netdev->name);
206 adapter->ahw.xg_linkup = 0; 206 adapter->ahw.xg_linkup = 0;
@@ -208,16 +208,7 @@ void netxen_nic_xgbe_handle_phy_intr(struct netxen_adapter *adapter)
208 netif_carrier_off(netdev); 208 netif_carrier_off(netdev);
209 netif_stop_queue(netdev); 209 netif_stop_queue(netdev);
210 } 210 }
211 /* read twice to clear sticky bits */ 211 } else if (adapter->ahw.xg_linkup == 0 && val == XG_LINK_UP) {
212 /* WINDOW = 0 */
213 netxen_nic_read_w0(adapter, NETXEN_NIU_XG_STATUS, &val1);
214 netxen_nic_read_w0(adapter, NETXEN_NIU_XG_STATUS, &val1);
215
216 if ((val & 0xffb) != 0xffb) {
217 printk(KERN_INFO "%s ISR: Sync/Align BAD: 0x%08x\n",
218 netxen_nic_driver_name, val1);
219 }
220 } else if (adapter->ahw.xg_linkup == 0 && val1 == XG_LINK_UP) {
221 printk(KERN_INFO "%s: %s NIC Link is up\n", 212 printk(KERN_INFO "%s: %s NIC Link is up\n",
222 netxen_nic_driver_name, netdev->name); 213 netxen_nic_driver_name, netdev->name);
223 adapter->ahw.xg_linkup = 1; 214 adapter->ahw.xg_linkup = 1;