Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 256244
b: refs/heads/master
c: a05e42c
h: refs/heads/master
v: v3
  • Loading branch information
David S. Miller committed Jul 8, 2011
1 parent 6cd6eba commit 01a44c5
Show file tree
Hide file tree
Showing 34 changed files with 325 additions and 215 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 204d1641d200709c759d8c269458cbc7de378c40
refs/heads/master: a05e42c27f80d341a5ec2053b041e24231a002e2
11 changes: 1 addition & 10 deletions trunk/drivers/atm/ambassador.c
Original file line number Diff line number Diff line change
Expand Up @@ -813,7 +813,7 @@ static void fill_rx_pool (amb_dev * dev, unsigned char pool,
return;
}

// top up all RX pools (can also be called as a bottom half)
// top up all RX pools
static void fill_rx_pools (amb_dev * dev) {
unsigned char pool;

Expand Down Expand Up @@ -872,11 +872,7 @@ static irqreturn_t interrupt_handler(int irq, void *dev_id) {
++irq_work;

if (irq_work) {
#ifdef FILL_RX_POOLS_IN_BH
schedule_work (&dev->bh);
#else
fill_rx_pools (dev);
#endif

PRINTD (DBG_IRQ, "work done: %u", irq_work);
} else {
Expand Down Expand Up @@ -2154,11 +2150,6 @@ static void setup_dev(amb_dev *dev, struct pci_dev *pci_dev)
dev->tx_avail = ATM_OC3_PCR;
dev->rx_avail = ATM_OC3_PCR;

#ifdef FILL_RX_POOLS_IN_BH
// initialise bottom half
INIT_WORK(&dev->bh, (void (*)(void *)) fill_rx_pools, dev);
#endif

// semaphore for txer/rxer modifications - we cannot use a
// spinlock as the critical region needs to switch processes
mutex_init(&dev->vcc_sf);
Expand Down
4 changes: 0 additions & 4 deletions trunk/drivers/atm/ambassador.h
Original file line number Diff line number Diff line change
Expand Up @@ -630,10 +630,6 @@ struct amb_dev {
u32 iobase;
u32 * membase;

#ifdef FILL_RX_POOLS_IN_BH
struct work_struct bh;
#endif

amb_cq cq;
amb_txq txq;
amb_rxq rxq[NUM_RX_POOLS];
Expand Down
9 changes: 1 addition & 8 deletions trunk/drivers/net/7990.c
Original file line number Diff line number Diff line change
Expand Up @@ -594,7 +594,6 @@ static void lance_load_multicast (struct net_device *dev)
volatile struct lance_init_block *ib = lp->init_block;
volatile u16 *mcast_table = (u16 *)&ib->filter;
struct netdev_hw_addr *ha;
char *addrs;
u32 crc;

/* set all multicast bits */
Expand All @@ -609,13 +608,7 @@ static void lance_load_multicast (struct net_device *dev)

/* Add addresses */
netdev_for_each_mc_addr(ha, dev) {
addrs = ha->addr;

/* multicast address? */
if (!(*addrs & 1))
continue;

crc = ether_crc_le(6, addrs);
crc = ether_crc_le(6, ha->addr);
crc = crc >> 26;
mcast_table [crc >> 4] |= 1 << (crc & 0xf);
}
Expand Down
8 changes: 4 additions & 4 deletions trunk/drivers/net/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -2272,7 +2272,7 @@ config SIS190
will be called sis190. This is recommended.

config SKGE
tristate "SysKonnect GigaEthernet support"
tristate "Marvell Yukon Gigabit Ethernet support"
depends on PCI
select CRC32
---help---
Expand All @@ -2288,7 +2288,7 @@ config SKGE
Linksys EG1032/EG1064, 3Com 3C940/3C940B, SysKonnect SK-9871/9872.

It does not support the newer Yukon2 chipset: a separate driver,
sky2, is provided for Yukon2-based adapters.
sky2, is provided for these adapters.

To compile this driver as a module, choose M here: the module
will be called skge. This is recommended.
Expand All @@ -2313,7 +2313,7 @@ config SKGE_GENESIS
by making code smaller. If unsure say Y.

config SKY2
tristate "SysKonnect Yukon2 support"
tristate "Marvell Yukon 2 support"
depends on PCI
select CRC32
---help---
Expand All @@ -2323,7 +2323,7 @@ config SKY2
88E8053/88E8055/88E8061/88E8062, SysKonnect SK-9E21D/SK-9S21

There is companion driver for the older Marvell Yukon and
Genesis based adapters: skge.
SysKonnect Genesis based adapters: skge.

To compile this driver as a module, choose M here: the module
will be called sky2. This is recommended.
Expand Down
9 changes: 1 addition & 8 deletions trunk/drivers/net/a2065.c
Original file line number Diff line number Diff line change
Expand Up @@ -587,7 +587,6 @@ static void lance_load_multicast(struct net_device *dev)
volatile struct lance_init_block *ib = lp->init_block;
volatile u16 *mcast_table = (u16 *)&ib->filter;
struct netdev_hw_addr *ha;
char *addrs;
u32 crc;

/* set all multicast bits */
Expand All @@ -602,13 +601,7 @@ static void lance_load_multicast(struct net_device *dev)

/* Add addresses */
netdev_for_each_mc_addr(ha, dev) {
addrs = ha->addr;

/* multicast address? */
if (!(*addrs & 1))
continue;

crc = ether_crc_le(6, addrs);
crc = ether_crc_le(6, ha->addr);
crc = crc >> 26;
mcast_table[crc >> 4] |= 1 << (crc & 0xf);
}
Expand Down
8 changes: 1 addition & 7 deletions trunk/drivers/net/bmac.c
Original file line number Diff line number Diff line change
Expand Up @@ -1015,7 +1015,6 @@ static void bmac_set_multicast(struct net_device *dev)
static void bmac_set_multicast(struct net_device *dev)
{
struct netdev_hw_addr *ha;
char *addrs;
int i;
unsigned short rx_cfg;
u32 crc;
Expand All @@ -1039,12 +1038,7 @@ static void bmac_set_multicast(struct net_device *dev)
for(i = 0; i < 4; i++) hash_table[i] = 0;

netdev_for_each_mc_addr(ha, dev) {
addrs = ha->addr;

if(!(*addrs & 1))
continue;

crc = ether_crc_le(6, addrs);
crc = ether_crc_le(6, ha->addr);
crc >>= 26;
hash_table[crc >> 4] |= 1 << (crc & 0xf);
}
Expand Down
6 changes: 2 additions & 4 deletions trunk/drivers/net/bna/bnad.c
Original file line number Diff line number Diff line change
Expand Up @@ -386,14 +386,12 @@ bnad_alloc_n_post_rxbufs(struct bnad *bnad, struct bna_rcb *rcb)
BNA_RXQ_QPGE_PTR_GET(unmap_prod, rcb->sw_qpt, rxent,
wi_range);
}
skb = alloc_skb(rcb->rxq->buffer_size + NET_IP_ALIGN,
GFP_ATOMIC);
skb = netdev_alloc_skb_ip_align(bnad->netdev,
rcb->rxq->buffer_size);
if (unlikely(!skb)) {
BNAD_UPDATE_CTR(bnad, rxbuf_alloc_failed);
goto finishing;
}
skb->dev = bnad->netdev;
skb_reserve(skb, NET_IP_ALIGN);
unmap_array[unmap_prod].skb = skb;
dma_addr = dma_map_single(&bnad->pcidev->dev, skb->data,
rcb->rxq->buffer_size,
Expand Down
9 changes: 1 addition & 8 deletions trunk/drivers/net/declance.c
Original file line number Diff line number Diff line change
Expand Up @@ -946,7 +946,6 @@ static void lance_load_multicast(struct net_device *dev)
struct lance_private *lp = netdev_priv(dev);
volatile u16 *ib = (volatile u16 *)dev->mem_start;
struct netdev_hw_addr *ha;
char *addrs;
u32 crc;

/* set all multicast bits */
Expand All @@ -965,13 +964,7 @@ static void lance_load_multicast(struct net_device *dev)

/* Add addresses */
netdev_for_each_mc_addr(ha, dev) {
addrs = ha->addr;

/* multicast address? */
if (!(*addrs & 1))
continue;

crc = ether_crc_le(ETH_ALEN, addrs);
crc = ether_crc_le(ETH_ALEN, ha->addr);
crc = crc >> 26;
*lib_ptr(ib, filter[crc >> 4], lp->type) |= 1 << (crc & 0xf);
}
Expand Down
31 changes: 14 additions & 17 deletions trunk/drivers/net/ewrk3.c
Original file line number Diff line number Diff line change
Expand Up @@ -1169,7 +1169,7 @@ static void SetMulticastFilter(struct net_device *dev)
struct netdev_hw_addr *ha;
u_long iobase = dev->base_addr;
int i;
char *addrs, bit, byte;
char bit, byte;
short __iomem *p = lp->mctbl;
u16 hashcode;
u32 crc;
Expand Down Expand Up @@ -1211,25 +1211,22 @@ static void SetMulticastFilter(struct net_device *dev)

/* Update table */
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 & ((1 << 9) - 1); /* hashcode is 9 LSb of CRC */
crc = ether_crc_le(ETH_ALEN, ha->addr);
hashcode = crc & ((1 << 9) - 1); /* hashcode is 9 LSb of CRC */

byte = hashcode >> 3; /* bit[3-8] -> byte in filter */
bit = 1 << (hashcode & 0x07); /* bit[0-2] -> bit in byte */
byte = hashcode >> 3; /* bit[3-8] -> byte in filter */
bit = 1 << (hashcode & 0x07); /* bit[0-2] -> bit in byte */

if (lp->shmem_length == IO_ONLY) {
u_char tmp;
if (lp->shmem_length == IO_ONLY) {
u_char tmp;

outw(PAGE0_HTE + byte, EWRK3_PIR1);
tmp = inb(EWRK3_DATA);
tmp |= bit;
outw(PAGE0_HTE + byte, EWRK3_PIR1);
outb(tmp, EWRK3_DATA);
} else {
writeb(readb(lp->mctbl + byte) | bit, lp->mctbl + byte);
}
outw(PAGE0_HTE + byte, EWRK3_PIR1);
tmp = inb(EWRK3_DATA);
tmp |= bit;
outw(PAGE0_HTE + byte, EWRK3_PIR1);
outb(tmp, EWRK3_DATA);
} else {
writeb(readb(lp->mctbl + byte) | bit, lp->mctbl + byte);
}
}
}
Expand Down
4 changes: 0 additions & 4 deletions trunk/drivers/net/fec.c
Original file line number Diff line number Diff line change
Expand Up @@ -1227,10 +1227,6 @@ static void set_multicast_list(struct net_device *ndev)
writel(0, fep->hwp + FEC_GRP_HASH_TABLE_LOW);

netdev_for_each_mc_addr(ha, ndev) {
/* Only support group multicast for now */
if (!(ha->addr[0] & 1))
continue;

/* calculate crc32 value of mac address */
crc = 0xffffffff;

Expand Down
18 changes: 8 additions & 10 deletions trunk/drivers/net/hp100.c
Original file line number Diff line number Diff line change
Expand Up @@ -2103,20 +2103,18 @@ static void hp100_set_multicast_list(struct net_device *dev)
#endif
netdev_for_each_mc_addr(ha, dev) {
addrs = ha->addr;
if ((*addrs & 0x01) == 0x01) { /* multicast address? */
#ifdef HP100_DEBUG
printk("hp100: %s: multicast = %pM, ",
dev->name, addrs);
printk("hp100: %s: multicast = %pM, ",
dev->name, addrs);
#endif
for (i = idx = 0; i < 6; i++) {
idx ^= *addrs++ & 0x3f;
printk(":%02x:", idx);
}
for (i = idx = 0; i < 6; i++) {
idx ^= *addrs++ & 0x3f;
printk(":%02x:", idx);
}
#ifdef HP100_DEBUG
printk("idx = %i\n", idx);
printk("idx = %i\n", idx);
#endif
lp->hash_bytes[idx >> 3] |= (1 << (idx & 7));
}
lp->hash_bytes[idx >> 3] |= (1 << (idx & 7));
}
}
#else
Expand Down
7 changes: 1 addition & 6 deletions trunk/drivers/net/ioc3-eth.c
Original file line number Diff line number Diff line change
Expand Up @@ -1664,12 +1664,7 @@ static void ioc3_set_multicast_list(struct net_device *dev)
ip->ehar_l = 0xffffffff;
} else {
netdev_for_each_mc_addr(ha, dev) {
char *addr = ha->addr;

if (!(*addr & 1))
continue;

ehar |= (1UL << ioc3_hash(addr));
ehar |= (1UL << ioc3_hash(ha->addr));
}
ip->ehar_h = ehar >> 32;
ip->ehar_l = ehar & 0xffffffff;
Expand Down
7 changes: 1 addition & 6 deletions trunk/drivers/net/korina.c
Original file line number Diff line number Diff line change
Expand Up @@ -504,12 +504,7 @@ static void korina_multicast_list(struct net_device *dev)
hash_table[i] = 0;

netdev_for_each_mc_addr(ha, dev) {
char *addrs = ha->addr;

if (!(*addrs & 1))
continue;

crc = ether_crc_le(6, addrs);
crc = ether_crc_le(6, ha->addr);
crc >>= 26;
hash_table[crc >> 4] |= 1 << (15 - (crc & 0xf));
}
Expand Down
2 changes: 0 additions & 2 deletions trunk/drivers/net/ks8851_mll.c
Original file line number Diff line number Diff line change
Expand Up @@ -1190,8 +1190,6 @@ static void ks_set_rx_mode(struct net_device *netdev)
int i = 0;

netdev_for_each_mc_addr(ha, netdev) {
if (!(*ha->addr & 1))
continue;
if (i >= MAX_MCAST_LST)
break;
memcpy(ks->mcast_lst[i++], ha->addr, ETH_ALEN);
Expand Down
2 changes: 0 additions & 2 deletions trunk/drivers/net/ksz884x.c
Original file line number Diff line number Diff line change
Expand Up @@ -5785,8 +5785,6 @@ static void netdev_set_rx_mode(struct net_device *dev)
}

netdev_for_each_mc_addr(ha, dev) {
if (!(*ha->addr & 1))
continue;
if (i >= MAX_MULTICAST_LIST)
break;
memcpy(hw->multi_list[i++], ha->addr, MAC_ADDR_LEN);
Expand Down
9 changes: 1 addition & 8 deletions trunk/drivers/net/pcnet32.c
Original file line number Diff line number Diff line change
Expand Up @@ -2570,7 +2570,6 @@ static void pcnet32_load_multicast(struct net_device *dev)
volatile __le16 *mcast_table = (__le16 *)ib->filter;
struct netdev_hw_addr *ha;
unsigned long ioaddr = dev->base_addr;
char *addrs;
int i;
u32 crc;

Expand All @@ -2590,13 +2589,7 @@ static void pcnet32_load_multicast(struct net_device *dev)

/* Add addresses */
netdev_for_each_mc_addr(ha, dev) {
addrs = ha->addr;

/* multicast address? */
if (!(*addrs & 1))
continue;

crc = ether_crc_le(6, addrs);
crc = ether_crc_le(6, ha->addr);
crc = crc >> 26;
mcast_table[crc >> 4] |= cpu_to_le16(1 << (crc & 0xf));
}
Expand Down
Loading

0 comments on commit 01a44c5

Please sign in to comment.