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] Use pci_set_consistent_dma_mask in ixgb driver
  [PATCH] sky2: bad memory reference on dual port cards
  [PATCH] mv643xx_eth: Fix tx_timeout to only conditionally wake tx queue
  [PATCH] mv643xx_eth: Always free completed tx descs on tx interrupt
  [PATCH] net drivers: fix section attributes for gcc
  [PATCH] remove drivers/net/hydra.h
  [PATCH] drivers/net/via-rhine.c: make a function static
  [netdrvr b44] trim trailing whitespace
  [PATCH] b44: increase version to 1.00
  [PATCH] b44: disable default tx pause
  [PATCH] via-rhine: execute bounce buffers code on Rhine-I only
  [PATCH] network: axnet_cs.c: add missing 'PRIV' in ei_rx_overrun
  [PATCH] dlink pci cards using wrong driver
  • Loading branch information
Linus Torvalds committed Apr 12, 2006
2 parents 6762b47 + c91e468 commit 2e9f0e1
Show file tree
Hide file tree
Showing 13 changed files with 67 additions and 233 deletions.
64 changes: 29 additions & 35 deletions drivers/net/b44.c
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
*
* Copyright (C) 2002 David S. Miller (davem@redhat.com)
* Fixed by Pekka Pietikainen (pp@ee.oulu.fi)
* Copyright (C) 2006 Broadcom Corporation.
*
* Distribute under GPL.
*/
Expand All @@ -28,8 +29,8 @@

#define DRV_MODULE_NAME "b44"
#define PFX DRV_MODULE_NAME ": "
#define DRV_MODULE_VERSION "0.97"
#define DRV_MODULE_RELDATE "Nov 30, 2005"
#define DRV_MODULE_VERSION "1.00"
#define DRV_MODULE_RELDATE "Apr 7, 2006"

#define B44_DEF_MSG_ENABLE \
(NETIF_MSG_DRV | \
Expand Down Expand Up @@ -136,7 +137,7 @@ static inline unsigned long br32(const struct b44 *bp, unsigned long reg)
return readl(bp->regs + reg);
}

static inline void bw32(const struct b44 *bp,
static inline void bw32(const struct b44 *bp,
unsigned long reg, unsigned long val)
{
writel(val, bp->regs + reg);
Expand Down Expand Up @@ -286,13 +287,13 @@ static void __b44_cam_write(struct b44 *bp, unsigned char *data, int index)
val |= ((u32) data[4]) << 8;
val |= ((u32) data[5]) << 0;
bw32(bp, B44_CAM_DATA_LO, val);
val = (CAM_DATA_HI_VALID |
val = (CAM_DATA_HI_VALID |
(((u32) data[0]) << 8) |
(((u32) data[1]) << 0));
bw32(bp, B44_CAM_DATA_HI, val);
bw32(bp, B44_CAM_CTRL, (CAM_CTRL_WRITE |
(index << CAM_CTRL_INDEX_SHIFT)));
b44_wait_bit(bp, B44_CAM_CTRL, CAM_CTRL_BUSY, 100, 1);
b44_wait_bit(bp, B44_CAM_CTRL, CAM_CTRL_BUSY, 100, 1);
}

static inline void __b44_disable_ints(struct b44 *bp)
Expand Down Expand Up @@ -410,25 +411,18 @@ static void __b44_set_flow_ctrl(struct b44 *bp, u32 pause_flags)

static void b44_set_flow_ctrl(struct b44 *bp, u32 local, u32 remote)
{
u32 pause_enab = bp->flags & (B44_FLAG_TX_PAUSE |
B44_FLAG_RX_PAUSE);
u32 pause_enab = 0;

if (local & ADVERTISE_PAUSE_CAP) {
if (local & ADVERTISE_PAUSE_ASYM) {
if (remote & LPA_PAUSE_CAP)
pause_enab |= (B44_FLAG_TX_PAUSE |
B44_FLAG_RX_PAUSE);
else if (remote & LPA_PAUSE_ASYM)
pause_enab |= B44_FLAG_RX_PAUSE;
} else {
if (remote & LPA_PAUSE_CAP)
pause_enab |= (B44_FLAG_TX_PAUSE |
B44_FLAG_RX_PAUSE);
}
} else if (local & ADVERTISE_PAUSE_ASYM) {
if ((remote & LPA_PAUSE_CAP) &&
(remote & LPA_PAUSE_ASYM))
pause_enab |= B44_FLAG_TX_PAUSE;
/* The driver supports only rx pause by default because
the b44 mac tx pause mechanism generates excessive
pause frames.
Use ethtool to turn on b44 tx pause if necessary.
*/
if ((local & ADVERTISE_PAUSE_CAP) &&
(local & ADVERTISE_PAUSE_ASYM)){
if ((remote & LPA_PAUSE_ASYM) &&
!(remote & LPA_PAUSE_CAP))
pause_enab |= B44_FLAG_RX_PAUSE;
}

__b44_set_flow_ctrl(bp, pause_enab);
Expand Down Expand Up @@ -1063,7 +1057,7 @@ static int b44_change_mtu(struct net_device *dev, int new_mtu)
spin_unlock_irq(&bp->lock);

b44_enable_ints(bp);

return 0;
}

Expand Down Expand Up @@ -1381,7 +1375,7 @@ static void b44_init_hw(struct b44 *bp)
bw32(bp, B44_DMARX_ADDR, bp->rx_ring_dma + bp->dma_offset);

bw32(bp, B44_DMARX_PTR, bp->rx_pending);
bp->rx_prod = bp->rx_pending;
bp->rx_prod = bp->rx_pending;

bw32(bp, B44_MIB_CTRL, MIB_CTRL_CLR_ON_READ);

Expand Down Expand Up @@ -1553,9 +1547,9 @@ static void __b44_set_rx_mode(struct net_device *dev)
val |= RXCONFIG_ALLMULTI;
else
i = __b44_load_mcast(bp, dev);

for (; i < 64; i++) {
__b44_cam_write(bp, zero, i);
__b44_cam_write(bp, zero, i);
}
bw32(bp, B44_RXCONFIG, val);
val = br32(bp, B44_CAM_CTRL);
Expand Down Expand Up @@ -1737,7 +1731,7 @@ static int b44_set_ringparam(struct net_device *dev,
spin_unlock_irq(&bp->lock);

b44_enable_ints(bp);

return 0;
}

Expand Down Expand Up @@ -1782,7 +1776,7 @@ static int b44_set_pauseparam(struct net_device *dev,
spin_unlock_irq(&bp->lock);

b44_enable_ints(bp);

return 0;
}

Expand Down Expand Up @@ -1898,7 +1892,7 @@ static int __devinit b44_get_invariants(struct b44 *bp)
bp->core_unit = ssb_core_unit(bp);
bp->dma_offset = SB_PCI_DMA;

/* XXX - really required?
/* XXX - really required?
bp->flags |= B44_FLAG_BUGGY_TXPTR;
*/
out:
Expand Down Expand Up @@ -1946,7 +1940,7 @@ static int __devinit b44_init_one(struct pci_dev *pdev,
"aborting.\n");
goto err_out_free_res;
}

err = pci_set_consistent_dma_mask(pdev, (u64) B44_DMA_MASK);
if (err) {
printk(KERN_ERR PFX "No usable DMA configuration, "
Expand Down Expand Up @@ -2041,9 +2035,9 @@ static int __devinit b44_init_one(struct pci_dev *pdev,

pci_save_state(bp->pdev);

/* Chip reset provides power to the b44 MAC & PCI cores, which
/* Chip reset provides power to the b44 MAC & PCI cores, which
* is necessary for MAC register access.
*/
*/
b44_chip_reset(bp);

printk(KERN_INFO "%s: Broadcom 4400 10/100BaseT Ethernet ", dev->name);
Expand Down Expand Up @@ -2091,10 +2085,10 @@ static int b44_suspend(struct pci_dev *pdev, pm_message_t state)

del_timer_sync(&bp->timer);

spin_lock_irq(&bp->lock);
spin_lock_irq(&bp->lock);

b44_halt(bp);
netif_carrier_off(bp->dev);
netif_carrier_off(bp->dev);
netif_device_detach(bp->dev);
b44_free_rings(bp);

Expand Down
2 changes: 1 addition & 1 deletion drivers/net/bnx2.c
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@
/* Time in jiffies before concluding the transmitter is hung. */
#define TX_TIMEOUT (5*HZ)

static char version[] __devinitdata =
static const char version[] __devinitdata =
"Broadcom NetXtreme II Gigabit Ethernet Driver " DRV_MODULE_NAME " v" DRV_MODULE_VERSION " (" DRV_MODULE_RELDATE ")\n";

MODULE_AUTHOR("Michael Chan <mchan@broadcom.com>");
Expand Down
177 changes: 0 additions & 177 deletions drivers/net/hydra.h

This file was deleted.

13 changes: 9 additions & 4 deletions drivers/net/ixgb/ixgb_main.c
Original file line number Diff line number Diff line change
Expand Up @@ -357,18 +357,20 @@ ixgb_probe(struct pci_dev *pdev,
if((err = pci_enable_device(pdev)))
return err;

if(!(err = pci_set_dma_mask(pdev, DMA_64BIT_MASK))) {
if(!(err = pci_set_dma_mask(pdev, DMA_64BIT_MASK)) &&
!(err = pci_set_consistent_dma_mask(pdev, DMA_64BIT_MASK))) {
pci_using_dac = 1;
} else {
if((err = pci_set_dma_mask(pdev, DMA_32BIT_MASK))) {
if((err = pci_set_dma_mask(pdev, DMA_32BIT_MASK)) ||
(err = pci_set_consistent_dma_mask(pdev, DMA_32BIT_MASK))) {
IXGB_ERR("No usable DMA configuration, aborting\n");
return err;
goto err_dma_mask;
}
pci_using_dac = 0;
}

if((err = pci_request_regions(pdev, ixgb_driver_name)))
return err;
goto err_request_regions;

pci_set_master(pdev);

Expand Down Expand Up @@ -502,6 +504,9 @@ ixgb_probe(struct pci_dev *pdev,
free_netdev(netdev);
err_alloc_etherdev:
pci_release_regions(pdev);
err_request_regions:
err_dma_mask:
pci_disable_device(pdev);
return err;
}

Expand Down
Loading

0 comments on commit 2e9f0e1

Please sign in to comment.