Skip to content

Commit

Permalink
Merge branch 'upstream-linus' of master.kernel.org:/pub/scm/linux/ker…
Browse files Browse the repository at this point in the history
…nel/git/jgarzik/netdev-2.6

* 'upstream-linus' of master.kernel.org:/pub/scm/linux/kernel/git/jgarzik/netdev-2.6:
  [PATCH] drivers cris: return on NULL dev_alloc_skb()
  [PATCH] com20020 build fix
  [PATCH] bonding: lockdep annotation
  [PATCH] bcm43xx: Add error checking in bcm43xx_sprom_write()
  [PATCH] bcm43xx: Drain TX status before starting IRQs
  • Loading branch information
Linus Torvalds committed Nov 13, 2006
2 parents 09123d2 + 1f10bec commit 189e7cc
Show file tree
Hide file tree
Showing 4 changed files with 32 additions and 4 deletions.
7 changes: 5 additions & 2 deletions drivers/net/arcnet/com20020.c
Original file line number Diff line number Diff line change
Expand Up @@ -337,13 +337,16 @@ static void com20020_set_mc_list(struct net_device *dev)
}
}

#ifdef MODULE

#if defined(CONFIG_ARCNET_COM20020_PCI_MODULE) || \
defined(CONFIG_ARCNET_COM20020_ISA_MODULE)
EXPORT_SYMBOL(com20020_check);
EXPORT_SYMBOL(com20020_found);
#endif

MODULE_LICENSE("GPL");

#ifdef MODULE

int init_module(void)
{
BUGLVL(D_NORMAL) printk(VERSION);
Expand Down
5 changes: 5 additions & 0 deletions drivers/net/bonding/bond_main.c
Original file line number Diff line number Diff line change
Expand Up @@ -4692,6 +4692,8 @@ static int bond_check_params(struct bond_params *params)
return 0;
}

static struct lock_class_key bonding_netdev_xmit_lock_key;

/* Create a new bond based on the specified name and bonding parameters.
* Caller must NOT hold rtnl_lock; we need to release it here before we
* set up our sysfs entries.
Expand Down Expand Up @@ -4727,6 +4729,9 @@ int bond_create(char *name, struct bond_params *params, struct bonding **newbond
if (res < 0) {
goto out_bond;
}

lockdep_set_class(&bond_dev->_xmit_lock, &bonding_netdev_xmit_lock_key);

if (newbond)
*newbond = bond_dev->priv;

Expand Down
2 changes: 2 additions & 0 deletions drivers/net/cris/eth_v10.c
Original file line number Diff line number Diff line change
Expand Up @@ -509,6 +509,8 @@ etrax_ethernet_init(void)
* does not share cacheline with any other data (to avoid cache bug)
*/
RxDescList[i].skb = dev_alloc_skb(MAX_MEDIA_DATA_SIZE + 2 * L1_CACHE_BYTES);
if (!RxDescList[i].skb)
return -ENOMEM;
RxDescList[i].descr.ctrl = 0;
RxDescList[i].descr.sw_len = MAX_MEDIA_DATA_SIZE;
RxDescList[i].descr.next = virt_to_phys(&RxDescList[i + 1]);
Expand Down
22 changes: 20 additions & 2 deletions drivers/net/wireless/bcm43xx/bcm43xx_main.c
Original file line number Diff line number Diff line change
Expand Up @@ -746,7 +746,7 @@ int bcm43xx_sprom_write(struct bcm43xx_private *bcm, const u16 *sprom)
if (err)
goto err_ctlreg;
spromctl |= 0x10; /* SPROM WRITE enable. */
bcm43xx_pci_write_config32(bcm, BCM43xx_PCICFG_SPROMCTL, spromctl);
err = bcm43xx_pci_write_config32(bcm, BCM43xx_PCICFG_SPROMCTL, spromctl);
if (err)
goto err_ctlreg;
/* We must burn lots of CPU cycles here, but that does not
Expand All @@ -768,7 +768,7 @@ int bcm43xx_sprom_write(struct bcm43xx_private *bcm, const u16 *sprom)
mdelay(20);
}
spromctl &= ~0x10; /* SPROM WRITE enable. */
bcm43xx_pci_write_config32(bcm, BCM43xx_PCICFG_SPROMCTL, spromctl);
err = bcm43xx_pci_write_config32(bcm, BCM43xx_PCICFG_SPROMCTL, spromctl);
if (err)
goto err_ctlreg;
mdelay(500);
Expand Down Expand Up @@ -1463,6 +1463,23 @@ static void handle_irq_transmit_status(struct bcm43xx_private *bcm)
}
}

static void drain_txstatus_queue(struct bcm43xx_private *bcm)
{
u32 dummy;

if (bcm->current_core->rev < 5)
return;
/* Read all entries from the microcode TXstatus FIFO
* and throw them away.
*/
while (1) {
dummy = bcm43xx_read32(bcm, BCM43xx_MMIO_XMITSTAT_0);
if (!dummy)
break;
dummy = bcm43xx_read32(bcm, BCM43xx_MMIO_XMITSTAT_1);
}
}

static void bcm43xx_generate_noise_sample(struct bcm43xx_private *bcm)
{
bcm43xx_shm_write16(bcm, BCM43xx_SHM_SHARED, 0x408, 0x7F7F);
Expand Down Expand Up @@ -3532,6 +3549,7 @@ int bcm43xx_select_wireless_core(struct bcm43xx_private *bcm,
bcm43xx_macfilter_clear(bcm, BCM43xx_MACFILTER_ASSOC);
bcm43xx_macfilter_set(bcm, BCM43xx_MACFILTER_SELF, (u8 *)(bcm->net_dev->dev_addr));
bcm43xx_security_init(bcm);
drain_txstatus_queue(bcm);
ieee80211softmac_start(bcm->net_dev);

/* Let's go! Be careful after enabling the IRQs.
Expand Down

0 comments on commit 189e7cc

Please sign in to comment.