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/ehea/ehea_main.c
	drivers/net/wireless/iwlwifi/Kconfig
	drivers/net/wireless/rt2x00/rt61pci.c
	net/ipv4/inet_timewait_sock.c
	net/ipv6/raw.c
	net/mac80211/ieee80211_sta.c
  • Loading branch information
davem330 committed Apr 14, 2008
2 parents f557285 + 159d833 commit df39e8b
Show file tree
Hide file tree
Showing 69 changed files with 835 additions and 358 deletions.
1 change: 1 addition & 0 deletions drivers/isdn/i4l/isdn_net.c
Original file line number Diff line number Diff line change
Expand Up @@ -2010,6 +2010,7 @@ isdn_net_init(struct net_device *ndev)
ndev->flags = IFF_NOARP|IFF_POINTOPOINT;
ndev->type = ARPHRD_ETHER;
ndev->addr_len = ETH_ALEN;
ndev->validate_addr = NULL;

/* for clients with MPPP maybe higher values better */
ndev->tx_queue_len = 30;
Expand Down
6 changes: 3 additions & 3 deletions drivers/net/bnx2x.c
Original file line number Diff line number Diff line change
Expand Up @@ -63,8 +63,8 @@
#include "bnx2x.h"
#include "bnx2x_init.h"

#define DRV_MODULE_VERSION "1.42.3"
#define DRV_MODULE_RELDATE "2008/3/9"
#define DRV_MODULE_VERSION "1.42.4"
#define DRV_MODULE_RELDATE "2008/4/9"
#define BNX2X_BC_VER 0x040200

/* Time in jiffies before concluding the transmitter is hung. */
Expand Down Expand Up @@ -6153,7 +6153,7 @@ static int bnx2x_function_init(struct bnx2x *bp, int mode)
func, mode);
REG_WR(bp, GRCBASE_MISC + MISC_REGISTERS_RESET_REG_1_SET,
0xffffffff);
REG_WR(bp, GRCBASE_MISC + MISC_REGISTERS_RESET_REG_1_SET,
REG_WR(bp, GRCBASE_MISC + MISC_REGISTERS_RESET_REG_2_SET,
0xfffc);
bnx2x_init_block(bp, MISC_COMMON_START, MISC_COMMON_END);

Expand Down
3 changes: 2 additions & 1 deletion drivers/net/ehea/ehea.h
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@
#include <asm/io.h>

#define DRV_NAME "ehea"
#define DRV_VERSION "EHEA_0089"
#define DRV_VERSION "EHEA_0090"

/* eHEA capability flags */
#define DLPAR_PORT_ADD_REM 1
Expand Down Expand Up @@ -371,6 +371,7 @@ struct ehea_port_res {
struct ehea_q_skb_arr rq2_skba;
struct ehea_q_skb_arr rq3_skba;
struct ehea_q_skb_arr sq_skba;
int sq_skba_size;
spinlock_t netif_queue;
int queue_stopped;
int swqe_refill_th;
Expand Down
24 changes: 22 additions & 2 deletions drivers/net/ehea/ehea_main.c
Original file line number Diff line number Diff line change
Expand Up @@ -350,7 +350,8 @@ static void ehea_refill_rq1(struct ehea_port_res *pr, int index, int nr_of_wqes)
pr->rq1_skba.os_skbs = 0;

if (unlikely(test_bit(__EHEA_STOP_XFER, &ehea_driver_flags))) {
pr->rq1_skba.index = index;
if (nr_of_wqes > 0)
pr->rq1_skba.index = index;
pr->rq1_skba.os_skbs = fill_wqes;
return;
}
Expand Down Expand Up @@ -1465,7 +1466,9 @@ static int ehea_init_port_res(struct ehea_port *port, struct ehea_port_res *pr,
init_attr->act_nr_rwqes_rq2,
init_attr->act_nr_rwqes_rq3);

ret = ehea_init_q_skba(&pr->sq_skba, init_attr->act_nr_send_wqes + 1);
pr->sq_skba_size = init_attr->act_nr_send_wqes + 1;

ret = ehea_init_q_skba(&pr->sq_skba, pr->sq_skba_size);
ret |= ehea_init_q_skba(&pr->rq1_skba, init_attr->act_nr_rwqes_rq1 + 1);
ret |= ehea_init_q_skba(&pr->rq2_skba, init_attr->act_nr_rwqes_rq2 + 1);
ret |= ehea_init_q_skba(&pr->rq3_skba, init_attr->act_nr_rwqes_rq3 + 1);
Expand Down Expand Up @@ -2622,6 +2625,22 @@ void ehea_purge_sq(struct ehea_qp *orig_qp)
}
}

void ehea_flush_sq(struct ehea_port *port)
{
int i;

for (i = 0; i < port->num_def_qps + port->num_add_tx_qps; i++) {
struct ehea_port_res *pr = &port->port_res[i];
int swqe_max = pr->sq_skba_size - 2 - pr->swqe_ll_count;
int k = 0;
while (atomic_read(&pr->swqe_avail) < swqe_max) {
msleep(5);
if (++k == 20)
break;
}
}
}

int ehea_stop_qps(struct net_device *dev)
{
struct ehea_port *port = netdev_priv(dev);
Expand Down Expand Up @@ -2849,6 +2868,7 @@ static void ehea_rereg_mrs(struct work_struct *work)
if (dev->flags & IFF_UP) {
mutex_lock(&port->port_lock);
netif_stop_queue(dev);
ehea_flush_sq(port);
ret = ehea_stop_qps(dev);
if (ret) {
mutex_unlock(&port->port_lock);
Expand Down
31 changes: 26 additions & 5 deletions drivers/net/forcedeth.c
Original file line number Diff line number Diff line change
Expand Up @@ -2112,9 +2112,8 @@ static inline void nv_tx_flip_ownership(struct net_device *dev)

np->tx_pkts_in_progress--;
if (np->tx_change_owner) {
__le32 flaglen = le32_to_cpu(np->tx_change_owner->first_tx_desc->flaglen);
flaglen |= NV_TX2_VALID;
np->tx_change_owner->first_tx_desc->flaglen = cpu_to_le32(flaglen);
np->tx_change_owner->first_tx_desc->flaglen |=
cpu_to_le32(NV_TX2_VALID);
np->tx_pkts_in_progress++;

np->tx_change_owner = np->tx_change_owner->next_tx_ctx;
Expand Down Expand Up @@ -5319,15 +5318,30 @@ static int __devinit nv_probe(struct pci_dev *pci_dev, const struct pci_device_i

/* check the workaround bit for correct mac address order */
txreg = readl(base + NvRegTransmitPoll);
if ((txreg & NVREG_TRANSMITPOLL_MAC_ADDR_REV) ||
(id->driver_data & DEV_HAS_CORRECT_MACADDR)) {
if (id->driver_data & DEV_HAS_CORRECT_MACADDR) {
/* mac address is already in correct order */
dev->dev_addr[0] = (np->orig_mac[0] >> 0) & 0xff;
dev->dev_addr[1] = (np->orig_mac[0] >> 8) & 0xff;
dev->dev_addr[2] = (np->orig_mac[0] >> 16) & 0xff;
dev->dev_addr[3] = (np->orig_mac[0] >> 24) & 0xff;
dev->dev_addr[4] = (np->orig_mac[1] >> 0) & 0xff;
dev->dev_addr[5] = (np->orig_mac[1] >> 8) & 0xff;
} else if (txreg & NVREG_TRANSMITPOLL_MAC_ADDR_REV) {
/* mac address is already in correct order */
dev->dev_addr[0] = (np->orig_mac[0] >> 0) & 0xff;
dev->dev_addr[1] = (np->orig_mac[0] >> 8) & 0xff;
dev->dev_addr[2] = (np->orig_mac[0] >> 16) & 0xff;
dev->dev_addr[3] = (np->orig_mac[0] >> 24) & 0xff;
dev->dev_addr[4] = (np->orig_mac[1] >> 0) & 0xff;
dev->dev_addr[5] = (np->orig_mac[1] >> 8) & 0xff;
/*
* Set orig mac address back to the reversed version.
* This flag will be cleared during low power transition.
* Therefore, we should always put back the reversed address.
*/
np->orig_mac[0] = (dev->dev_addr[5] << 0) + (dev->dev_addr[4] << 8) +
(dev->dev_addr[3] << 16) + (dev->dev_addr[2] << 24);
np->orig_mac[1] = (dev->dev_addr[1] << 0) + (dev->dev_addr[0] << 8);
} else {
/* need to reverse mac address to correct order */
dev->dev_addr[0] = (np->orig_mac[1] >> 8) & 0xff;
Expand Down Expand Up @@ -5598,7 +5612,9 @@ static int nv_suspend(struct pci_dev *pdev, pm_message_t state)
static int nv_resume(struct pci_dev *pdev)
{
struct net_device *dev = pci_get_drvdata(pdev);
u8 __iomem *base = get_hwbase(dev);
int rc = 0;
u32 txreg;

if (!netif_running(dev))
goto out;
Expand All @@ -5609,6 +5625,11 @@ static int nv_resume(struct pci_dev *pdev)
pci_restore_state(pdev);
pci_enable_wake(pdev, PCI_D0, 0);

/* restore mac address reverse flag */
txreg = readl(base + NvRegTransmitPoll);
txreg |= NVREG_TRANSMITPOLL_MAC_ADDR_REV;
writel(txreg, base + NvRegTransmitPoll);

rc = nv_open(dev);
out:
return rc;
Expand Down
3 changes: 2 additions & 1 deletion drivers/net/fs_enet/fs_enet-main.c
Original file line number Diff line number Diff line change
Expand Up @@ -835,7 +835,8 @@ static int fs_enet_close(struct net_device *dev)

netif_stop_queue(dev);
netif_carrier_off(dev);
napi_disable(&fep->napi);
if (fep->fpi->use_napi)
napi_disable(&fep->napi);
phy_stop(fep->phydev);

spin_lock_irqsave(&fep->lock, flags);
Expand Down
14 changes: 8 additions & 6 deletions drivers/net/macb.c
Original file line number Diff line number Diff line change
Expand Up @@ -242,12 +242,12 @@ static int macb_mii_init(struct macb *bp)
/* Enable managment port */
macb_writel(bp, NCR, MACB_BIT(MPE));

bp->mii_bus.name = "MACB_mii_bus",
bp->mii_bus.read = &macb_mdio_read,
bp->mii_bus.write = &macb_mdio_write,
bp->mii_bus.reset = &macb_mdio_reset,
bp->mii_bus.id = bp->pdev->id,
bp->mii_bus.priv = bp,
bp->mii_bus.name = "MACB_mii_bus";
bp->mii_bus.read = &macb_mdio_read;
bp->mii_bus.write = &macb_mdio_write;
bp->mii_bus.reset = &macb_mdio_reset;
bp->mii_bus.id = bp->pdev->id;
bp->mii_bus.priv = bp;
bp->mii_bus.dev = &bp->dev->dev;
pdata = bp->pdev->dev.platform_data;

Expand Down Expand Up @@ -1257,6 +1257,8 @@ static int __exit macb_remove(struct platform_device *pdev)

if (dev) {
bp = netdev_priv(dev);
if (bp->phy_dev)
phy_disconnect(bp->phy_dev);
mdiobus_unregister(&bp->mii_bus);
kfree(bp->mii_bus.irq);
unregister_netdev(dev);
Expand Down
2 changes: 0 additions & 2 deletions drivers/net/phy/marvell.c
Original file line number Diff line number Diff line change
Expand Up @@ -211,8 +211,6 @@ static int m88e1111_config_init(struct phy_device *phydev)
}

if (phydev->interface == PHY_INTERFACE_MODE_SGMII) {
int temp;

temp = phy_read(phydev, MII_M1111_PHY_EXT_SR);
if (temp < 0)
return temp;
Expand Down
1 change: 1 addition & 0 deletions drivers/net/sc92031.c
Original file line number Diff line number Diff line change
Expand Up @@ -1446,6 +1446,7 @@ static int __devinit sc92031_probe(struct pci_dev *pdev,
}

pci_set_drvdata(pdev, dev);
SET_NETDEV_DEV(dev, &pdev->dev);

#if SC92031_USE_BAR == 0
dev->mem_start = pci_resource_start(pdev, SC92031_USE_BAR);
Expand Down
1 change: 1 addition & 0 deletions drivers/net/sky2.c
Original file line number Diff line number Diff line change
Expand Up @@ -154,6 +154,7 @@ static const char *yukon2_name[] = {
"EC", /* 0xb6 */
"FE", /* 0xb7 */
"FE+", /* 0xb8 */
"Supreme", /* 0xb9 */
};

static void sky2_set_multicast(struct net_device *dev);
Expand Down
2 changes: 2 additions & 0 deletions drivers/net/smc91x.c
Original file line number Diff line number Diff line change
Expand Up @@ -1326,9 +1326,11 @@ static irqreturn_t smc_interrupt(int irq, void *dev_id)
SMC_SET_INT_MASK(lp, mask);
spin_unlock(&lp->lock);

#ifndef CONFIG_NET_POLL_CONTROLLER
if (timeout == MAX_IRQ_LOOPS)
PRINTK("%s: spurious interrupt (mask = 0x%02x)\n",
dev->name, mask);
#endif
DBG(3, "%s: Interrupt done (%d loops)\n",
dev->name, MAX_IRQ_LOOPS - timeout);

Expand Down
11 changes: 5 additions & 6 deletions drivers/net/starfire.c
Original file line number Diff line number Diff line change
Expand Up @@ -1472,13 +1472,12 @@ static int __netdev_rx(struct net_device *dev, int *quota)
#ifndef final_version /* Remove after testing. */
/* You will want this info for the initial debug. */
if (debug > 5) {
DECLARE_MAC_BUF(mac);
DECLARE_MAC_BUF(mac2);

printk(KERN_DEBUG " Rx data %s %s"
printk(KERN_DEBUG " Rx data " MAC_FMT " " MAC_FMT
" %2.2x%2.2x.\n",
print_mac(mac, &skb->data[0]),
print_mac(mac2, &skb->data[6]),
skb->data[0], skb->data[1], skb->data[2],
skb->data[3], skb->data[4], skb->data[5],
skb->data[6], skb->data[7], skb->data[8],
skb->data[9], skb->data[10], skb->data[11],
skb->data[12], skb->data[13]);
}
#endif
Expand Down
Loading

0 comments on commit df39e8b

Please sign in to comment.