diff options
author | David S. Miller <davem@davemloft.net> | 2011-11-26 14:47:03 -0500 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2011-11-26 14:47:03 -0500 |
commit | 6dec4ac4ee1ad894dc0e9647cd3e180f93fc353c (patch) | |
tree | cd71e597bbbe677820bb229c6aedbad412758959 /drivers/net/ethernet | |
parent | d6f03f29f7cdf064289f941bf0b838348e996e65 (diff) | |
parent | fc0b927d9a5024e138c4318fe19a590f23e3eeec (diff) |
Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net
Conflicts:
net/ipv4/inet_diag.c
Diffstat (limited to 'drivers/net/ethernet')
-rw-r--r-- | drivers/net/ethernet/broadcom/b44.c | 2 | ||||
-rw-r--r-- | drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c | 39 | ||||
-rw-r--r-- | drivers/net/ethernet/broadcom/bnx2x/bnx2x_reg.h | 1 | ||||
-rw-r--r-- | drivers/net/ethernet/ibm/ehea/ehea.h | 4 | ||||
-rw-r--r-- | drivers/net/ethernet/ibm/ehea/ehea_main.c | 6 | ||||
-rw-r--r-- | drivers/net/ethernet/ibm/iseries_veth.c | 2 | ||||
-rw-r--r-- | drivers/net/ethernet/qlogic/qlge/qlge.h | 8 | ||||
-rw-r--r-- | drivers/net/ethernet/stmicro/stmmac/stmmac_main.c | 14 |
8 files changed, 59 insertions, 17 deletions
diff --git a/drivers/net/ethernet/broadcom/b44.c b/drivers/net/ethernet/broadcom/b44.c index 4cf835dbc122..3fb66d09ece5 100644 --- a/drivers/net/ethernet/broadcom/b44.c +++ b/drivers/net/ethernet/broadcom/b44.c | |||
@@ -608,7 +608,7 @@ static void b44_tx(struct b44 *bp) | |||
608 | skb->len, | 608 | skb->len, |
609 | DMA_TO_DEVICE); | 609 | DMA_TO_DEVICE); |
610 | rp->skb = NULL; | 610 | rp->skb = NULL; |
611 | dev_kfree_skb(skb); | 611 | dev_kfree_skb_irq(skb); |
612 | } | 612 | } |
613 | 613 | ||
614 | bp->tx_cons = cons; | 614 | bp->tx_cons = cons; |
diff --git a/drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c b/drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c index bce203fa4b9e..882f48f0a03c 100644 --- a/drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c +++ b/drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c | |||
@@ -10327,6 +10327,43 @@ static int bnx2x_54618se_config_init(struct bnx2x_phy *phy, | |||
10327 | return 0; | 10327 | return 0; |
10328 | } | 10328 | } |
10329 | 10329 | ||
10330 | |||
10331 | static void bnx2x_5461x_set_link_led(struct bnx2x_phy *phy, | ||
10332 | struct link_params *params, u8 mode) | ||
10333 | { | ||
10334 | struct bnx2x *bp = params->bp; | ||
10335 | u16 temp; | ||
10336 | |||
10337 | bnx2x_cl22_write(bp, phy, | ||
10338 | MDIO_REG_GPHY_SHADOW, | ||
10339 | MDIO_REG_GPHY_SHADOW_LED_SEL1); | ||
10340 | bnx2x_cl22_read(bp, phy, | ||
10341 | MDIO_REG_GPHY_SHADOW, | ||
10342 | &temp); | ||
10343 | temp &= 0xff00; | ||
10344 | |||
10345 | DP(NETIF_MSG_LINK, "54618x set link led (mode=%x)\n", mode); | ||
10346 | switch (mode) { | ||
10347 | case LED_MODE_FRONT_PANEL_OFF: | ||
10348 | case LED_MODE_OFF: | ||
10349 | temp |= 0x00ee; | ||
10350 | break; | ||
10351 | case LED_MODE_OPER: | ||
10352 | temp |= 0x0001; | ||
10353 | break; | ||
10354 | case LED_MODE_ON: | ||
10355 | temp |= 0x00ff; | ||
10356 | break; | ||
10357 | default: | ||
10358 | break; | ||
10359 | } | ||
10360 | bnx2x_cl22_write(bp, phy, | ||
10361 | MDIO_REG_GPHY_SHADOW, | ||
10362 | MDIO_REG_GPHY_SHADOW_WR_ENA | temp); | ||
10363 | return; | ||
10364 | } | ||
10365 | |||
10366 | |||
10330 | static void bnx2x_54618se_link_reset(struct bnx2x_phy *phy, | 10367 | static void bnx2x_54618se_link_reset(struct bnx2x_phy *phy, |
10331 | struct link_params *params) | 10368 | struct link_params *params) |
10332 | { | 10369 | { |
@@ -11103,7 +11140,7 @@ static struct bnx2x_phy phy_54618se = { | |||
11103 | .config_loopback = (config_loopback_t)bnx2x_54618se_config_loopback, | 11140 | .config_loopback = (config_loopback_t)bnx2x_54618se_config_loopback, |
11104 | .format_fw_ver = (format_fw_ver_t)NULL, | 11141 | .format_fw_ver = (format_fw_ver_t)NULL, |
11105 | .hw_reset = (hw_reset_t)NULL, | 11142 | .hw_reset = (hw_reset_t)NULL, |
11106 | .set_link_led = (set_link_led_t)NULL, | 11143 | .set_link_led = (set_link_led_t)bnx2x_5461x_set_link_led, |
11107 | .phy_specific_func = (phy_specific_func_t)NULL | 11144 | .phy_specific_func = (phy_specific_func_t)NULL |
11108 | }; | 11145 | }; |
11109 | /*****************************************************************/ | 11146 | /*****************************************************************/ |
diff --git a/drivers/net/ethernet/broadcom/bnx2x/bnx2x_reg.h b/drivers/net/ethernet/broadcom/bnx2x/bnx2x_reg.h index fc7bd0f23c0b..e58073ef33b4 100644 --- a/drivers/net/ethernet/broadcom/bnx2x/bnx2x_reg.h +++ b/drivers/net/ethernet/broadcom/bnx2x/bnx2x_reg.h | |||
@@ -6990,6 +6990,7 @@ Theotherbitsarereservedandshouldbezero*/ | |||
6990 | #define MDIO_REG_INTR_MASK 0x1b | 6990 | #define MDIO_REG_INTR_MASK 0x1b |
6991 | #define MDIO_REG_INTR_MASK_LINK_STATUS (0x1 << 1) | 6991 | #define MDIO_REG_INTR_MASK_LINK_STATUS (0x1 << 1) |
6992 | #define MDIO_REG_GPHY_SHADOW 0x1c | 6992 | #define MDIO_REG_GPHY_SHADOW 0x1c |
6993 | #define MDIO_REG_GPHY_SHADOW_LED_SEL1 (0x0d << 10) | ||
6993 | #define MDIO_REG_GPHY_SHADOW_LED_SEL2 (0x0e << 10) | 6994 | #define MDIO_REG_GPHY_SHADOW_LED_SEL2 (0x0e << 10) |
6994 | #define MDIO_REG_GPHY_SHADOW_WR_ENA (0x1 << 15) | 6995 | #define MDIO_REG_GPHY_SHADOW_WR_ENA (0x1 << 15) |
6995 | #define MDIO_REG_GPHY_SHADOW_AUTO_DET_MED (0x1e << 10) | 6996 | #define MDIO_REG_GPHY_SHADOW_AUTO_DET_MED (0x1e << 10) |
diff --git a/drivers/net/ethernet/ibm/ehea/ehea.h b/drivers/net/ethernet/ibm/ehea/ehea.h index 410d6a1984ed..6650068c996c 100644 --- a/drivers/net/ethernet/ibm/ehea/ehea.h +++ b/drivers/net/ethernet/ibm/ehea/ehea.h | |||
@@ -61,9 +61,9 @@ | |||
61 | #ifdef EHEA_SMALL_QUEUES | 61 | #ifdef EHEA_SMALL_QUEUES |
62 | #define EHEA_MAX_CQE_COUNT 1023 | 62 | #define EHEA_MAX_CQE_COUNT 1023 |
63 | #define EHEA_DEF_ENTRIES_SQ 1023 | 63 | #define EHEA_DEF_ENTRIES_SQ 1023 |
64 | #define EHEA_DEF_ENTRIES_RQ1 4095 | 64 | #define EHEA_DEF_ENTRIES_RQ1 1023 |
65 | #define EHEA_DEF_ENTRIES_RQ2 1023 | 65 | #define EHEA_DEF_ENTRIES_RQ2 1023 |
66 | #define EHEA_DEF_ENTRIES_RQ3 1023 | 66 | #define EHEA_DEF_ENTRIES_RQ3 511 |
67 | #else | 67 | #else |
68 | #define EHEA_MAX_CQE_COUNT 4080 | 68 | #define EHEA_MAX_CQE_COUNT 4080 |
69 | #define EHEA_DEF_ENTRIES_SQ 4080 | 69 | #define EHEA_DEF_ENTRIES_SQ 4080 |
diff --git a/drivers/net/ethernet/ibm/ehea/ehea_main.c b/drivers/net/ethernet/ibm/ehea/ehea_main.c index 37b70f7052b6..bfeccbfde236 100644 --- a/drivers/net/ethernet/ibm/ehea/ehea_main.c +++ b/drivers/net/ethernet/ibm/ehea/ehea_main.c | |||
@@ -371,7 +371,8 @@ static void ehea_update_stats(struct work_struct *work) | |||
371 | out_herr: | 371 | out_herr: |
372 | free_page((unsigned long)cb2); | 372 | free_page((unsigned long)cb2); |
373 | resched: | 373 | resched: |
374 | schedule_delayed_work(&port->stats_work, msecs_to_jiffies(1000)); | 374 | schedule_delayed_work(&port->stats_work, |
375 | round_jiffies_relative(msecs_to_jiffies(1000))); | ||
375 | } | 376 | } |
376 | 377 | ||
377 | static void ehea_refill_rq1(struct ehea_port_res *pr, int index, int nr_of_wqes) | 378 | static void ehea_refill_rq1(struct ehea_port_res *pr, int index, int nr_of_wqes) |
@@ -2434,7 +2435,8 @@ static int ehea_open(struct net_device *dev) | |||
2434 | } | 2435 | } |
2435 | 2436 | ||
2436 | mutex_unlock(&port->port_lock); | 2437 | mutex_unlock(&port->port_lock); |
2437 | schedule_delayed_work(&port->stats_work, msecs_to_jiffies(1000)); | 2438 | schedule_delayed_work(&port->stats_work, |
2439 | round_jiffies_relative(msecs_to_jiffies(1000))); | ||
2438 | 2440 | ||
2439 | return ret; | 2441 | return ret; |
2440 | } | 2442 | } |
diff --git a/drivers/net/ethernet/ibm/iseries_veth.c b/drivers/net/ethernet/ibm/iseries_veth.c index 4326681df382..acc31af6594a 100644 --- a/drivers/net/ethernet/ibm/iseries_veth.c +++ b/drivers/net/ethernet/ibm/iseries_veth.c | |||
@@ -1421,7 +1421,7 @@ static void veth_receive(struct veth_lpar_connection *cnx, | |||
1421 | 1421 | ||
1422 | /* FIXME: do we need this? */ | 1422 | /* FIXME: do we need this? */ |
1423 | memset(local_list, 0, sizeof(local_list)); | 1423 | memset(local_list, 0, sizeof(local_list)); |
1424 | memset(remote_list, 0, sizeof(VETH_MAX_FRAMES_PER_MSG)); | 1424 | memset(remote_list, 0, sizeof(remote_list)); |
1425 | 1425 | ||
1426 | /* a 0 address marks the end of the valid entries */ | 1426 | /* a 0 address marks the end of the valid entries */ |
1427 | if (senddata->addr[startchunk] == 0) | 1427 | if (senddata->addr[startchunk] == 0) |
diff --git a/drivers/net/ethernet/qlogic/qlge/qlge.h b/drivers/net/ethernet/qlogic/qlge/qlge.h index 8731f79c9efc..b8478aab050e 100644 --- a/drivers/net/ethernet/qlogic/qlge/qlge.h +++ b/drivers/net/ethernet/qlogic/qlge/qlge.h | |||
@@ -58,10 +58,8 @@ | |||
58 | 58 | ||
59 | 59 | ||
60 | #define TX_DESC_PER_IOCB 8 | 60 | #define TX_DESC_PER_IOCB 8 |
61 | /* The maximum number of frags we handle is based | 61 | |
62 | * on PAGE_SIZE... | 62 | #if ((MAX_SKB_FRAGS - TX_DESC_PER_IOCB) + 2) > 0 |
63 | */ | ||
64 | #if (PAGE_SHIFT == 12) || (PAGE_SHIFT == 13) /* 4k & 8k pages */ | ||
65 | #define TX_DESC_PER_OAL ((MAX_SKB_FRAGS - TX_DESC_PER_IOCB) + 2) | 63 | #define TX_DESC_PER_OAL ((MAX_SKB_FRAGS - TX_DESC_PER_IOCB) + 2) |
66 | #else /* all other page sizes */ | 64 | #else /* all other page sizes */ |
67 | #define TX_DESC_PER_OAL 0 | 65 | #define TX_DESC_PER_OAL 0 |
@@ -1353,7 +1351,7 @@ struct tx_ring_desc { | |||
1353 | struct ob_mac_iocb_req *queue_entry; | 1351 | struct ob_mac_iocb_req *queue_entry; |
1354 | u32 index; | 1352 | u32 index; |
1355 | struct oal oal; | 1353 | struct oal oal; |
1356 | struct map_list map[MAX_SKB_FRAGS + 1]; | 1354 | struct map_list map[MAX_SKB_FRAGS + 2]; |
1357 | int map_cnt; | 1355 | int map_cnt; |
1358 | struct tx_ring_desc *next; | 1356 | struct tx_ring_desc *next; |
1359 | }; | 1357 | }; |
diff --git a/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c b/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c index de71859bb295..20e8267e8e40 100644 --- a/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c +++ b/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c | |||
@@ -781,10 +781,15 @@ static void stmmac_mmc_setup(struct stmmac_priv *priv) | |||
781 | unsigned int mode = MMC_CNTRL_RESET_ON_READ | MMC_CNTRL_COUNTER_RESET | | 781 | unsigned int mode = MMC_CNTRL_RESET_ON_READ | MMC_CNTRL_COUNTER_RESET | |
782 | MMC_CNTRL_PRESET | MMC_CNTRL_FULL_HALF_PRESET; | 782 | MMC_CNTRL_PRESET | MMC_CNTRL_FULL_HALF_PRESET; |
783 | 783 | ||
784 | /* Do not manage MMC IRQ (FIXME) */ | 784 | /* Mask MMC irq, counters are managed in SW and registers |
785 | * are cleared on each READ eventually. */ | ||
785 | dwmac_mmc_intr_all_mask(priv->ioaddr); | 786 | dwmac_mmc_intr_all_mask(priv->ioaddr); |
786 | dwmac_mmc_ctrl(priv->ioaddr, mode); | 787 | |
787 | memset(&priv->mmc, 0, sizeof(struct stmmac_counters)); | 788 | if (priv->dma_cap.rmon) { |
789 | dwmac_mmc_ctrl(priv->ioaddr, mode); | ||
790 | memset(&priv->mmc, 0, sizeof(struct stmmac_counters)); | ||
791 | } else | ||
792 | pr_info(" No MAC Management Counters available"); | ||
788 | } | 793 | } |
789 | 794 | ||
790 | static u32 stmmac_get_synopsys_id(struct stmmac_priv *priv) | 795 | static u32 stmmac_get_synopsys_id(struct stmmac_priv *priv) |
@@ -1012,8 +1017,7 @@ static int stmmac_open(struct net_device *dev) | |||
1012 | memset(&priv->xstats, 0, sizeof(struct stmmac_extra_stats)); | 1017 | memset(&priv->xstats, 0, sizeof(struct stmmac_extra_stats)); |
1013 | priv->xstats.threshold = tc; | 1018 | priv->xstats.threshold = tc; |
1014 | 1019 | ||
1015 | if (priv->dma_cap.rmon) | 1020 | stmmac_mmc_setup(priv); |
1016 | stmmac_mmc_setup(priv); | ||
1017 | 1021 | ||
1018 | /* Start the ball rolling... */ | 1022 | /* Start the ball rolling... */ |
1019 | DBG(probe, DEBUG, "%s: DMA RX/TX processes started...\n", dev->name); | 1023 | DBG(probe, DEBUG, "%s: DMA RX/TX processes started...\n", dev->name); |