aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/ethernet
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2012-01-18 01:26:41 -0500
committerLinus Torvalds <torvalds@linux-foundation.org>2012-01-18 01:26:41 -0500
commitccb19d263fd1c9e34948e2158c53eacbff369344 (patch)
tree6683e55f183920dcbf3e1a5b749e7f9780c465b3 /drivers/net/ethernet
parent6a488979f574cb4287880db2dbc8b13cee30c5be (diff)
parentc3b5003b628d8e373262bee42c7260d6a799c73e (diff)
Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net
* git://git.kernel.org/pub/scm/linux/kernel/git/davem/net: (47 commits) tg3: Fix single-vector MSI-X code openvswitch: Fix multipart datapath dumps. ipv6: fix per device IP snmp counters inetpeer: initialize ->redirect_genid in inet_getpeer() net: fix NULL-deref in WARN() in skb_gso_segment() net: WARN if skb_checksum_help() is called on skb requiring segmentation caif: Remove bad WARN_ON in caif_dev caif: Fix typo in Vendor/Product-ID for CAIF modems bnx2x: Disable AN KR work-around for BCM57810 bnx2x: Remove AutoGrEEEn for BCM84833 bnx2x: Remove 100Mb force speed for BCM84833 bnx2x: Fix PFC setting on BCM57840 bnx2x: Fix Super-Isolate mode for BCM84833 net: fix some sparse errors net: kill duplicate included header net: sh-eth: Fix build error by the value which is not defined net: Use device model to get driver name in skb_gso_segment() bridge: BH already disabled in br_fdb_cleanup() net: move sock_update_memcg outside of CONFIG_INET mwl8k: Fixing Sparse ENDIAN CHECK warning ...
Diffstat (limited to 'drivers/net/ethernet')
-rw-r--r--drivers/net/ethernet/broadcom/bnx2x/bnx2x_ethtool.c7
-rw-r--r--drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c298
-rw-r--r--drivers/net/ethernet/broadcom/bnx2x/bnx2x_reg.h1
-rw-r--r--drivers/net/ethernet/broadcom/tg3.c27
-rw-r--r--drivers/net/ethernet/ibm/ehea/ehea_ethtool.c2
-rw-r--r--drivers/net/ethernet/ibm/ehea/ehea_main.c32
-rw-r--r--drivers/net/ethernet/ibm/ehea/ehea_qmr.c14
-rw-r--r--drivers/net/ethernet/renesas/sh_eth.c2
8 files changed, 214 insertions, 169 deletions
diff --git a/drivers/net/ethernet/broadcom/bnx2x/bnx2x_ethtool.c b/drivers/net/ethernet/broadcom/bnx2x/bnx2x_ethtool.c
index a688b9d975a..f99c6e312a5 100644
--- a/drivers/net/ethernet/broadcom/bnx2x/bnx2x_ethtool.c
+++ b/drivers/net/ethernet/broadcom/bnx2x/bnx2x_ethtool.c
@@ -365,13 +365,18 @@ static int bnx2x_set_settings(struct net_device *dev, struct ethtool_cmd *cmd)
365 DP(NETIF_MSG_LINK, "cfg_idx = %x\n", cfg_idx); 365 DP(NETIF_MSG_LINK, "cfg_idx = %x\n", cfg_idx);
366 366
367 if (cmd->autoneg == AUTONEG_ENABLE) { 367 if (cmd->autoneg == AUTONEG_ENABLE) {
368 u32 an_supported_speed = bp->port.supported[cfg_idx];
369 if (bp->link_params.phy[EXT_PHY1].type ==
370 PORT_HW_CFG_XGXS_EXT_PHY_TYPE_BCM84833)
371 an_supported_speed |= (SUPPORTED_100baseT_Half |
372 SUPPORTED_100baseT_Full);
368 if (!(bp->port.supported[cfg_idx] & SUPPORTED_Autoneg)) { 373 if (!(bp->port.supported[cfg_idx] & SUPPORTED_Autoneg)) {
369 DP(NETIF_MSG_LINK, "Autoneg not supported\n"); 374 DP(NETIF_MSG_LINK, "Autoneg not supported\n");
370 return -EINVAL; 375 return -EINVAL;
371 } 376 }
372 377
373 /* advertise the requested speed and duplex if supported */ 378 /* advertise the requested speed and duplex if supported */
374 if (cmd->advertising & ~(bp->port.supported[cfg_idx])) { 379 if (cmd->advertising & ~an_supported_speed) {
375 DP(NETIF_MSG_LINK, "Advertisement parameters " 380 DP(NETIF_MSG_LINK, "Advertisement parameters "
376 "are not supported\n"); 381 "are not supported\n");
377 return -EINVAL; 382 return -EINVAL;
diff --git a/drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c b/drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c
index 4df9505b67b..2091e5dbbcd 100644
--- a/drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c
+++ b/drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c
@@ -2502,7 +2502,7 @@ static void bnx2x_update_pfc_nig(struct link_params *params,
2502 struct bnx2x_nig_brb_pfc_port_params *nig_params) 2502 struct bnx2x_nig_brb_pfc_port_params *nig_params)
2503{ 2503{
2504 u32 xcm_mask = 0, ppp_enable = 0, pause_enable = 0, llfc_out_en = 0; 2504 u32 xcm_mask = 0, ppp_enable = 0, pause_enable = 0, llfc_out_en = 0;
2505 u32 llfc_enable = 0, xcm0_out_en = 0, p0_hwpfc_enable = 0; 2505 u32 llfc_enable = 0, xcm_out_en = 0, hwpfc_enable = 0;
2506 u32 pkt_priority_to_cos = 0; 2506 u32 pkt_priority_to_cos = 0;
2507 struct bnx2x *bp = params->bp; 2507 struct bnx2x *bp = params->bp;
2508 u8 port = params->port; 2508 u8 port = params->port;
@@ -2516,9 +2516,8 @@ static void bnx2x_update_pfc_nig(struct link_params *params,
2516 * MAC control frames (that are not pause packets) 2516 * MAC control frames (that are not pause packets)
2517 * will be forwarded to the XCM. 2517 * will be forwarded to the XCM.
2518 */ 2518 */
2519 xcm_mask = REG_RD(bp, 2519 xcm_mask = REG_RD(bp, port ? NIG_REG_LLH1_XCM_MASK :
2520 port ? NIG_REG_LLH1_XCM_MASK : 2520 NIG_REG_LLH0_XCM_MASK);
2521 NIG_REG_LLH0_XCM_MASK);
2522 /* 2521 /*
2523 * nig params will override non PFC params, since it's possible to 2522 * nig params will override non PFC params, since it's possible to
2524 * do transition from PFC to SAFC 2523 * do transition from PFC to SAFC
@@ -2533,8 +2532,8 @@ static void bnx2x_update_pfc_nig(struct link_params *params,
2533 ppp_enable = 1; 2532 ppp_enable = 1;
2534 xcm_mask &= ~(port ? NIG_LLH1_XCM_MASK_REG_LLH1_XCM_MASK_BCN : 2533 xcm_mask &= ~(port ? NIG_LLH1_XCM_MASK_REG_LLH1_XCM_MASK_BCN :
2535 NIG_LLH0_XCM_MASK_REG_LLH0_XCM_MASK_BCN); 2534 NIG_LLH0_XCM_MASK_REG_LLH0_XCM_MASK_BCN);
2536 xcm0_out_en = 0; 2535 xcm_out_en = 0;
2537 p0_hwpfc_enable = 1; 2536 hwpfc_enable = 1;
2538 } else { 2537 } else {
2539 if (nig_params) { 2538 if (nig_params) {
2540 llfc_out_en = nig_params->llfc_out_en; 2539 llfc_out_en = nig_params->llfc_out_en;
@@ -2545,7 +2544,7 @@ static void bnx2x_update_pfc_nig(struct link_params *params,
2545 2544
2546 xcm_mask |= (port ? NIG_LLH1_XCM_MASK_REG_LLH1_XCM_MASK_BCN : 2545 xcm_mask |= (port ? NIG_LLH1_XCM_MASK_REG_LLH1_XCM_MASK_BCN :
2547 NIG_LLH0_XCM_MASK_REG_LLH0_XCM_MASK_BCN); 2546 NIG_LLH0_XCM_MASK_REG_LLH0_XCM_MASK_BCN);
2548 xcm0_out_en = 1; 2547 xcm_out_en = 1;
2549 } 2548 }
2550 2549
2551 if (CHIP_IS_E3(bp)) 2550 if (CHIP_IS_E3(bp))
@@ -2564,13 +2563,16 @@ static void bnx2x_update_pfc_nig(struct link_params *params,
2564 REG_WR(bp, port ? NIG_REG_LLH1_XCM_MASK : 2563 REG_WR(bp, port ? NIG_REG_LLH1_XCM_MASK :
2565 NIG_REG_LLH0_XCM_MASK, xcm_mask); 2564 NIG_REG_LLH0_XCM_MASK, xcm_mask);
2566 2565
2567 REG_WR(bp, NIG_REG_LLFC_EGRESS_SRC_ENABLE_0, 0x7); 2566 REG_WR(bp, port ? NIG_REG_LLFC_EGRESS_SRC_ENABLE_1 :
2567 NIG_REG_LLFC_EGRESS_SRC_ENABLE_0, 0x7);
2568 2568
2569 /* output enable for RX_XCM # IF */ 2569 /* output enable for RX_XCM # IF */
2570 REG_WR(bp, NIG_REG_XCM0_OUT_EN, xcm0_out_en); 2570 REG_WR(bp, port ? NIG_REG_XCM1_OUT_EN :
2571 NIG_REG_XCM0_OUT_EN, xcm_out_en);
2571 2572
2572 /* HW PFC TX enable */ 2573 /* HW PFC TX enable */
2573 REG_WR(bp, NIG_REG_P0_HWPFC_ENABLE, p0_hwpfc_enable); 2574 REG_WR(bp, port ? NIG_REG_P1_HWPFC_ENABLE :
2575 NIG_REG_P0_HWPFC_ENABLE, hwpfc_enable);
2574 2576
2575 if (nig_params) { 2577 if (nig_params) {
2576 u8 i = 0; 2578 u8 i = 0;
@@ -3761,7 +3763,15 @@ static void bnx2x_warpcore_enable_AN_KR(struct bnx2x_phy *phy,
3761 /* Advertise pause */ 3763 /* Advertise pause */
3762 bnx2x_ext_phy_set_pause(params, phy, vars); 3764 bnx2x_ext_phy_set_pause(params, phy, vars);
3763 3765
3764 vars->rx_tx_asic_rst = MAX_KR_LINK_RETRY; 3766 /*
3767 * Set KR Autoneg Work-Around flag for Warpcore version older than D108
3768 */
3769 bnx2x_cl45_read(bp, phy, MDIO_WC_DEVAD,
3770 MDIO_WC_REG_UC_INFO_B1_VERSION, &val16);
3771 if (val16 < 0xd108) {
3772 DP(NETIF_MSG_LINK, "Enable AN KR work-around\n");
3773 vars->rx_tx_asic_rst = MAX_KR_LINK_RETRY;
3774 }
3765 3775
3766 bnx2x_cl45_read(bp, phy, MDIO_WC_DEVAD, 3776 bnx2x_cl45_read(bp, phy, MDIO_WC_DEVAD,
3767 MDIO_WC_REG_DIGITAL5_MISC7, &val16); 3777 MDIO_WC_REG_DIGITAL5_MISC7, &val16);
@@ -9266,62 +9276,68 @@ static void bnx2x_8727_link_reset(struct bnx2x_phy *phy,
9266/* BCM8481/BCM84823/BCM84833 PHY SECTION */ 9276/* BCM8481/BCM84823/BCM84833 PHY SECTION */
9267/******************************************************************/ 9277/******************************************************************/
9268static void bnx2x_save_848xx_spirom_version(struct bnx2x_phy *phy, 9278static void bnx2x_save_848xx_spirom_version(struct bnx2x_phy *phy,
9269 struct link_params *params) 9279 struct bnx2x *bp,
9280 u8 port)
9270{ 9281{
9271 u16 val, fw_ver1, fw_ver2, cnt; 9282 u16 val, fw_ver1, fw_ver2, cnt;
9272 u8 port;
9273 struct bnx2x *bp = params->bp;
9274 9283
9275 port = params->port; 9284 if (phy->type == PORT_HW_CFG_XGXS_EXT_PHY_TYPE_BCM84833) {
9285 bnx2x_cl45_read(bp, phy, MDIO_CTL_DEVAD, 0x400f, &fw_ver1);
9286 bnx2x_save_spirom_version(bp, port,
9287 ((fw_ver1 & 0xf000)>>5) | (fw_ver1 & 0x7f),
9288 phy->ver_addr);
9289 } else {
9290 /* For 32-bit registers in 848xx, access via MDIO2ARM i/f. */
9291 /* (1) set reg 0xc200_0014(SPI_BRIDGE_CTRL_2) to 0x03000000 */
9292 bnx2x_cl45_write(bp, phy, MDIO_PMA_DEVAD, 0xA819, 0x0014);
9293 bnx2x_cl45_write(bp, phy, MDIO_PMA_DEVAD, 0xA81A, 0xc200);
9294 bnx2x_cl45_write(bp, phy, MDIO_PMA_DEVAD, 0xA81B, 0x0000);
9295 bnx2x_cl45_write(bp, phy, MDIO_PMA_DEVAD, 0xA81C, 0x0300);
9296 bnx2x_cl45_write(bp, phy, MDIO_PMA_DEVAD, 0xA817, 0x0009);
9297
9298 for (cnt = 0; cnt < 100; cnt++) {
9299 bnx2x_cl45_read(bp, phy, MDIO_PMA_DEVAD, 0xA818, &val);
9300 if (val & 1)
9301 break;
9302 udelay(5);
9303 }
9304 if (cnt == 100) {
9305 DP(NETIF_MSG_LINK, "Unable to read 848xx "
9306 "phy fw version(1)\n");
9307 bnx2x_save_spirom_version(bp, port, 0,
9308 phy->ver_addr);
9309 return;
9310 }
9276 9311
9277 /* For the 32 bits registers in 848xx, access via MDIO2ARM interface.*/
9278 /* (1) set register 0xc200_0014(SPI_BRIDGE_CTRL_2) to 0x03000000 */
9279 bnx2x_cl45_write(bp, phy, MDIO_PMA_DEVAD, 0xA819, 0x0014);
9280 bnx2x_cl45_write(bp, phy, MDIO_PMA_DEVAD, 0xA81A, 0xc200);
9281 bnx2x_cl45_write(bp, phy, MDIO_PMA_DEVAD, 0xA81B, 0x0000);
9282 bnx2x_cl45_write(bp, phy, MDIO_PMA_DEVAD, 0xA81C, 0x0300);
9283 bnx2x_cl45_write(bp, phy, MDIO_PMA_DEVAD, 0xA817, 0x0009);
9284 9312
9285 for (cnt = 0; cnt < 100; cnt++) { 9313 /* 2) read register 0xc200_0000 (SPI_FW_STATUS) */
9286 bnx2x_cl45_read(bp, phy, MDIO_PMA_DEVAD, 0xA818, &val); 9314 bnx2x_cl45_write(bp, phy, MDIO_PMA_DEVAD, 0xA819, 0x0000);
9287 if (val & 1) 9315 bnx2x_cl45_write(bp, phy, MDIO_PMA_DEVAD, 0xA81A, 0xc200);
9288 break; 9316 bnx2x_cl45_write(bp, phy, MDIO_PMA_DEVAD, 0xA817, 0x000A);
9289 udelay(5); 9317 for (cnt = 0; cnt < 100; cnt++) {
9290 } 9318 bnx2x_cl45_read(bp, phy, MDIO_PMA_DEVAD, 0xA818, &val);
9291 if (cnt == 100) { 9319 if (val & 1)
9292 DP(NETIF_MSG_LINK, "Unable to read 848xx phy fw version(1)\n"); 9320 break;
9293 bnx2x_save_spirom_version(bp, port, 0, 9321 udelay(5);
9294 phy->ver_addr); 9322 }
9295 return; 9323 if (cnt == 100) {
9296 } 9324 DP(NETIF_MSG_LINK, "Unable to read 848xx phy fw "
9325 "version(2)\n");
9326 bnx2x_save_spirom_version(bp, port, 0,
9327 phy->ver_addr);
9328 return;
9329 }
9297 9330
9331 /* lower 16 bits of the register SPI_FW_STATUS */
9332 bnx2x_cl45_read(bp, phy, MDIO_PMA_DEVAD, 0xA81B, &fw_ver1);
9333 /* upper 16 bits of register SPI_FW_STATUS */
9334 bnx2x_cl45_read(bp, phy, MDIO_PMA_DEVAD, 0xA81C, &fw_ver2);
9298 9335
9299 /* 2) read register 0xc200_0000 (SPI_FW_STATUS) */ 9336 bnx2x_save_spirom_version(bp, port, (fw_ver2<<16) | fw_ver1,
9300 bnx2x_cl45_write(bp, phy, MDIO_PMA_DEVAD, 0xA819, 0x0000);
9301 bnx2x_cl45_write(bp, phy, MDIO_PMA_DEVAD, 0xA81A, 0xc200);
9302 bnx2x_cl45_write(bp, phy, MDIO_PMA_DEVAD, 0xA817, 0x000A);
9303 for (cnt = 0; cnt < 100; cnt++) {
9304 bnx2x_cl45_read(bp, phy, MDIO_PMA_DEVAD, 0xA818, &val);
9305 if (val & 1)
9306 break;
9307 udelay(5);
9308 }
9309 if (cnt == 100) {
9310 DP(NETIF_MSG_LINK, "Unable to read 848xx phy fw version(2)\n");
9311 bnx2x_save_spirom_version(bp, port, 0,
9312 phy->ver_addr); 9337 phy->ver_addr);
9313 return;
9314 } 9338 }
9315 9339
9316 /* lower 16 bits of the register SPI_FW_STATUS */
9317 bnx2x_cl45_read(bp, phy, MDIO_PMA_DEVAD, 0xA81B, &fw_ver1);
9318 /* upper 16 bits of register SPI_FW_STATUS */
9319 bnx2x_cl45_read(bp, phy, MDIO_PMA_DEVAD, 0xA81C, &fw_ver2);
9320
9321 bnx2x_save_spirom_version(bp, port, (fw_ver2<<16) | fw_ver1,
9322 phy->ver_addr);
9323} 9340}
9324
9325static void bnx2x_848xx_set_led(struct bnx2x *bp, 9341static void bnx2x_848xx_set_led(struct bnx2x *bp,
9326 struct bnx2x_phy *phy) 9342 struct bnx2x_phy *phy)
9327{ 9343{
@@ -9392,10 +9408,13 @@ static int bnx2x_848xx_cmn_config_init(struct bnx2x_phy *phy,
9392 u16 tmp_req_line_speed; 9408 u16 tmp_req_line_speed;
9393 9409
9394 tmp_req_line_speed = phy->req_line_speed; 9410 tmp_req_line_speed = phy->req_line_speed;
9395 if (phy->type == PORT_HW_CFG_XGXS_EXT_PHY_TYPE_BCM84833) 9411 if (phy->type == PORT_HW_CFG_XGXS_EXT_PHY_TYPE_BCM84833) {
9396 if (phy->req_line_speed == SPEED_10000) 9412 if (phy->req_line_speed == SPEED_10000)
9397 phy->req_line_speed = SPEED_AUTO_NEG; 9413 phy->req_line_speed = SPEED_AUTO_NEG;
9398 9414 } else {
9415 /* Save spirom version */
9416 bnx2x_save_848xx_spirom_version(phy, bp, params->port);
9417 }
9399 /* 9418 /*
9400 * This phy uses the NIG latch mechanism since link indication 9419 * This phy uses the NIG latch mechanism since link indication
9401 * arrives through its LED4 and not via its LASI signal, so we 9420 * arrives through its LED4 and not via its LASI signal, so we
@@ -9443,13 +9462,10 @@ static int bnx2x_848xx_cmn_config_init(struct bnx2x_phy *phy,
9443 an_1000_val); 9462 an_1000_val);
9444 9463
9445 /* set 100 speed advertisement */ 9464 /* set 100 speed advertisement */
9446 if (((phy->req_line_speed == SPEED_AUTO_NEG) && 9465 if ((phy->req_line_speed == SPEED_AUTO_NEG) &&
9447 (phy->speed_cap_mask & 9466 (phy->speed_cap_mask &
9448 (PORT_HW_CFG_SPEED_CAPABILITY_D0_100M_FULL | 9467 (PORT_HW_CFG_SPEED_CAPABILITY_D0_100M_FULL |
9449 PORT_HW_CFG_SPEED_CAPABILITY_D0_100M_HALF)) && 9468 PORT_HW_CFG_SPEED_CAPABILITY_D0_100M_HALF))) {
9450 (phy->supported &
9451 (SUPPORTED_100baseT_Half |
9452 SUPPORTED_100baseT_Full)))) {
9453 an_10_100_val |= (1<<7); 9469 an_10_100_val |= (1<<7);
9454 /* Enable autoneg and restart autoneg for legacy speeds */ 9470 /* Enable autoneg and restart autoneg for legacy speeds */
9455 autoneg_val |= (1<<9 | 1<<12); 9471 autoneg_val |= (1<<9 | 1<<12);
@@ -9539,9 +9555,6 @@ static int bnx2x_848xx_cmn_config_init(struct bnx2x_phy *phy,
9539 MDIO_AN_REG_8481_10GBASE_T_AN_CTRL, 9555 MDIO_AN_REG_8481_10GBASE_T_AN_CTRL,
9540 1); 9556 1);
9541 9557
9542 /* Save spirom version */
9543 bnx2x_save_848xx_spirom_version(phy, params);
9544
9545 phy->req_line_speed = tmp_req_line_speed; 9558 phy->req_line_speed = tmp_req_line_speed;
9546 9559
9547 return 0; 9560 return 0;
@@ -9749,17 +9762,7 @@ static int bnx2x_848x3_config_init(struct bnx2x_phy *phy,
9749 9762
9750 /* Wait for GPHY to come out of reset */ 9763 /* Wait for GPHY to come out of reset */
9751 msleep(50); 9764 msleep(50);
9752 if (phy->type == PORT_HW_CFG_XGXS_EXT_PHY_TYPE_BCM84833) { 9765 if (phy->type != PORT_HW_CFG_XGXS_EXT_PHY_TYPE_BCM84833) {
9753 /* Bring PHY out of super isolate mode */
9754 bnx2x_cl45_read(bp, phy,
9755 MDIO_CTL_DEVAD,
9756 MDIO_84833_TOP_CFG_XGPHY_STRAP1, &val);
9757 val &= ~MDIO_84833_SUPER_ISOLATE;
9758 bnx2x_cl45_write(bp, phy,
9759 MDIO_CTL_DEVAD,
9760 MDIO_84833_TOP_CFG_XGPHY_STRAP1, val);
9761 bnx2x_84833_pair_swap_cfg(phy, params, vars);
9762 } else {
9763 /* 9766 /*
9764 * BCM84823 requires that XGXS links up first @ 10G for normal 9767 * BCM84823 requires that XGXS links up first @ 10G for normal
9765 * behavior. 9768 * behavior.
@@ -9816,24 +9819,23 @@ static int bnx2x_848x3_config_init(struct bnx2x_phy *phy,
9816 DP(NETIF_MSG_LINK, "Multi_phy config = 0x%x, Media control = 0x%x\n", 9819 DP(NETIF_MSG_LINK, "Multi_phy config = 0x%x, Media control = 0x%x\n",
9817 params->multi_phy_config, val); 9820 params->multi_phy_config, val);
9818 9821
9819 /* AutogrEEEn */ 9822 if (phy->type == PORT_HW_CFG_XGXS_EXT_PHY_TYPE_BCM84833) {
9820 if (params->feature_config_flags & 9823 bnx2x_84833_pair_swap_cfg(phy, params, vars);
9821 FEATURE_CONFIG_AUTOGREEEN_ENABLED)
9822 cmd_args[0] = 0x2;
9823 else
9824 cmd_args[0] = 0x0;
9825 9824
9826 cmd_args[1] = 0x0; 9825 /* Keep AutogrEEEn disabled. */
9827 cmd_args[2] = PHY84833_CONSTANT_LATENCY + 1; 9826 cmd_args[0] = 0x0;
9828 cmd_args[3] = PHY84833_CONSTANT_LATENCY; 9827 cmd_args[1] = 0x0;
9829 rc = bnx2x_84833_cmd_hdlr(phy, params, 9828 cmd_args[2] = PHY84833_CONSTANT_LATENCY + 1;
9830 PHY84833_CMD_SET_EEE_MODE, cmd_args); 9829 cmd_args[3] = PHY84833_CONSTANT_LATENCY;
9831 if (rc != 0) 9830 rc = bnx2x_84833_cmd_hdlr(phy, params,
9832 DP(NETIF_MSG_LINK, "Cfg AutogrEEEn failed.\n"); 9831 PHY84833_CMD_SET_EEE_MODE, cmd_args);
9832 if (rc != 0)
9833 DP(NETIF_MSG_LINK, "Cfg AutogrEEEn failed.\n");
9834 }
9833 if (initialize) 9835 if (initialize)
9834 rc = bnx2x_848xx_cmn_config_init(phy, params, vars); 9836 rc = bnx2x_848xx_cmn_config_init(phy, params, vars);
9835 else 9837 else
9836 bnx2x_save_848xx_spirom_version(phy, params); 9838 bnx2x_save_848xx_spirom_version(phy, bp, params->port);
9837 /* 84833 PHY has a better feature and doesn't need to support this. */ 9839 /* 84833 PHY has a better feature and doesn't need to support this. */
9838 if (phy->type == PORT_HW_CFG_XGXS_EXT_PHY_TYPE_BCM84823) { 9840 if (phy->type == PORT_HW_CFG_XGXS_EXT_PHY_TYPE_BCM84823) {
9839 cms_enable = REG_RD(bp, params->shmem_base + 9841 cms_enable = REG_RD(bp, params->shmem_base +
@@ -9851,6 +9853,16 @@ static int bnx2x_848x3_config_init(struct bnx2x_phy *phy,
9851 MDIO_CTL_REG_84823_USER_CTRL_REG, val); 9853 MDIO_CTL_REG_84823_USER_CTRL_REG, val);
9852 } 9854 }
9853 9855
9856 if (phy->type == PORT_HW_CFG_XGXS_EXT_PHY_TYPE_BCM84833) {
9857 /* Bring PHY out of super isolate mode as the final step. */
9858 bnx2x_cl45_read(bp, phy,
9859 MDIO_CTL_DEVAD,
9860 MDIO_84833_TOP_CFG_XGPHY_STRAP1, &val);
9861 val &= ~MDIO_84833_SUPER_ISOLATE;
9862 bnx2x_cl45_write(bp, phy,
9863 MDIO_CTL_DEVAD,
9864 MDIO_84833_TOP_CFG_XGPHY_STRAP1, val);
9865 }
9854 return rc; 9866 return rc;
9855} 9867}
9856 9868
@@ -9988,10 +10000,11 @@ static void bnx2x_848x3_link_reset(struct bnx2x_phy *phy,
9988 } else { 10000 } else {
9989 bnx2x_cl45_read(bp, phy, 10001 bnx2x_cl45_read(bp, phy,
9990 MDIO_CTL_DEVAD, 10002 MDIO_CTL_DEVAD,
9991 0x400f, &val16); 10003 MDIO_84833_TOP_CFG_XGPHY_STRAP1, &val16);
10004 val16 |= MDIO_84833_SUPER_ISOLATE;
9992 bnx2x_cl45_write(bp, phy, 10005 bnx2x_cl45_write(bp, phy,
9993 MDIO_PMA_DEVAD, 10006 MDIO_CTL_DEVAD,
9994 MDIO_PMA_REG_CTRL, 0x800); 10007 MDIO_84833_TOP_CFG_XGPHY_STRAP1, val16);
9995 } 10008 }
9996} 10009}
9997 10010
@@ -11516,6 +11529,19 @@ static int bnx2x_populate_ext_phy(struct bnx2x *bp,
11516 } 11529 }
11517 phy->mdio_ctrl = bnx2x_get_emac_base(bp, mdc_mdio_access, port); 11530 phy->mdio_ctrl = bnx2x_get_emac_base(bp, mdc_mdio_access, port);
11518 11531
11532 if ((phy->type == PORT_HW_CFG_XGXS_EXT_PHY_TYPE_BCM84833) &&
11533 (phy->ver_addr)) {
11534 /*
11535 * Remove 100Mb link supported for BCM84833 when phy fw
11536 * version lower than or equal to 1.39
11537 */
11538 u32 raw_ver = REG_RD(bp, phy->ver_addr);
11539 if (((raw_ver & 0x7F) <= 39) &&
11540 (((raw_ver & 0xF80) >> 7) <= 1))
11541 phy->supported &= ~(SUPPORTED_100baseT_Half |
11542 SUPPORTED_100baseT_Full);
11543 }
11544
11519 /* 11545 /*
11520 * In case mdc/mdio_access of the external phy is different than the 11546 * In case mdc/mdio_access of the external phy is different than the
11521 * mdc/mdio access of the XGXS, a HW lock must be taken in each access 11547 * mdc/mdio access of the XGXS, a HW lock must be taken in each access
@@ -12333,55 +12359,69 @@ static int bnx2x_84833_common_init_phy(struct bnx2x *bp,
12333 u32 chip_id) 12359 u32 chip_id)
12334{ 12360{
12335 u8 reset_gpios; 12361 u8 reset_gpios;
12336 struct bnx2x_phy phy;
12337 u32 shmem_base, shmem2_base, cnt;
12338 s8 port = 0;
12339 u16 val;
12340
12341 reset_gpios = bnx2x_84833_get_reset_gpios(bp, shmem_base_path, chip_id); 12362 reset_gpios = bnx2x_84833_get_reset_gpios(bp, shmem_base_path, chip_id);
12342 bnx2x_set_mult_gpio(bp, reset_gpios, MISC_REGISTERS_GPIO_OUTPUT_LOW); 12363 bnx2x_set_mult_gpio(bp, reset_gpios, MISC_REGISTERS_GPIO_OUTPUT_LOW);
12343 udelay(10); 12364 udelay(10);
12344 bnx2x_set_mult_gpio(bp, reset_gpios, MISC_REGISTERS_GPIO_OUTPUT_HIGH); 12365 bnx2x_set_mult_gpio(bp, reset_gpios, MISC_REGISTERS_GPIO_OUTPUT_HIGH);
12345 DP(NETIF_MSG_LINK, "84833 reset pulse on pin values 0x%x\n", 12366 DP(NETIF_MSG_LINK, "84833 reset pulse on pin values 0x%x\n",
12346 reset_gpios); 12367 reset_gpios);
12347 for (port = PORT_MAX - 1; port >= PORT_0; port--) { 12368 return 0;
12348 /* This PHY is for E2 and E3. */ 12369}
12349 shmem_base = shmem_base_path[port];
12350 shmem2_base = shmem2_base_path[port];
12351 /* Extract the ext phy address for the port */
12352 if (bnx2x_populate_phy(bp, phy_index, shmem_base, shmem2_base,
12353 0, &phy) !=
12354 0) {
12355 DP(NETIF_MSG_LINK, "populate_phy failed\n");
12356 return -EINVAL;
12357 }
12358 12370
12359 /* Wait for FW completing its initialization. */ 12371static int bnx2x_84833_pre_init_phy(struct bnx2x *bp,
12360 for (cnt = 0; cnt < 1000; cnt++) { 12372 struct bnx2x_phy *phy)
12361 bnx2x_cl45_read(bp, &phy, 12373{
12374 u16 val, cnt;
12375 /* Wait for FW completing its initialization. */
12376 for (cnt = 0; cnt < 1500; cnt++) {
12377 bnx2x_cl45_read(bp, phy,
12362 MDIO_PMA_DEVAD, 12378 MDIO_PMA_DEVAD,
12363 MDIO_PMA_REG_CTRL, &val); 12379 MDIO_PMA_REG_CTRL, &val);
12364 if (!(val & (1<<15))) 12380 if (!(val & (1<<15)))
12365 break; 12381 break;
12366 msleep(1); 12382 msleep(1);
12367 } 12383 }
12368 if (cnt >= 1000) 12384 if (cnt >= 1500) {
12369 DP(NETIF_MSG_LINK, 12385 DP(NETIF_MSG_LINK, "84833 reset timeout\n");
12370 "84833 Cmn reset timeout (%d)\n", port); 12386 return -EINVAL;
12371
12372 /* Put the port in super isolate mode. */
12373 bnx2x_cl45_read(bp, &phy,
12374 MDIO_CTL_DEVAD,
12375 MDIO_84833_TOP_CFG_XGPHY_STRAP1, &val);
12376 val |= MDIO_84833_SUPER_ISOLATE;
12377 bnx2x_cl45_write(bp, &phy,
12378 MDIO_CTL_DEVAD,
12379 MDIO_84833_TOP_CFG_XGPHY_STRAP1, val);
12380 } 12387 }
12381 12388
12389 /* Put the port in super isolate mode. */
12390 bnx2x_cl45_read(bp, phy,
12391 MDIO_CTL_DEVAD,
12392 MDIO_84833_TOP_CFG_XGPHY_STRAP1, &val);
12393 val |= MDIO_84833_SUPER_ISOLATE;
12394 bnx2x_cl45_write(bp, phy,
12395 MDIO_CTL_DEVAD,
12396 MDIO_84833_TOP_CFG_XGPHY_STRAP1, val);
12397
12398 /* Save spirom version */
12399 bnx2x_save_848xx_spirom_version(phy, bp, PORT_0);
12382 return 0; 12400 return 0;
12383} 12401}
12384 12402
12403int bnx2x_pre_init_phy(struct bnx2x *bp,
12404 u32 shmem_base,
12405 u32 shmem2_base,
12406 u32 chip_id)
12407{
12408 int rc = 0;
12409 struct bnx2x_phy phy;
12410 bnx2x_set_mdio_clk(bp, chip_id, PORT_0);
12411 if (bnx2x_populate_phy(bp, EXT_PHY1, shmem_base, shmem2_base,
12412 PORT_0, &phy)) {
12413 DP(NETIF_MSG_LINK, "populate_phy failed\n");
12414 return -EINVAL;
12415 }
12416 switch (phy.type) {
12417 case PORT_HW_CFG_XGXS_EXT_PHY_TYPE_BCM84833:
12418 rc = bnx2x_84833_pre_init_phy(bp, &phy);
12419 break;
12420 default:
12421 break;
12422 }
12423 return rc;
12424}
12385 12425
12386static int bnx2x_ext_phy_common_init(struct bnx2x *bp, u32 shmem_base_path[], 12426static int bnx2x_ext_phy_common_init(struct bnx2x *bp, u32 shmem_base_path[],
12387 u32 shmem2_base_path[], u8 phy_index, 12427 u32 shmem2_base_path[], u8 phy_index,
diff --git a/drivers/net/ethernet/broadcom/bnx2x/bnx2x_reg.h b/drivers/net/ethernet/broadcom/bnx2x/bnx2x_reg.h
index 44609de4e5d..dddbcf6e154 100644
--- a/drivers/net/ethernet/broadcom/bnx2x/bnx2x_reg.h
+++ b/drivers/net/ethernet/broadcom/bnx2x/bnx2x_reg.h
@@ -2176,6 +2176,7 @@
2176 * set to 0x345678021. This is a new register (with 2_) added in E3 B0 to 2176 * set to 0x345678021. This is a new register (with 2_) added in E3 B0 to
2177 * accommodate the 9 input clients to ETS arbiter. */ 2177 * accommodate the 9 input clients to ETS arbiter. */
2178#define NIG_REG_P0_TX_ARB_PRIORITY_CLIENT2_MSB 0x18684 2178#define NIG_REG_P0_TX_ARB_PRIORITY_CLIENT2_MSB 0x18684
2179#define NIG_REG_P1_HWPFC_ENABLE 0x181d0
2179#define NIG_REG_P1_MAC_IN_EN 0x185c0 2180#define NIG_REG_P1_MAC_IN_EN 0x185c0
2180/* [RW 1] Output enable for TX MAC interface */ 2181/* [RW 1] Output enable for TX MAC interface */
2181#define NIG_REG_P1_MAC_OUT_EN 0x185c4 2182#define NIG_REG_P1_MAC_OUT_EN 0x185c4
diff --git a/drivers/net/ethernet/broadcom/tg3.c b/drivers/net/ethernet/broadcom/tg3.c
index 076e02a415a..d529af99157 100644
--- a/drivers/net/ethernet/broadcom/tg3.c
+++ b/drivers/net/ethernet/broadcom/tg3.c
@@ -8846,9 +8846,11 @@ static int tg3_reset_hw(struct tg3 *tp, int reset_phy)
8846 tw32_f(GRC_LOCAL_CTRL, tp->grc_local_ctrl); 8846 tw32_f(GRC_LOCAL_CTRL, tp->grc_local_ctrl);
8847 udelay(100); 8847 udelay(100);
8848 8848
8849 if (tg3_flag(tp, USING_MSIX) && tp->irq_cnt > 1) { 8849 if (tg3_flag(tp, USING_MSIX)) {
8850 val = tr32(MSGINT_MODE); 8850 val = tr32(MSGINT_MODE);
8851 val |= MSGINT_MODE_MULTIVEC_EN | MSGINT_MODE_ENABLE; 8851 val |= MSGINT_MODE_ENABLE;
8852 if (tp->irq_cnt > 1)
8853 val |= MSGINT_MODE_MULTIVEC_EN;
8852 if (!tg3_flag(tp, 1SHOT_MSI)) 8854 if (!tg3_flag(tp, 1SHOT_MSI))
8853 val |= MSGINT_MODE_ONE_SHOT_DISABLE; 8855 val |= MSGINT_MODE_ONE_SHOT_DISABLE;
8854 tw32(MSGINT_MODE, val); 8856 tw32(MSGINT_MODE, val);
@@ -9548,19 +9550,18 @@ static int tg3_request_firmware(struct tg3 *tp)
9548 9550
9549static bool tg3_enable_msix(struct tg3 *tp) 9551static bool tg3_enable_msix(struct tg3 *tp)
9550{ 9552{
9551 int i, rc, cpus = num_online_cpus(); 9553 int i, rc;
9552 struct msix_entry msix_ent[tp->irq_max]; 9554 struct msix_entry msix_ent[tp->irq_max];
9553 9555
9554 if (cpus == 1) 9556 tp->irq_cnt = num_online_cpus();
9555 /* Just fallback to the simpler MSI mode. */ 9557 if (tp->irq_cnt > 1) {
9556 return false; 9558 /* We want as many rx rings enabled as there are cpus.
9557 9559 * In multiqueue MSI-X mode, the first MSI-X vector
9558 /* 9560 * only deals with link interrupts, etc, so we add
9559 * We want as many rx rings enabled as there are cpus. 9561 * one to the number of vectors we are requesting.
9560 * The first MSIX vector only deals with link interrupts, etc, 9562 */
9561 * so we add one to the number of vectors we are requesting. 9563 tp->irq_cnt = min_t(unsigned, tp->irq_cnt + 1, tp->irq_max);
9562 */ 9564 }
9563 tp->irq_cnt = min_t(unsigned, cpus + 1, tp->irq_max);
9564 9565
9565 for (i = 0; i < tp->irq_max; i++) { 9566 for (i = 0; i < tp->irq_max; i++) {
9566 msix_ent[i].entry = i; 9567 msix_ent[i].entry = i;
diff --git a/drivers/net/ethernet/ibm/ehea/ehea_ethtool.c b/drivers/net/ethernet/ibm/ehea/ehea_ethtool.c
index 05b7359bde8..6bdd8e36e56 100644
--- a/drivers/net/ethernet/ibm/ehea/ehea_ethtool.c
+++ b/drivers/net/ethernet/ibm/ehea/ehea_ethtool.c
@@ -263,7 +263,7 @@ static void ehea_get_ethtool_stats(struct net_device *dev,
263 data[i++] = atomic_read(&port->port_res[k].swqe_avail); 263 data[i++] = atomic_read(&port->port_res[k].swqe_avail);
264} 264}
265 265
266const struct ethtool_ops ehea_ethtool_ops = { 266static const struct ethtool_ops ehea_ethtool_ops = {
267 .get_settings = ehea_get_settings, 267 .get_settings = ehea_get_settings,
268 .get_drvinfo = ehea_get_drvinfo, 268 .get_drvinfo = ehea_get_drvinfo,
269 .get_msglevel = ehea_get_msglevel, 269 .get_msglevel = ehea_get_msglevel,
diff --git a/drivers/net/ethernet/ibm/ehea/ehea_main.c b/drivers/net/ethernet/ibm/ehea/ehea_main.c
index 3554414eb5e..5d5fb262718 100644
--- a/drivers/net/ethernet/ibm/ehea/ehea_main.c
+++ b/drivers/net/ethernet/ibm/ehea/ehea_main.c
@@ -94,8 +94,8 @@ static int port_name_cnt;
94static LIST_HEAD(adapter_list); 94static LIST_HEAD(adapter_list);
95static unsigned long ehea_driver_flags; 95static unsigned long ehea_driver_flags;
96static DEFINE_MUTEX(dlpar_mem_lock); 96static DEFINE_MUTEX(dlpar_mem_lock);
97struct ehea_fw_handle_array ehea_fw_handles; 97static struct ehea_fw_handle_array ehea_fw_handles;
98struct ehea_bcmc_reg_array ehea_bcmc_regs; 98static struct ehea_bcmc_reg_array ehea_bcmc_regs;
99 99
100 100
101static int __devinit ehea_probe_adapter(struct platform_device *dev, 101static int __devinit ehea_probe_adapter(struct platform_device *dev,
@@ -133,7 +133,7 @@ void ehea_dump(void *adr, int len, char *msg)
133 } 133 }
134} 134}
135 135
136void ehea_schedule_port_reset(struct ehea_port *port) 136static void ehea_schedule_port_reset(struct ehea_port *port)
137{ 137{
138 if (!test_bit(__EHEA_DISABLE_PORT_RESET, &port->flags)) 138 if (!test_bit(__EHEA_DISABLE_PORT_RESET, &port->flags))
139 schedule_work(&port->reset_task); 139 schedule_work(&port->reset_task);
@@ -1404,7 +1404,7 @@ out:
1404 return ret; 1404 return ret;
1405} 1405}
1406 1406
1407int ehea_gen_smrs(struct ehea_port_res *pr) 1407static int ehea_gen_smrs(struct ehea_port_res *pr)
1408{ 1408{
1409 int ret; 1409 int ret;
1410 struct ehea_adapter *adapter = pr->port->adapter; 1410 struct ehea_adapter *adapter = pr->port->adapter;
@@ -1426,7 +1426,7 @@ out:
1426 return -EIO; 1426 return -EIO;
1427} 1427}
1428 1428
1429int ehea_rem_smrs(struct ehea_port_res *pr) 1429static int ehea_rem_smrs(struct ehea_port_res *pr)
1430{ 1430{
1431 if ((ehea_rem_mr(&pr->send_mr)) || 1431 if ((ehea_rem_mr(&pr->send_mr)) ||
1432 (ehea_rem_mr(&pr->recv_mr))) 1432 (ehea_rem_mr(&pr->recv_mr)))
@@ -2190,7 +2190,7 @@ out:
2190 return err; 2190 return err;
2191} 2191}
2192 2192
2193int ehea_activate_qp(struct ehea_adapter *adapter, struct ehea_qp *qp) 2193static int ehea_activate_qp(struct ehea_adapter *adapter, struct ehea_qp *qp)
2194{ 2194{
2195 int ret = -EIO; 2195 int ret = -EIO;
2196 u64 hret; 2196 u64 hret;
@@ -2531,7 +2531,7 @@ static void ehea_flush_sq(struct ehea_port *port)
2531 } 2531 }
2532} 2532}
2533 2533
2534int ehea_stop_qps(struct net_device *dev) 2534static int ehea_stop_qps(struct net_device *dev)
2535{ 2535{
2536 struct ehea_port *port = netdev_priv(dev); 2536 struct ehea_port *port = netdev_priv(dev);
2537 struct ehea_adapter *adapter = port->adapter; 2537 struct ehea_adapter *adapter = port->adapter;
@@ -2600,7 +2600,7 @@ out:
2600 return ret; 2600 return ret;
2601} 2601}
2602 2602
2603void ehea_update_rqs(struct ehea_qp *orig_qp, struct ehea_port_res *pr) 2603static void ehea_update_rqs(struct ehea_qp *orig_qp, struct ehea_port_res *pr)
2604{ 2604{
2605 struct ehea_qp qp = *orig_qp; 2605 struct ehea_qp qp = *orig_qp;
2606 struct ehea_qp_init_attr *init_attr = &qp.init_attr; 2606 struct ehea_qp_init_attr *init_attr = &qp.init_attr;
@@ -2633,7 +2633,7 @@ void ehea_update_rqs(struct ehea_qp *orig_qp, struct ehea_port_res *pr)
2633 } 2633 }
2634} 2634}
2635 2635
2636int ehea_restart_qps(struct net_device *dev) 2636static int ehea_restart_qps(struct net_device *dev)
2637{ 2637{
2638 struct ehea_port *port = netdev_priv(dev); 2638 struct ehea_port *port = netdev_priv(dev);
2639 struct ehea_adapter *adapter = port->adapter; 2639 struct ehea_adapter *adapter = port->adapter;
@@ -2824,7 +2824,7 @@ static void ehea_tx_watchdog(struct net_device *dev)
2824 ehea_schedule_port_reset(port); 2824 ehea_schedule_port_reset(port);
2825} 2825}
2826 2826
2827int ehea_sense_adapter_attr(struct ehea_adapter *adapter) 2827static int ehea_sense_adapter_attr(struct ehea_adapter *adapter)
2828{ 2828{
2829 struct hcp_query_ehea *cb; 2829 struct hcp_query_ehea *cb;
2830 u64 hret; 2830 u64 hret;
@@ -2852,7 +2852,7 @@ out:
2852 return ret; 2852 return ret;
2853} 2853}
2854 2854
2855int ehea_get_jumboframe_status(struct ehea_port *port, int *jumbo) 2855static int ehea_get_jumboframe_status(struct ehea_port *port, int *jumbo)
2856{ 2856{
2857 struct hcp_ehea_port_cb4 *cb4; 2857 struct hcp_ehea_port_cb4 *cb4;
2858 u64 hret; 2858 u64 hret;
@@ -2966,7 +2966,7 @@ static const struct net_device_ops ehea_netdev_ops = {
2966 .ndo_tx_timeout = ehea_tx_watchdog, 2966 .ndo_tx_timeout = ehea_tx_watchdog,
2967}; 2967};
2968 2968
2969struct ehea_port *ehea_setup_single_port(struct ehea_adapter *adapter, 2969static struct ehea_port *ehea_setup_single_port(struct ehea_adapter *adapter,
2970 u32 logical_port_id, 2970 u32 logical_port_id,
2971 struct device_node *dn) 2971 struct device_node *dn)
2972{ 2972{
@@ -3237,7 +3237,7 @@ static ssize_t ehea_remove_port(struct device *dev,
3237static DEVICE_ATTR(probe_port, S_IWUSR, NULL, ehea_probe_port); 3237static DEVICE_ATTR(probe_port, S_IWUSR, NULL, ehea_probe_port);
3238static DEVICE_ATTR(remove_port, S_IWUSR, NULL, ehea_remove_port); 3238static DEVICE_ATTR(remove_port, S_IWUSR, NULL, ehea_remove_port);
3239 3239
3240int ehea_create_device_sysfs(struct platform_device *dev) 3240static int ehea_create_device_sysfs(struct platform_device *dev)
3241{ 3241{
3242 int ret = device_create_file(&dev->dev, &dev_attr_probe_port); 3242 int ret = device_create_file(&dev->dev, &dev_attr_probe_port);
3243 if (ret) 3243 if (ret)
@@ -3248,7 +3248,7 @@ out:
3248 return ret; 3248 return ret;
3249} 3249}
3250 3250
3251void ehea_remove_device_sysfs(struct platform_device *dev) 3251static void ehea_remove_device_sysfs(struct platform_device *dev)
3252{ 3252{
3253 device_remove_file(&dev->dev, &dev_attr_probe_port); 3253 device_remove_file(&dev->dev, &dev_attr_probe_port);
3254 device_remove_file(&dev->dev, &dev_attr_remove_port); 3254 device_remove_file(&dev->dev, &dev_attr_remove_port);
@@ -3379,7 +3379,7 @@ static int __devexit ehea_remove(struct platform_device *dev)
3379 return 0; 3379 return 0;
3380} 3380}
3381 3381
3382void ehea_crash_handler(void) 3382static void ehea_crash_handler(void)
3383{ 3383{
3384 int i; 3384 int i;
3385 3385
@@ -3491,7 +3491,7 @@ static ssize_t ehea_show_capabilities(struct device_driver *drv,
3491static DRIVER_ATTR(capabilities, S_IRUSR | S_IRGRP | S_IROTH, 3491static DRIVER_ATTR(capabilities, S_IRUSR | S_IRGRP | S_IROTH,
3492 ehea_show_capabilities, NULL); 3492 ehea_show_capabilities, NULL);
3493 3493
3494int __init ehea_module_init(void) 3494static int __init ehea_module_init(void)
3495{ 3495{
3496 int ret; 3496 int ret;
3497 3497
diff --git a/drivers/net/ethernet/ibm/ehea/ehea_qmr.c b/drivers/net/ethernet/ibm/ehea/ehea_qmr.c
index 95b9f4fa811..c25b05b94da 100644
--- a/drivers/net/ethernet/ibm/ehea/ehea_qmr.c
+++ b/drivers/net/ethernet/ibm/ehea/ehea_qmr.c
@@ -34,9 +34,7 @@
34#include "ehea_phyp.h" 34#include "ehea_phyp.h"
35#include "ehea_qmr.h" 35#include "ehea_qmr.h"
36 36
37struct ehea_bmap *ehea_bmap = NULL; 37static struct ehea_bmap *ehea_bmap;
38
39
40 38
41static void *hw_qpageit_get_inc(struct hw_queue *queue) 39static void *hw_qpageit_get_inc(struct hw_queue *queue)
42{ 40{
@@ -212,7 +210,7 @@ out_nomem:
212 return NULL; 210 return NULL;
213} 211}
214 212
215u64 ehea_destroy_cq_res(struct ehea_cq *cq, u64 force) 213static u64 ehea_destroy_cq_res(struct ehea_cq *cq, u64 force)
216{ 214{
217 u64 hret; 215 u64 hret;
218 u64 adapter_handle = cq->adapter->handle; 216 u64 adapter_handle = cq->adapter->handle;
@@ -337,7 +335,7 @@ struct ehea_eqe *ehea_poll_eq(struct ehea_eq *eq)
337 return eqe; 335 return eqe;
338} 336}
339 337
340u64 ehea_destroy_eq_res(struct ehea_eq *eq, u64 force) 338static u64 ehea_destroy_eq_res(struct ehea_eq *eq, u64 force)
341{ 339{
342 u64 hret; 340 u64 hret;
343 unsigned long flags; 341 unsigned long flags;
@@ -381,7 +379,7 @@ int ehea_destroy_eq(struct ehea_eq *eq)
381/** 379/**
382 * allocates memory for a queue and registers pages in phyp 380 * allocates memory for a queue and registers pages in phyp
383 */ 381 */
384int ehea_qp_alloc_register(struct ehea_qp *qp, struct hw_queue *hw_queue, 382static int ehea_qp_alloc_register(struct ehea_qp *qp, struct hw_queue *hw_queue,
385 int nr_pages, int wqe_size, int act_nr_sges, 383 int nr_pages, int wqe_size, int act_nr_sges,
386 struct ehea_adapter *adapter, int h_call_q_selector) 384 struct ehea_adapter *adapter, int h_call_q_selector)
387{ 385{
@@ -516,7 +514,7 @@ out_freemem:
516 return NULL; 514 return NULL;
517} 515}
518 516
519u64 ehea_destroy_qp_res(struct ehea_qp *qp, u64 force) 517static u64 ehea_destroy_qp_res(struct ehea_qp *qp, u64 force)
520{ 518{
521 u64 hret; 519 u64 hret;
522 struct ehea_qp_init_attr *qp_attr = &qp->init_attr; 520 struct ehea_qp_init_attr *qp_attr = &qp->init_attr;
@@ -976,7 +974,7 @@ int ehea_gen_smr(struct ehea_adapter *adapter, struct ehea_mr *old_mr,
976 return 0; 974 return 0;
977} 975}
978 976
979void print_error_data(u64 *data) 977static void print_error_data(u64 *data)
980{ 978{
981 int length; 979 int length;
982 u64 type = EHEA_BMASK_GET(ERROR_DATA_TYPE, data[2]); 980 u64 type = EHEA_BMASK_GET(ERROR_DATA_TYPE, data[2]);
diff --git a/drivers/net/ethernet/renesas/sh_eth.c b/drivers/net/ethernet/renesas/sh_eth.c
index 6ece4295d78..813d41c4a84 100644
--- a/drivers/net/ethernet/renesas/sh_eth.c
+++ b/drivers/net/ethernet/renesas/sh_eth.c
@@ -1703,7 +1703,7 @@ static int sh_mdio_init(struct net_device *ndev, int id,
1703 mdp->mii_bus->name = "sh_mii"; 1703 mdp->mii_bus->name = "sh_mii";
1704 mdp->mii_bus->parent = &ndev->dev; 1704 mdp->mii_bus->parent = &ndev->dev;
1705 snprintf(mdp->mii_bus->id, MII_BUS_ID_SIZE, "%s-%x", 1705 snprintf(mdp->mii_bus->id, MII_BUS_ID_SIZE, "%s-%x",
1706 mdp->pdev->name, pdid); 1706 mdp->pdev->name, id);
1707 1707
1708 /* PHY IRQ */ 1708 /* PHY IRQ */
1709 mdp->mii_bus->irq = kmalloc(sizeof(int)*PHY_MAX_ADDR, GFP_KERNEL); 1709 mdp->mii_bus->irq = kmalloc(sizeof(int)*PHY_MAX_ADDR, GFP_KERNEL);