diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2010-05-20 21:04:44 -0700 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2010-05-20 21:04:44 -0700 |
commit | f8965467f366fd18f01feafb5db10512d7b4422c (patch) | |
tree | 3706a9cd779859271ca61b85c63a1bc3f82d626e /drivers/net/tulip/de4x5.c | |
parent | a26272e5200765691e67d6780e52b32498fdb659 (diff) | |
parent | 2ec8c6bb5d8f3a62a79f463525054bae1e3d4487 (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/tulip/de4x5.c')
-rw-r--r-- | drivers/net/tulip/de4x5.c | 87 |
1 files changed, 9 insertions, 78 deletions
diff --git a/drivers/net/tulip/de4x5.c b/drivers/net/tulip/de4x5.c index 09b57193a16..75a64c88cf7 100644 --- a/drivers/net/tulip/de4x5.c +++ b/drivers/net/tulip/de4x5.c @@ -1337,7 +1337,7 @@ de4x5_open(struct net_device *dev) } lp->interrupt = UNMASK_INTERRUPTS; - dev->trans_start = jiffies; + dev->trans_start = jiffies; /* prevent tx timeout */ START_DE4X5; @@ -1507,7 +1507,6 @@ de4x5_queue_pkt(struct sk_buff *skb, struct net_device *dev) outl(POLL_DEMAND, DE4X5_TPD);/* Start the TX */ lp->tx_new = (++lp->tx_new) % lp->txRingSize; - dev->trans_start = jiffies; if (TX_BUFFS_AVAIL) { netif_start_queue(dev); /* Another pkt may be queued */ @@ -1884,8 +1883,6 @@ de4x5_local_stats(struct net_device *dev, char *buf, int pkt_len) if (lp->pktStats.bins[0] == 0) { /* Reset counters */ memset((char *)&lp->pktStats, 0, sizeof(lp->pktStats)); } - - return; } /* @@ -1937,7 +1934,7 @@ set_multicast_list(struct net_device *dev) lp->tx_new = (++lp->tx_new) % lp->txRingSize; outl(POLL_DEMAND, DE4X5_TPD); /* Start the TX */ - dev->trans_start = jiffies; + dev->trans_start = jiffies; /* prevent tx timeout */ } } } @@ -1951,7 +1948,7 @@ static void SetMulticastFilter(struct net_device *dev) { struct de4x5_private *lp = netdev_priv(dev); - struct dev_mc_list *dmi; + struct netdev_hw_addr *ha; u_long iobase = dev->base_addr; int i, bit, byte; u16 hashcode; @@ -1966,8 +1963,8 @@ SetMulticastFilter(struct net_device *dev) if ((dev->flags & IFF_ALLMULTI) || (netdev_mc_count(dev) > 14)) { omr |= OMR_PM; /* Pass all multicasts */ } else if (lp->setup_f == HASH_PERF) { /* Hash Filtering */ - netdev_for_each_mc_addr(dmi, dev) { - addrs = dmi->dmi_addr; + netdev_for_each_mc_addr(ha, dev) { + addrs = ha->addr; if ((*addrs & 0x01) == 1) { /* multicast address? */ crc = ether_crc_le(ETH_ALEN, addrs); hashcode = crc & HASH_BITS; /* hashcode is 9 LSb of CRC */ @@ -1983,8 +1980,8 @@ SetMulticastFilter(struct net_device *dev) } } } else { /* Perfect filtering */ - netdev_for_each_mc_addr(dmi, dev) { - addrs = dmi->dmi_addr; + netdev_for_each_mc_addr(ha, dev) { + addrs = ha->addr; for (i=0; i<ETH_ALEN; i++) { *(pa + (i&1)) = *addrs++; if (i & 0x01) pa += 4; @@ -1992,8 +1989,6 @@ SetMulticastFilter(struct net_device *dev) } } outl(omr, DE4X5_OMR); - - return; } #ifdef CONFIG_EISA @@ -2188,8 +2183,6 @@ srom_search(struct net_device *dev, struct pci_dev *pdev) return; } } - - return; } /* @@ -3292,8 +3285,6 @@ de4x5_init_connection(struct net_device *dev) outl(POLL_DEMAND, DE4X5_TPD); netif_wake_queue(dev); - - return; } /* @@ -3665,8 +3656,6 @@ de4x5_free_rx_buffs(struct net_device *dev) lp->rx_ring[i].status = 0; lp->rx_skb[i] = (struct sk_buff *)1; /* Dummy entry */ } - - return; } static void @@ -3709,8 +3698,6 @@ de4x5_save_skbs(struct net_device *dev) lp->cache.save_cnt++; START_DE4X5; } - - return; } static void @@ -3742,8 +3729,6 @@ de4x5_rst_desc_ring(struct net_device *dev) lp->cache.save_cnt--; START_DE4X5; } - - return; } static void @@ -3772,8 +3757,6 @@ de4x5_cache_state(struct net_device *dev, int flag) } break; } - - return; } static void @@ -3846,8 +3829,6 @@ de4x5_setup_intr(struct net_device *dev) outl(sts, DE4X5_STS); ENABLE_IRQs; } - - return; } /* @@ -3880,8 +3861,6 @@ reset_init_sia(struct net_device *dev, s32 csr13, s32 csr14, s32 csr15) outl(csr13, DE4X5_SICR); mdelay(10); - - return; } /* @@ -3902,8 +3881,6 @@ create_packet(struct net_device *dev, char *frame, int len) *buf++ = 0; /* Packet length (2 bytes) */ *buf++ = 1; - - return; } /* @@ -4007,8 +3984,6 @@ DevicePresent(struct net_device *dev, u_long aprom_addr) } de4x5_dbg_srom((struct de4x5_srom *)&lp->srom); } - - return; } /* @@ -4046,8 +4021,6 @@ enet_addr_rst(u_long aprom_addr) } } } - - return; } /* @@ -4187,8 +4160,6 @@ srom_repair(struct net_device *dev, int card) lp->useSROM = true; break; } - - return; } /* @@ -4262,8 +4233,6 @@ srom_latch(u_int command, u_long addr) sendto_srom(command, addr); sendto_srom(command | DT_CLK, addr); sendto_srom(command, addr); - - return; } static void @@ -4272,8 +4241,6 @@ srom_command(u_int command, u_long addr) srom_latch(command, addr); srom_latch(command, addr); srom_latch((command & 0x0000ff00) | DT_CS, addr); - - return; } static void @@ -4288,8 +4255,6 @@ srom_address(u_int command, u_long addr, u_char offset) udelay(1); i = (getfrom_srom(addr) >> 3) & 0x01; - - return; } static short @@ -4323,8 +4288,6 @@ srom_busy(u_int command, u_long addr) } sendto_srom(command & 0x0000ff00, addr); - - return; } */ @@ -4333,8 +4296,6 @@ sendto_srom(u_int command, u_long addr) { outl(command, addr); udelay(1); - - return; } static int @@ -4433,8 +4394,6 @@ srom_init(struct net_device *dev) p += ((*p & BLOCK_LEN) + 1); } } - - return; } /* @@ -4463,8 +4422,6 @@ srom_exec(struct net_device *dev, u_char *p) outl(lp->cache.csr14, DE4X5_STRR); outl(lp->cache.csr13, DE4X5_SICR); } - - return; } /* @@ -4889,8 +4846,6 @@ mii_wr(int data, u_char phyreg, u_char phyaddr, u_long ioaddr) mii_ta(MII_STWR, ioaddr); /* Turn around time - 2 MDC */ data = mii_swap(data, 16); /* Swap data bit ordering */ mii_wdata(data, 16, ioaddr); /* Write data */ - - return; } static int @@ -4916,8 +4871,6 @@ mii_wdata(int data, int len, u_long ioaddr) sendto_mii(MII_MWR | MII_WR, data, ioaddr); data >>= 1; } - - return; } static void @@ -4930,8 +4883,6 @@ mii_address(u_char addr, u_long ioaddr) sendto_mii(MII_MWR | MII_WR, addr, ioaddr); addr >>= 1; } - - return; } static void @@ -4943,8 +4894,6 @@ mii_ta(u_long rw, u_long ioaddr) } else { getfrom_mii(MII_MRD | MII_RD, ioaddr); /* Tri-state MDIO */ } - - return; } static int @@ -4971,8 +4920,6 @@ sendto_mii(u32 command, int data, u_long ioaddr) udelay(1); outl(command | MII_MDC | j, ioaddr); udelay(1); - - return; } static int @@ -5077,7 +5024,7 @@ mii_get_phy(struct net_device *dev) lp->phy[k].spd.value = GENERIC_VALUE; /* TX & T4, H/F Duplex */ lp->mii_cnt++; lp->active++; - printk("%s: Using generic MII device control. If the board doesn't operate, \nplease mail the following dump to the author:\n", dev->name); + printk("%s: Using generic MII device control. If the board doesn't operate,\nplease mail the following dump to the author:\n", dev->name); j = de4x5_debug; de4x5_debug |= DEBUG_MII; de4x5_dbg_mii(dev, k); @@ -5186,8 +5133,6 @@ gep_wr(s32 data, struct net_device *dev) } else if ((lp->chipset & ~0x00ff) == DC2114x) { outl((data<<16) | lp->cache.csr15, DE4X5_SIGR); } - - return; } static int @@ -5247,8 +5192,6 @@ yawn(struct net_device *dev, int state) break; } } - - return; } static void @@ -5290,8 +5233,6 @@ de4x5_parse_params(struct net_device *dev) } *q = t; } - - return; } static void @@ -5337,12 +5278,10 @@ de4x5_dbg_open(struct net_device *dev) } } printk("...0x%8.8x\n", le32_to_cpu(lp->tx_ring[i].buf)); - printk("Ring size: \nRX: %d\nTX: %d\n", + printk("Ring size:\nRX: %d\nTX: %d\n", (short)lp->rxRingSize, (short)lp->txRingSize); } - - return; } static void @@ -5369,8 +5308,6 @@ de4x5_dbg_mii(struct net_device *dev, int k) printk("MII 20: %x\n",mii_rd(0x14,lp->phy[k].addr,DE4X5_MII)); } } - - return; } static void @@ -5395,8 +5332,6 @@ de4x5_dbg_media(struct net_device *dev) } lp->c_media = lp->media; } - - return; } static void @@ -5417,8 +5352,6 @@ de4x5_dbg_srom(struct de4x5_srom *p) printk("%3d %04x\n", i<<1, (u_short)*((u_short *)p+i)); } } - - return; } static void @@ -5440,8 +5373,6 @@ de4x5_dbg_rx(struct sk_buff *skb, int len) printk("\n"); } } - - return; } /* |