diff options
Diffstat (limited to 'drivers/net/ethernet/broadcom')
-rw-r--r-- | drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c | 12 | ||||
-rw-r--r-- | drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.h | 11 | ||||
-rw-r--r-- | drivers/net/ethernet/broadcom/bnx2x/bnx2x_dump.h | 25 | ||||
-rw-r--r-- | drivers/net/ethernet/broadcom/bnx2x/bnx2x_ethtool.c | 8 | ||||
-rw-r--r-- | drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c | 18 | ||||
-rw-r--r-- | drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c | 32 | ||||
-rw-r--r-- | drivers/net/ethernet/broadcom/bnx2x/bnx2x_stats.c | 15 |
7 files changed, 70 insertions, 51 deletions
diff --git a/drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c b/drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c index af20c6ee2cd9..e8e97a7d1d06 100644 --- a/drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c +++ b/drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c | |||
@@ -662,14 +662,16 @@ void bnx2x_csum_validate(struct sk_buff *skb, union eth_rx_cqe *cqe, | |||
662 | struct bnx2x_fastpath *fp, | 662 | struct bnx2x_fastpath *fp, |
663 | struct bnx2x_eth_q_stats *qstats) | 663 | struct bnx2x_eth_q_stats *qstats) |
664 | { | 664 | { |
665 | /* Do nothing if no IP/L4 csum validation was done */ | 665 | /* Do nothing if no L4 csum validation was done. |
666 | 666 | * We do not check whether IP csum was validated. For IPv4 we assume | |
667 | * that if the card got as far as validating the L4 csum, it also | ||
668 | * validated the IP csum. IPv6 has no IP csum. | ||
669 | */ | ||
667 | if (cqe->fast_path_cqe.status_flags & | 670 | if (cqe->fast_path_cqe.status_flags & |
668 | (ETH_FAST_PATH_RX_CQE_IP_XSUM_NO_VALIDATION_FLG | | 671 | ETH_FAST_PATH_RX_CQE_L4_XSUM_NO_VALIDATION_FLG) |
669 | ETH_FAST_PATH_RX_CQE_L4_XSUM_NO_VALIDATION_FLG)) | ||
670 | return; | 672 | return; |
671 | 673 | ||
672 | /* If both IP/L4 validation were done, check if an error was found. */ | 674 | /* If L4 validation was done, check if an error was found. */ |
673 | 675 | ||
674 | if (cqe->fast_path_cqe.type_error_flags & | 676 | if (cqe->fast_path_cqe.type_error_flags & |
675 | (ETH_FAST_PATH_RX_CQE_IP_BAD_XSUM_FLG | | 677 | (ETH_FAST_PATH_RX_CQE_IP_BAD_XSUM_FLG | |
diff --git a/drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.h b/drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.h index 21b553229ea4..dfd86a55f1dc 100644 --- a/drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.h +++ b/drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.h | |||
@@ -710,17 +710,15 @@ static inline u16 bnx2x_tx_avail(struct bnx2x *bp, | |||
710 | prod = txdata->tx_bd_prod; | 710 | prod = txdata->tx_bd_prod; |
711 | cons = txdata->tx_bd_cons; | 711 | cons = txdata->tx_bd_cons; |
712 | 712 | ||
713 | /* NUM_TX_RINGS = number of "next-page" entries | 713 | used = SUB_S16(prod, cons); |
714 | It will be used as a threshold */ | ||
715 | used = SUB_S16(prod, cons) + (s16)NUM_TX_RINGS; | ||
716 | 714 | ||
717 | #ifdef BNX2X_STOP_ON_ERROR | 715 | #ifdef BNX2X_STOP_ON_ERROR |
718 | WARN_ON(used < 0); | 716 | WARN_ON(used < 0); |
719 | WARN_ON(used > bp->tx_ring_size); | 717 | WARN_ON(used > txdata->tx_ring_size); |
720 | WARN_ON((bp->tx_ring_size - used) > MAX_TX_AVAIL); | 718 | WARN_ON((txdata->tx_ring_size - used) > MAX_TX_AVAIL); |
721 | #endif | 719 | #endif |
722 | 720 | ||
723 | return (s16)(bp->tx_ring_size) - used; | 721 | return (s16)(txdata->tx_ring_size) - used; |
724 | } | 722 | } |
725 | 723 | ||
726 | static inline int bnx2x_tx_queue_has_work(struct bnx2x_fp_txdata *txdata) | 724 | static inline int bnx2x_tx_queue_has_work(struct bnx2x_fp_txdata *txdata) |
@@ -1088,6 +1086,7 @@ static inline void bnx2x_init_txdata(struct bnx2x *bp, | |||
1088 | txdata->txq_index = txq_index; | 1086 | txdata->txq_index = txq_index; |
1089 | txdata->tx_cons_sb = tx_cons_sb; | 1087 | txdata->tx_cons_sb = tx_cons_sb; |
1090 | txdata->parent_fp = fp; | 1088 | txdata->parent_fp = fp; |
1089 | txdata->tx_ring_size = IS_FCOE_FP(fp) ? MAX_TX_AVAIL : bp->tx_ring_size; | ||
1091 | 1090 | ||
1092 | DP(NETIF_MSG_IFUP, "created tx data cid %d, txq %d\n", | 1091 | DP(NETIF_MSG_IFUP, "created tx data cid %d, txq %d\n", |
1093 | txdata->cid, txdata->txq_index); | 1092 | txdata->cid, txdata->txq_index); |
diff --git a/drivers/net/ethernet/broadcom/bnx2x/bnx2x_dump.h b/drivers/net/ethernet/broadcom/bnx2x/bnx2x_dump.h index 3e4cff9b1ebe..b926f58e983b 100644 --- a/drivers/net/ethernet/broadcom/bnx2x/bnx2x_dump.h +++ b/drivers/net/ethernet/broadcom/bnx2x/bnx2x_dump.h | |||
@@ -401,11 +401,11 @@ static const struct reg_addr reg_addrs[] = { | |||
401 | { 0x70000, 8, RI_ALL_ONLINE }, | 401 | { 0x70000, 8, RI_ALL_ONLINE }, |
402 | { 0x70020, 8184, RI_ALL_OFFLINE }, | 402 | { 0x70020, 8184, RI_ALL_OFFLINE }, |
403 | { 0x78000, 8192, RI_E3E3B0_OFFLINE }, | 403 | { 0x78000, 8192, RI_E3E3B0_OFFLINE }, |
404 | { 0x85000, 3, RI_ALL_ONLINE }, | 404 | { 0x85000, 3, RI_ALL_OFFLINE }, |
405 | { 0x8501c, 7, RI_ALL_ONLINE }, | 405 | { 0x8501c, 7, RI_ALL_OFFLINE }, |
406 | { 0x85048, 1, RI_ALL_ONLINE }, | 406 | { 0x85048, 1, RI_ALL_OFFLINE }, |
407 | { 0x85200, 32, RI_ALL_ONLINE }, | 407 | { 0x85200, 32, RI_ALL_OFFLINE }, |
408 | { 0xb0000, 16384, RI_E1H_ONLINE }, | 408 | { 0xb0000, 16384, RI_E1H_OFFLINE }, |
409 | { 0xc1000, 7, RI_ALL_ONLINE }, | 409 | { 0xc1000, 7, RI_ALL_ONLINE }, |
410 | { 0xc103c, 2, RI_E2E3E3B0_ONLINE }, | 410 | { 0xc103c, 2, RI_E2E3E3B0_ONLINE }, |
411 | { 0xc1800, 2, RI_ALL_ONLINE }, | 411 | { 0xc1800, 2, RI_ALL_ONLINE }, |
@@ -581,17 +581,12 @@ static const struct reg_addr reg_addrs[] = { | |||
581 | { 0x140188, 3, RI_E1E1HE2E3_ONLINE }, | 581 | { 0x140188, 3, RI_E1E1HE2E3_ONLINE }, |
582 | { 0x140194, 13, RI_ALL_ONLINE }, | 582 | { 0x140194, 13, RI_ALL_ONLINE }, |
583 | { 0x140200, 6, RI_E1E1HE2E3_ONLINE }, | 583 | { 0x140200, 6, RI_E1E1HE2E3_ONLINE }, |
584 | { 0x140220, 4, RI_E2E3_ONLINE }, | ||
585 | { 0x140240, 4, RI_E2E3_ONLINE }, | ||
586 | { 0x140260, 4, RI_E2E3_ONLINE }, | 584 | { 0x140260, 4, RI_E2E3_ONLINE }, |
587 | { 0x140280, 4, RI_E2E3_ONLINE }, | 585 | { 0x140280, 4, RI_E2E3_ONLINE }, |
588 | { 0x1402a0, 4, RI_E2E3_ONLINE }, | ||
589 | { 0x1402c0, 4, RI_E2E3_ONLINE }, | ||
590 | { 0x1402e0, 2, RI_E2E3_ONLINE }, | 586 | { 0x1402e0, 2, RI_E2E3_ONLINE }, |
591 | { 0x1402e8, 2, RI_E2E3E3B0_ONLINE }, | 587 | { 0x1402e8, 2, RI_E2E3E3B0_ONLINE }, |
592 | { 0x1402f0, 9, RI_E2E3_ONLINE }, | 588 | { 0x1402f0, 9, RI_E2E3_ONLINE }, |
593 | { 0x140314, 44, RI_E3B0_ONLINE }, | 589 | { 0x140314, 44, RI_E3B0_ONLINE }, |
594 | { 0x1403d0, 70, RI_E3B0_ONLINE }, | ||
595 | { 0x144000, 4, RI_E1E1H_ONLINE }, | 590 | { 0x144000, 4, RI_E1E1H_ONLINE }, |
596 | { 0x148000, 4, RI_E1E1H_ONLINE }, | 591 | { 0x148000, 4, RI_E1E1H_ONLINE }, |
597 | { 0x14c000, 4, RI_E1E1H_ONLINE }, | 592 | { 0x14c000, 4, RI_E1E1H_ONLINE }, |
@@ -704,7 +699,6 @@ static const struct reg_addr reg_addrs[] = { | |||
704 | { 0x180398, 1, RI_E2E3E3B0_ONLINE }, | 699 | { 0x180398, 1, RI_E2E3E3B0_ONLINE }, |
705 | { 0x1803a0, 5, RI_E2E3E3B0_ONLINE }, | 700 | { 0x1803a0, 5, RI_E2E3E3B0_ONLINE }, |
706 | { 0x1803b4, 2, RI_E3E3B0_ONLINE }, | 701 | { 0x1803b4, 2, RI_E3E3B0_ONLINE }, |
707 | { 0x180400, 1, RI_ALL_ONLINE }, | ||
708 | { 0x180404, 255, RI_E1E1H_OFFLINE }, | 702 | { 0x180404, 255, RI_E1E1H_OFFLINE }, |
709 | { 0x181000, 4, RI_ALL_ONLINE }, | 703 | { 0x181000, 4, RI_ALL_ONLINE }, |
710 | { 0x181010, 1020, RI_ALL_OFFLINE }, | 704 | { 0x181010, 1020, RI_ALL_OFFLINE }, |
@@ -800,9 +794,9 @@ static const struct reg_addr reg_addrs[] = { | |||
800 | { 0x1b905c, 1, RI_E3E3B0_ONLINE }, | 794 | { 0x1b905c, 1, RI_E3E3B0_ONLINE }, |
801 | { 0x1b9064, 1, RI_E3B0_ONLINE }, | 795 | { 0x1b9064, 1, RI_E3B0_ONLINE }, |
802 | { 0x1b9080, 10, RI_E3B0_ONLINE }, | 796 | { 0x1b9080, 10, RI_E3B0_ONLINE }, |
803 | { 0x1b9400, 14, RI_E2E3E3B0_ONLINE }, | 797 | { 0x1b9400, 14, RI_E2E3E3B0_OFFLINE }, |
804 | { 0x1b943c, 19, RI_E2E3E3B0_ONLINE }, | 798 | { 0x1b943c, 19, RI_E2E3E3B0_OFFLINE }, |
805 | { 0x1b9490, 10, RI_E2E3E3B0_ONLINE }, | 799 | { 0x1b9490, 10, RI_E2E3E3B0_OFFLINE }, |
806 | { 0x1c0000, 2, RI_ALL_ONLINE }, | 800 | { 0x1c0000, 2, RI_ALL_ONLINE }, |
807 | { 0x200000, 65, RI_ALL_ONLINE }, | 801 | { 0x200000, 65, RI_ALL_ONLINE }, |
808 | { 0x20014c, 2, RI_E1HE2E3E3B0_ONLINE }, | 802 | { 0x20014c, 2, RI_E1HE2E3E3B0_ONLINE }, |
@@ -814,7 +808,6 @@ static const struct reg_addr reg_addrs[] = { | |||
814 | { 0x200398, 1, RI_E2E3E3B0_ONLINE }, | 808 | { 0x200398, 1, RI_E2E3E3B0_ONLINE }, |
815 | { 0x2003a0, 1, RI_E2E3E3B0_ONLINE }, | 809 | { 0x2003a0, 1, RI_E2E3E3B0_ONLINE }, |
816 | { 0x2003a8, 2, RI_E2E3E3B0_ONLINE }, | 810 | { 0x2003a8, 2, RI_E2E3E3B0_ONLINE }, |
817 | { 0x200400, 1, RI_ALL_ONLINE }, | ||
818 | { 0x200404, 255, RI_E1E1H_OFFLINE }, | 811 | { 0x200404, 255, RI_E1E1H_OFFLINE }, |
819 | { 0x202000, 4, RI_ALL_ONLINE }, | 812 | { 0x202000, 4, RI_ALL_ONLINE }, |
820 | { 0x202010, 2044, RI_ALL_OFFLINE }, | 813 | { 0x202010, 2044, RI_ALL_OFFLINE }, |
@@ -921,7 +914,6 @@ static const struct reg_addr reg_addrs[] = { | |||
921 | { 0x280398, 1, RI_E2E3E3B0_ONLINE }, | 914 | { 0x280398, 1, RI_E2E3E3B0_ONLINE }, |
922 | { 0x2803a0, 1, RI_E2E3E3B0_ONLINE }, | 915 | { 0x2803a0, 1, RI_E2E3E3B0_ONLINE }, |
923 | { 0x2803a8, 2, RI_E2E3E3B0_ONLINE }, | 916 | { 0x2803a8, 2, RI_E2E3E3B0_ONLINE }, |
924 | { 0x280400, 1, RI_ALL_ONLINE }, | ||
925 | { 0x280404, 255, RI_E1E1H_OFFLINE }, | 917 | { 0x280404, 255, RI_E1E1H_OFFLINE }, |
926 | { 0x282000, 4, RI_ALL_ONLINE }, | 918 | { 0x282000, 4, RI_ALL_ONLINE }, |
927 | { 0x282010, 2044, RI_ALL_OFFLINE }, | 919 | { 0x282010, 2044, RI_ALL_OFFLINE }, |
@@ -1031,7 +1023,6 @@ static const struct reg_addr reg_addrs[] = { | |||
1031 | { 0x300398, 1, RI_E2E3E3B0_ONLINE }, | 1023 | { 0x300398, 1, RI_E2E3E3B0_ONLINE }, |
1032 | { 0x3003a0, 1, RI_E2E3E3B0_ONLINE }, | 1024 | { 0x3003a0, 1, RI_E2E3E3B0_ONLINE }, |
1033 | { 0x3003a8, 2, RI_E2E3E3B0_ONLINE }, | 1025 | { 0x3003a8, 2, RI_E2E3E3B0_ONLINE }, |
1034 | { 0x300400, 1, RI_ALL_ONLINE }, | ||
1035 | { 0x300404, 255, RI_E1E1H_OFFLINE }, | 1026 | { 0x300404, 255, RI_E1E1H_OFFLINE }, |
1036 | { 0x302000, 4, RI_ALL_ONLINE }, | 1027 | { 0x302000, 4, RI_ALL_ONLINE }, |
1037 | { 0x302010, 2044, RI_ALL_OFFLINE }, | 1028 | { 0x302010, 2044, RI_ALL_OFFLINE }, |
diff --git a/drivers/net/ethernet/broadcom/bnx2x/bnx2x_ethtool.c b/drivers/net/ethernet/broadcom/bnx2x/bnx2x_ethtool.c index c37a68d68090..ebf40cd7aa10 100644 --- a/drivers/net/ethernet/broadcom/bnx2x/bnx2x_ethtool.c +++ b/drivers/net/ethernet/broadcom/bnx2x/bnx2x_ethtool.c | |||
@@ -775,7 +775,7 @@ static void bnx2x_get_regs(struct net_device *dev, | |||
775 | struct bnx2x *bp = netdev_priv(dev); | 775 | struct bnx2x *bp = netdev_priv(dev); |
776 | struct dump_hdr dump_hdr = {0}; | 776 | struct dump_hdr dump_hdr = {0}; |
777 | 777 | ||
778 | regs->version = 0; | 778 | regs->version = 1; |
779 | memset(p, 0, regs->len); | 779 | memset(p, 0, regs->len); |
780 | 780 | ||
781 | if (!netif_running(bp->dev)) | 781 | if (!netif_running(bp->dev)) |
@@ -1587,6 +1587,12 @@ static int bnx2x_set_pauseparam(struct net_device *dev, | |||
1587 | bp->link_params.req_flow_ctrl[cfg_idx] = | 1587 | bp->link_params.req_flow_ctrl[cfg_idx] = |
1588 | BNX2X_FLOW_CTRL_AUTO; | 1588 | BNX2X_FLOW_CTRL_AUTO; |
1589 | } | 1589 | } |
1590 | bp->link_params.req_fc_auto_adv = BNX2X_FLOW_CTRL_NONE; | ||
1591 | if (epause->rx_pause) | ||
1592 | bp->link_params.req_fc_auto_adv |= BNX2X_FLOW_CTRL_RX; | ||
1593 | |||
1594 | if (epause->tx_pause) | ||
1595 | bp->link_params.req_fc_auto_adv |= BNX2X_FLOW_CTRL_TX; | ||
1590 | } | 1596 | } |
1591 | 1597 | ||
1592 | DP(BNX2X_MSG_ETHTOOL, | 1598 | DP(BNX2X_MSG_ETHTOOL, |
diff --git a/drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c b/drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c index f4beb46c4709..b046beb435b2 100644 --- a/drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c +++ b/drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c | |||
@@ -2667,9 +2667,11 @@ int bnx2x_update_pfc(struct link_params *params, | |||
2667 | return bnx2x_status; | 2667 | return bnx2x_status; |
2668 | 2668 | ||
2669 | DP(NETIF_MSG_LINK, "About to update PFC in BMAC\n"); | 2669 | DP(NETIF_MSG_LINK, "About to update PFC in BMAC\n"); |
2670 | if (CHIP_IS_E3(bp)) | 2670 | |
2671 | bnx2x_update_pfc_xmac(params, vars, 0); | 2671 | if (CHIP_IS_E3(bp)) { |
2672 | else { | 2672 | if (vars->mac_type == MAC_TYPE_XMAC) |
2673 | bnx2x_update_pfc_xmac(params, vars, 0); | ||
2674 | } else { | ||
2673 | val = REG_RD(bp, MISC_REG_RESET_REG_2); | 2675 | val = REG_RD(bp, MISC_REG_RESET_REG_2); |
2674 | if ((val & | 2676 | if ((val & |
2675 | (MISC_REGISTERS_RESET_REG_2_RST_BMAC0 << params->port)) | 2677 | (MISC_REGISTERS_RESET_REG_2_RST_BMAC0 << params->port)) |
@@ -5432,7 +5434,7 @@ static int bnx2x_get_link_speed_duplex(struct bnx2x_phy *phy, | |||
5432 | switch (speed_mask) { | 5434 | switch (speed_mask) { |
5433 | case GP_STATUS_10M: | 5435 | case GP_STATUS_10M: |
5434 | vars->line_speed = SPEED_10; | 5436 | vars->line_speed = SPEED_10; |
5435 | if (vars->duplex == DUPLEX_FULL) | 5437 | if (is_duplex == DUPLEX_FULL) |
5436 | vars->link_status |= LINK_10TFD; | 5438 | vars->link_status |= LINK_10TFD; |
5437 | else | 5439 | else |
5438 | vars->link_status |= LINK_10THD; | 5440 | vars->link_status |= LINK_10THD; |
@@ -5440,7 +5442,7 @@ static int bnx2x_get_link_speed_duplex(struct bnx2x_phy *phy, | |||
5440 | 5442 | ||
5441 | case GP_STATUS_100M: | 5443 | case GP_STATUS_100M: |
5442 | vars->line_speed = SPEED_100; | 5444 | vars->line_speed = SPEED_100; |
5443 | if (vars->duplex == DUPLEX_FULL) | 5445 | if (is_duplex == DUPLEX_FULL) |
5444 | vars->link_status |= LINK_100TXFD; | 5446 | vars->link_status |= LINK_100TXFD; |
5445 | else | 5447 | else |
5446 | vars->link_status |= LINK_100TXHD; | 5448 | vars->link_status |= LINK_100TXHD; |
@@ -5449,7 +5451,7 @@ static int bnx2x_get_link_speed_duplex(struct bnx2x_phy *phy, | |||
5449 | case GP_STATUS_1G: | 5451 | case GP_STATUS_1G: |
5450 | case GP_STATUS_1G_KX: | 5452 | case GP_STATUS_1G_KX: |
5451 | vars->line_speed = SPEED_1000; | 5453 | vars->line_speed = SPEED_1000; |
5452 | if (vars->duplex == DUPLEX_FULL) | 5454 | if (is_duplex == DUPLEX_FULL) |
5453 | vars->link_status |= LINK_1000TFD; | 5455 | vars->link_status |= LINK_1000TFD; |
5454 | else | 5456 | else |
5455 | vars->link_status |= LINK_1000THD; | 5457 | vars->link_status |= LINK_1000THD; |
@@ -5457,7 +5459,7 @@ static int bnx2x_get_link_speed_duplex(struct bnx2x_phy *phy, | |||
5457 | 5459 | ||
5458 | case GP_STATUS_2_5G: | 5460 | case GP_STATUS_2_5G: |
5459 | vars->line_speed = SPEED_2500; | 5461 | vars->line_speed = SPEED_2500; |
5460 | if (vars->duplex == DUPLEX_FULL) | 5462 | if (is_duplex == DUPLEX_FULL) |
5461 | vars->link_status |= LINK_2500TFD; | 5463 | vars->link_status |= LINK_2500TFD; |
5462 | else | 5464 | else |
5463 | vars->link_status |= LINK_2500THD; | 5465 | vars->link_status |= LINK_2500THD; |
@@ -5531,6 +5533,7 @@ static int bnx2x_link_settings_status(struct bnx2x_phy *phy, | |||
5531 | 5533 | ||
5532 | if (gp_status & MDIO_GP_STATUS_TOP_AN_STATUS1_LINK_STATUS) { | 5534 | if (gp_status & MDIO_GP_STATUS_TOP_AN_STATUS1_LINK_STATUS) { |
5533 | if (SINGLE_MEDIA_DIRECT(params)) { | 5535 | if (SINGLE_MEDIA_DIRECT(params)) { |
5536 | vars->duplex = duplex; | ||
5534 | bnx2x_flow_ctrl_resolve(phy, params, vars, gp_status); | 5537 | bnx2x_flow_ctrl_resolve(phy, params, vars, gp_status); |
5535 | if (phy->req_line_speed == SPEED_AUTO_NEG) | 5538 | if (phy->req_line_speed == SPEED_AUTO_NEG) |
5536 | bnx2x_xgxs_an_resolve(phy, params, vars, | 5539 | bnx2x_xgxs_an_resolve(phy, params, vars, |
@@ -5625,6 +5628,7 @@ static int bnx2x_warpcore_read_status(struct bnx2x_phy *phy, | |||
5625 | LINK_STATUS_PARALLEL_DETECTION_USED; | 5628 | LINK_STATUS_PARALLEL_DETECTION_USED; |
5626 | } | 5629 | } |
5627 | bnx2x_ext_phy_resolve_fc(phy, params, vars); | 5630 | bnx2x_ext_phy_resolve_fc(phy, params, vars); |
5631 | vars->duplex = duplex; | ||
5628 | } | 5632 | } |
5629 | } | 5633 | } |
5630 | 5634 | ||
diff --git a/drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c b/drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c index 21054987257a..0875ecfe3372 100644 --- a/drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c +++ b/drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c | |||
@@ -7561,8 +7561,14 @@ int bnx2x_set_mac_one(struct bnx2x *bp, u8 *mac, | |||
7561 | } | 7561 | } |
7562 | 7562 | ||
7563 | rc = bnx2x_config_vlan_mac(bp, &ramrod_param); | 7563 | rc = bnx2x_config_vlan_mac(bp, &ramrod_param); |
7564 | if (rc < 0) | 7564 | |
7565 | if (rc == -EEXIST) { | ||
7566 | DP(BNX2X_MSG_SP, "Failed to schedule ADD operations: %d\n", rc); | ||
7567 | /* do not treat adding same MAC as error */ | ||
7568 | rc = 0; | ||
7569 | } else if (rc < 0) | ||
7565 | BNX2X_ERR("%s MAC failed\n", (set ? "Set" : "Del")); | 7570 | BNX2X_ERR("%s MAC failed\n", (set ? "Set" : "Del")); |
7571 | |||
7566 | return rc; | 7572 | return rc; |
7567 | } | 7573 | } |
7568 | 7574 | ||
@@ -9825,12 +9831,13 @@ static void __devinit bnx2x_get_igu_cam_info(struct bnx2x *bp) | |||
9825 | } | 9831 | } |
9826 | 9832 | ||
9827 | #ifdef CONFIG_PCI_MSI | 9833 | #ifdef CONFIG_PCI_MSI |
9828 | /* | 9834 | /* Due to new PF resource allocation by MFW T7.4 and above, it's |
9829 | * It's expected that number of CAM entries for this functions is equal | 9835 | * optional that number of CAM entries will not be equal to the value |
9830 | * to the number evaluated based on the MSI-X table size. We want a | 9836 | * advertised in PCI. |
9831 | * harsh warning if these values are different! | 9837 | * Driver should use the minimal value of both as the actual status |
9838 | * block count | ||
9832 | */ | 9839 | */ |
9833 | WARN_ON(bp->igu_sb_cnt != igu_sb_cnt); | 9840 | bp->igu_sb_cnt = min_t(int, bp->igu_sb_cnt, igu_sb_cnt); |
9834 | #endif | 9841 | #endif |
9835 | 9842 | ||
9836 | if (igu_sb_cnt == 0) | 9843 | if (igu_sb_cnt == 0) |
@@ -10294,13 +10301,11 @@ static void __devinit bnx2x_get_fcoe_info(struct bnx2x *bp) | |||
10294 | dev_info.port_hw_config[port]. | 10301 | dev_info.port_hw_config[port]. |
10295 | fcoe_wwn_node_name_lower); | 10302 | fcoe_wwn_node_name_lower); |
10296 | } else if (!IS_MF_SD(bp)) { | 10303 | } else if (!IS_MF_SD(bp)) { |
10297 | u32 cfg = MF_CFG_RD(bp, func_ext_config[func].func_cfg); | ||
10298 | |||
10299 | /* | 10304 | /* |
10300 | * Read the WWN info only if the FCoE feature is enabled for | 10305 | * Read the WWN info only if the FCoE feature is enabled for |
10301 | * this function. | 10306 | * this function. |
10302 | */ | 10307 | */ |
10303 | if (cfg & MACP_FUNC_CFG_FLAGS_FCOE_OFFLOAD) | 10308 | if (BNX2X_MF_EXT_PROTOCOL_FCOE(bp) && !CHIP_IS_E1x(bp)) |
10304 | bnx2x_get_ext_wwn_info(bp, func); | 10309 | bnx2x_get_ext_wwn_info(bp, func); |
10305 | 10310 | ||
10306 | } else if (IS_MF_FCOE_SD(bp)) | 10311 | } else if (IS_MF_FCOE_SD(bp)) |
@@ -11073,7 +11078,14 @@ static int bnx2x_set_uc_list(struct bnx2x *bp) | |||
11073 | netdev_for_each_uc_addr(ha, dev) { | 11078 | netdev_for_each_uc_addr(ha, dev) { |
11074 | rc = bnx2x_set_mac_one(bp, bnx2x_uc_addr(ha), mac_obj, true, | 11079 | rc = bnx2x_set_mac_one(bp, bnx2x_uc_addr(ha), mac_obj, true, |
11075 | BNX2X_UC_LIST_MAC, &ramrod_flags); | 11080 | BNX2X_UC_LIST_MAC, &ramrod_flags); |
11076 | if (rc < 0) { | 11081 | if (rc == -EEXIST) { |
11082 | DP(BNX2X_MSG_SP, | ||
11083 | "Failed to schedule ADD operations: %d\n", rc); | ||
11084 | /* do not treat adding same MAC as error */ | ||
11085 | rc = 0; | ||
11086 | |||
11087 | } else if (rc < 0) { | ||
11088 | |||
11077 | BNX2X_ERR("Failed to schedule ADD operations: %d\n", | 11089 | BNX2X_ERR("Failed to schedule ADD operations: %d\n", |
11078 | rc); | 11090 | rc); |
11079 | return rc; | 11091 | return rc; |
diff --git a/drivers/net/ethernet/broadcom/bnx2x/bnx2x_stats.c b/drivers/net/ethernet/broadcom/bnx2x/bnx2x_stats.c index 332db64dd5be..a1d0446b39b3 100644 --- a/drivers/net/ethernet/broadcom/bnx2x/bnx2x_stats.c +++ b/drivers/net/ethernet/broadcom/bnx2x/bnx2x_stats.c | |||
@@ -101,6 +101,11 @@ static void bnx2x_hw_stats_post(struct bnx2x *bp) | |||
101 | if (CHIP_REV_IS_SLOW(bp)) | 101 | if (CHIP_REV_IS_SLOW(bp)) |
102 | return; | 102 | return; |
103 | 103 | ||
104 | /* Update MCP's statistics if possible */ | ||
105 | if (bp->func_stx) | ||
106 | memcpy(bnx2x_sp(bp, func_stats), &bp->func_stats, | ||
107 | sizeof(bp->func_stats)); | ||
108 | |||
104 | /* loader */ | 109 | /* loader */ |
105 | if (bp->executer_idx) { | 110 | if (bp->executer_idx) { |
106 | int loader_idx = PMF_DMAE_C(bp); | 111 | int loader_idx = PMF_DMAE_C(bp); |
@@ -128,8 +133,6 @@ static void bnx2x_hw_stats_post(struct bnx2x *bp) | |||
128 | 133 | ||
129 | } else if (bp->func_stx) { | 134 | } else if (bp->func_stx) { |
130 | *stats_comp = 0; | 135 | *stats_comp = 0; |
131 | memcpy(bnx2x_sp(bp, func_stats), &bp->func_stats, | ||
132 | sizeof(bp->func_stats)); | ||
133 | bnx2x_post_dmae(bp, dmae, INIT_DMAE_C(bp)); | 136 | bnx2x_post_dmae(bp, dmae, INIT_DMAE_C(bp)); |
134 | } | 137 | } |
135 | } | 138 | } |
@@ -1151,9 +1154,11 @@ static void bnx2x_stats_update(struct bnx2x *bp) | |||
1151 | if (bp->port.pmf) | 1154 | if (bp->port.pmf) |
1152 | bnx2x_hw_stats_update(bp); | 1155 | bnx2x_hw_stats_update(bp); |
1153 | 1156 | ||
1154 | if (bnx2x_storm_stats_update(bp) && (bp->stats_pending++ == 3)) { | 1157 | if (bnx2x_storm_stats_update(bp)) { |
1155 | BNX2X_ERR("storm stats were not updated for 3 times\n"); | 1158 | if (bp->stats_pending++ == 3) { |
1156 | bnx2x_panic(); | 1159 | BNX2X_ERR("storm stats were not updated for 3 times\n"); |
1160 | bnx2x_panic(); | ||
1161 | } | ||
1157 | return; | 1162 | return; |
1158 | } | 1163 | } |
1159 | 1164 | ||