aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/pcnet32.c
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2010-05-21 00:04:44 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2010-05-21 00:04:44 -0400
commitf8965467f366fd18f01feafb5db10512d7b4422c (patch)
tree3706a9cd779859271ca61b85c63a1bc3f82d626e /drivers/net/pcnet32.c
parenta26272e5200765691e67d6780e52b32498fdb659 (diff)
parent2ec8c6bb5d8f3a62a79f463525054bae1e3d4487 (diff)
Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-next-2.6
* git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-next-2.6: (1674 commits) qlcnic: adding co maintainer ixgbe: add support for active DA cables ixgbe: dcb, do not tag tc_prio_control frames ixgbe: fix ixgbe_tx_is_paused logic ixgbe: always enable vlan strip/insert when DCB is enabled ixgbe: remove some redundant code in setting FCoE FIP filter ixgbe: fix wrong offset to fc_frame_header in ixgbe_fcoe_ddp ixgbe: fix header len when unsplit packet overflows to data buffer ipv6: Never schedule DAD timer on dead address ipv6: Use POSTDAD state ipv6: Use state_lock to protect ifa state ipv6: Replace inet6_ifaddr->dead with state cxgb4: notify upper drivers if the device is already up when they load cxgb4: keep interrupts available when the ports are brought down cxgb4: fix initial addition of MAC address cnic: Return SPQ credit to bnx2x after ring setup and shutdown. cnic: Convert cnic_local_flags to atomic ops. can: Fix SJA1000 command register writes on SMP systems bridge: fix build for CONFIG_SYSFS disabled ARCNET: Limit com20020 PCI ID matches for SOHARD cards ... Fix up various conflicts with pcmcia tree drivers/net/ {pcmcia/3c589_cs.c, wireless/orinoco/orinoco_cs.c and wireless/orinoco/spectrum_cs.c} and feature removal (Documentation/feature-removal-schedule.txt). Also fix a non-content conflict due to pm_qos_requirement getting renamed in the PM tree (now pm_qos_request) in net/mac80211/scan.c
Diffstat (limited to 'drivers/net/pcnet32.c')
-rw-r--r--drivers/net/pcnet32.c15
1 files changed, 5 insertions, 10 deletions
diff --git a/drivers/net/pcnet32.c b/drivers/net/pcnet32.c
index 084d78dd1637..c200c2821730 100644
--- a/drivers/net/pcnet32.c
+++ b/drivers/net/pcnet32.c
@@ -448,7 +448,7 @@ static void pcnet32_netif_stop(struct net_device *dev)
448{ 448{
449 struct pcnet32_private *lp = netdev_priv(dev); 449 struct pcnet32_private *lp = netdev_priv(dev);
450 450
451 dev->trans_start = jiffies; 451 dev->trans_start = jiffies; /* prevent tx timeout */
452 napi_disable(&lp->napi); 452 napi_disable(&lp->napi);
453 netif_tx_disable(dev); 453 netif_tx_disable(dev);
454} 454}
@@ -647,7 +647,6 @@ free_new_rx_ring:
647 (1 << size), 647 (1 << size),
648 new_rx_ring, 648 new_rx_ring,
649 new_ring_dma_addr); 649 new_ring_dma_addr);
650 return;
651} 650}
652 651
653static void pcnet32_purge_rx_ring(struct net_device *dev) 652static void pcnet32_purge_rx_ring(struct net_device *dev)
@@ -1215,7 +1214,6 @@ static void pcnet32_rx_entry(struct net_device *dev,
1215 skb->protocol = eth_type_trans(skb, dev); 1214 skb->protocol = eth_type_trans(skb, dev);
1216 netif_receive_skb(skb); 1215 netif_receive_skb(skb);
1217 dev->stats.rx_packets++; 1216 dev->stats.rx_packets++;
1218 return;
1219} 1217}
1220 1218
1221static int pcnet32_rx(struct net_device *dev, int budget) 1219static int pcnet32_rx(struct net_device *dev, int budget)
@@ -2398,7 +2396,7 @@ static void pcnet32_tx_timeout(struct net_device *dev)
2398 } 2396 }
2399 pcnet32_restart(dev, CSR0_NORMAL); 2397 pcnet32_restart(dev, CSR0_NORMAL);
2400 2398
2401 dev->trans_start = jiffies; 2399 dev->trans_start = jiffies; /* prevent tx timeout */
2402 netif_wake_queue(dev); 2400 netif_wake_queue(dev);
2403 2401
2404 spin_unlock_irqrestore(&lp->lock, flags); 2402 spin_unlock_irqrestore(&lp->lock, flags);
@@ -2449,8 +2447,6 @@ static netdev_tx_t pcnet32_start_xmit(struct sk_buff *skb,
2449 /* Trigger an immediate send poll. */ 2447 /* Trigger an immediate send poll. */
2450 lp->a.write_csr(ioaddr, CSR0, CSR0_INTEN | CSR0_TXPOLL); 2448 lp->a.write_csr(ioaddr, CSR0, CSR0_INTEN | CSR0_TXPOLL);
2451 2449
2452 dev->trans_start = jiffies;
2453
2454 if (lp->tx_ring[(entry + 1) & lp->tx_mod_mask].base != 0) { 2450 if (lp->tx_ring[(entry + 1) & lp->tx_mod_mask].base != 0) {
2455 lp->tx_full = 1; 2451 lp->tx_full = 1;
2456 netif_stop_queue(dev); 2452 netif_stop_queue(dev);
@@ -2590,7 +2586,7 @@ static void pcnet32_load_multicast(struct net_device *dev)
2590 struct pcnet32_private *lp = netdev_priv(dev); 2586 struct pcnet32_private *lp = netdev_priv(dev);
2591 volatile struct pcnet32_init_block *ib = lp->init_block; 2587 volatile struct pcnet32_init_block *ib = lp->init_block;
2592 volatile __le16 *mcast_table = (__le16 *)ib->filter; 2588 volatile __le16 *mcast_table = (__le16 *)ib->filter;
2593 struct dev_mc_list *dmi; 2589 struct netdev_hw_addr *ha;
2594 unsigned long ioaddr = dev->base_addr; 2590 unsigned long ioaddr = dev->base_addr;
2595 char *addrs; 2591 char *addrs;
2596 int i; 2592 int i;
@@ -2611,8 +2607,8 @@ static void pcnet32_load_multicast(struct net_device *dev)
2611 ib->filter[1] = 0; 2607 ib->filter[1] = 0;
2612 2608
2613 /* Add addresses */ 2609 /* Add addresses */
2614 netdev_for_each_mc_addr(dmi, dev) { 2610 netdev_for_each_mc_addr(ha, dev) {
2615 addrs = dmi->dmi_addr; 2611 addrs = ha->addr;
2616 2612
2617 /* multicast address? */ 2613 /* multicast address? */
2618 if (!(*addrs & 1)) 2614 if (!(*addrs & 1))
@@ -2625,7 +2621,6 @@ static void pcnet32_load_multicast(struct net_device *dev)
2625 for (i = 0; i < 4; i++) 2621 for (i = 0; i < 4; i++)
2626 lp->a.write_csr(ioaddr, PCNET32_MC_FILTER + i, 2622 lp->a.write_csr(ioaddr, PCNET32_MC_FILTER + i,
2627 le16_to_cpu(mcast_table[i])); 2623 le16_to_cpu(mcast_table[i]));
2628 return;
2629} 2624}
2630 2625
2631/* 2626/*