Skip to content

Commit

Permalink
Merge branch 'master' of master.kernel.org:/pub/scm/linux/kernel/git/…
Browse files Browse the repository at this point in the history
…davem/net-2.6

Conflicts:
	drivers/net/yellowfin.c
  • Loading branch information
davem330 committed Sep 2, 2009
2 parents 0625491 + 2fbd3da commit 6cdee2f
Show file tree
Hide file tree
Showing 50 changed files with 388 additions and 226 deletions.
4 changes: 3 additions & 1 deletion drivers/net/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -1727,12 +1727,14 @@ config KS8842
tristate "Micrel KSZ8842"
depends on HAS_IOMEM
help
This platform driver is for Micrel KSZ8842 chip.
This platform driver is for Micrel KSZ8842 / KS8842
2-port ethernet switch chip (managed, VLAN, QoS).

config KS8851
tristate "Micrel KS8851 SPI"
depends on SPI
select MII
select CRC32
help
SPI driver for Micrel KS8851 SPI attached network chip.

Expand Down
4 changes: 2 additions & 2 deletions drivers/net/arm/w90p910_ether.c
Original file line number Diff line number Diff line change
Expand Up @@ -1098,7 +1098,7 @@ static struct platform_driver w90p910_ether_driver = {
.probe = w90p910_ether_probe,
.remove = __devexit_p(w90p910_ether_remove),
.driver = {
.name = "w90p910-emc",
.name = "nuc900-emc",
.owner = THIS_MODULE,
},
};
Expand All @@ -1119,5 +1119,5 @@ module_exit(w90p910_ether_exit);
MODULE_AUTHOR("Wan ZongShun <mcuos.com@gmail.com>");
MODULE_DESCRIPTION("w90p910 MAC driver!");
MODULE_LICENSE("GPL");
MODULE_ALIAS("platform:w90p910-emc");
MODULE_ALIAS("platform:nuc900-emc");

5 changes: 3 additions & 2 deletions drivers/net/b44.c
Original file line number Diff line number Diff line change
Expand Up @@ -952,9 +952,10 @@ static netdev_tx_t b44_start_xmit(struct sk_buff *skb, struct net_device *dev)
int rc = NETDEV_TX_OK;
dma_addr_t mapping;
u32 len, entry, ctrl;
unsigned long flags;

len = skb->len;
spin_lock_irq(&bp->lock);
spin_lock_irqsave(&bp->lock, flags);

/* This is a hard error, log it. */
if (unlikely(TX_BUFFS_AVAIL(bp) < 1)) {
Expand Down Expand Up @@ -1027,7 +1028,7 @@ static netdev_tx_t b44_start_xmit(struct sk_buff *skb, struct net_device *dev)
dev->trans_start = jiffies;

out_unlock:
spin_unlock_irq(&bp->lock);
spin_unlock_irqrestore(&bp->lock, flags);

return rc;

Expand Down
17 changes: 11 additions & 6 deletions drivers/net/bnx2.c
Original file line number Diff line number Diff line change
Expand Up @@ -401,9 +401,11 @@ static int bnx2_unregister_cnic(struct net_device *dev)
struct bnx2_napi *bnapi = &bp->bnx2_napi[0];
struct cnic_eth_dev *cp = &bp->cnic_eth_dev;

mutex_lock(&bp->cnic_lock);
cp->drv_state = 0;
bnapi->cnic_present = 0;
rcu_assign_pointer(bp->cnic_ops, NULL);
mutex_unlock(&bp->cnic_lock);
synchronize_rcu();
return 0;
}
Expand Down Expand Up @@ -431,13 +433,13 @@ bnx2_cnic_stop(struct bnx2 *bp)
struct cnic_ops *c_ops;
struct cnic_ctl_info info;

rcu_read_lock();
c_ops = rcu_dereference(bp->cnic_ops);
mutex_lock(&bp->cnic_lock);
c_ops = bp->cnic_ops;
if (c_ops) {
info.cmd = CNIC_CTL_STOP_CMD;
c_ops->cnic_ctl(bp->cnic_data, &info);
}
rcu_read_unlock();
mutex_unlock(&bp->cnic_lock);
}

static void
Expand All @@ -446,8 +448,8 @@ bnx2_cnic_start(struct bnx2 *bp)
struct cnic_ops *c_ops;
struct cnic_ctl_info info;

rcu_read_lock();
c_ops = rcu_dereference(bp->cnic_ops);
mutex_lock(&bp->cnic_lock);
c_ops = bp->cnic_ops;
if (c_ops) {
if (!(bp->flags & BNX2_FLAG_USING_MSIX)) {
struct bnx2_napi *bnapi = &bp->bnx2_napi[0];
Expand All @@ -457,7 +459,7 @@ bnx2_cnic_start(struct bnx2 *bp)
info.cmd = CNIC_CTL_START_CMD;
c_ops->cnic_ctl(bp->cnic_data, &info);
}
rcu_read_unlock();
mutex_unlock(&bp->cnic_lock);
}

#else
Expand Down Expand Up @@ -7687,6 +7689,9 @@ bnx2_init_board(struct pci_dev *pdev, struct net_device *dev)

spin_lock_init(&bp->phy_lock);
spin_lock_init(&bp->indirect_lock);
#ifdef BCM_CNIC
mutex_init(&bp->cnic_lock);
#endif
INIT_WORK(&bp->reset_task, bnx2_reset_task);

dev->base_addr = dev->mem_start = pci_resource_start(pdev, 0);
Expand Down
1 change: 1 addition & 0 deletions drivers/net/bnx2.h
Original file line number Diff line number Diff line change
Expand Up @@ -6903,6 +6903,7 @@ struct bnx2 {
u32 idle_chk_status_idx;

#ifdef BCM_CNIC
struct mutex cnic_lock;
struct cnic_eth_dev cnic_eth_dev;
#endif

Expand Down
Loading

0 comments on commit 6cdee2f

Please sign in to comment.