diff options
Diffstat (limited to 'drivers/net/ethernet/broadcom/bnx2x')
| -rw-r--r-- | drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c | 2 | ||||
| -rw-r--r-- | drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.h | 12 | ||||
| -rw-r--r-- | drivers/net/ethernet/broadcom/bnx2x/bnx2x_dcb.c | 8 | ||||
| -rw-r--r-- | drivers/net/ethernet/broadcom/bnx2x/bnx2x_sp.c | 2 | ||||
| -rw-r--r-- | drivers/net/ethernet/broadcom/bnx2x/bnx2x_stats.c | 12 |
5 files changed, 16 insertions, 20 deletions
diff --git a/drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c b/drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c index 7aee46983be4..99389c8dda21 100644 --- a/drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c +++ b/drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c | |||
| @@ -1934,7 +1934,7 @@ int bnx2x_nic_load(struct bnx2x *bp, int load_mode) | |||
| 1934 | } | 1934 | } |
| 1935 | 1935 | ||
| 1936 | if (bp->port.pmf) | 1936 | if (bp->port.pmf) |
| 1937 | bnx2x_update_drv_flags(bp, DRV_FLAGS_DCB_CONFIGURED, 0); | 1937 | bnx2x_update_drv_flags(bp, 1 << DRV_FLAGS_DCB_CONFIGURED, 0); |
| 1938 | else | 1938 | else |
| 1939 | bnx2x__link_status_update(bp); | 1939 | bnx2x__link_status_update(bp); |
| 1940 | 1940 | ||
diff --git a/drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.h b/drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.h index bf27c54ff2e0..4f40f7d7d8c6 100644 --- a/drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.h +++ b/drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.h | |||
| @@ -1179,10 +1179,16 @@ static inline int bnx2x_alloc_rx_bds(struct bnx2x_fastpath *fp, | |||
| 1179 | */ | 1179 | */ |
| 1180 | static inline u8 bnx2x_stats_id(struct bnx2x_fastpath *fp) | 1180 | static inline u8 bnx2x_stats_id(struct bnx2x_fastpath *fp) |
| 1181 | { | 1181 | { |
| 1182 | if (!CHIP_IS_E1x(fp->bp)) | 1182 | struct bnx2x *bp = fp->bp; |
| 1183 | if (!CHIP_IS_E1x(bp)) { | ||
| 1184 | #ifdef BCM_CNIC | ||
| 1185 | /* there are special statistics counters for FCoE 136..140 */ | ||
| 1186 | if (IS_FCOE_FP(fp)) | ||
| 1187 | return bp->cnic_base_cl_id + (bp->pf_num >> 1); | ||
| 1188 | #endif | ||
| 1183 | return fp->cl_id; | 1189 | return fp->cl_id; |
| 1184 | else | 1190 | } |
| 1185 | return fp->cl_id + BP_PORT(fp->bp) * FP_SB_MAX_E1x; | 1191 | return fp->cl_id + BP_PORT(bp) * FP_SB_MAX_E1x; |
| 1186 | } | 1192 | } |
| 1187 | 1193 | ||
| 1188 | static inline void bnx2x_init_vlan_mac_fp_objs(struct bnx2x_fastpath *fp, | 1194 | static inline void bnx2x_init_vlan_mac_fp_objs(struct bnx2x_fastpath *fp, |
diff --git a/drivers/net/ethernet/broadcom/bnx2x/bnx2x_dcb.c b/drivers/net/ethernet/broadcom/bnx2x/bnx2x_dcb.c index 5051cf3deb20..6d82ade4c31c 100644 --- a/drivers/net/ethernet/broadcom/bnx2x/bnx2x_dcb.c +++ b/drivers/net/ethernet/broadcom/bnx2x/bnx2x_dcb.c | |||
| @@ -735,7 +735,9 @@ void bnx2x_dcbx_set_params(struct bnx2x *bp, u32 state) | |||
| 735 | bp->dcbx_error); | 735 | bp->dcbx_error); |
| 736 | 736 | ||
| 737 | /* mark DCBX result for PMF migration */ | 737 | /* mark DCBX result for PMF migration */ |
| 738 | bnx2x_update_drv_flags(bp, DRV_FLAGS_DCB_CONFIGURED, 1); | 738 | bnx2x_update_drv_flags(bp, |
| 739 | 1 << DRV_FLAGS_DCB_CONFIGURED, | ||
| 740 | 1); | ||
| 739 | #ifdef BCM_DCBNL | 741 | #ifdef BCM_DCBNL |
| 740 | /* | 742 | /* |
| 741 | * Add new app tlvs to dcbnl | 743 | * Add new app tlvs to dcbnl |
| @@ -1020,7 +1022,7 @@ void bnx2x_dcbx_init(struct bnx2x *bp) | |||
| 1020 | DP(NETIF_MSG_LINK, "dcbx_lldp_params_offset 0x%x\n", | 1022 | DP(NETIF_MSG_LINK, "dcbx_lldp_params_offset 0x%x\n", |
| 1021 | dcbx_lldp_params_offset); | 1023 | dcbx_lldp_params_offset); |
| 1022 | 1024 | ||
| 1023 | bnx2x_update_drv_flags(bp, DRV_FLAGS_DCB_CONFIGURED, 0); | 1025 | bnx2x_update_drv_flags(bp, 1 << DRV_FLAGS_DCB_CONFIGURED, 0); |
| 1024 | 1026 | ||
| 1025 | if (SHMEM_LLDP_DCBX_PARAMS_NONE != dcbx_lldp_params_offset) { | 1027 | if (SHMEM_LLDP_DCBX_PARAMS_NONE != dcbx_lldp_params_offset) { |
| 1026 | bnx2x_dcbx_admin_mib_updated_params(bp, | 1028 | bnx2x_dcbx_admin_mib_updated_params(bp, |
| @@ -1857,7 +1859,7 @@ void bnx2x_dcbx_pmf_update(struct bnx2x *bp) | |||
| 1857 | * read it from shmem and update bp and netdev accordingly | 1859 | * read it from shmem and update bp and netdev accordingly |
| 1858 | */ | 1860 | */ |
| 1859 | if (SHMEM2_HAS(bp, drv_flags) && | 1861 | if (SHMEM2_HAS(bp, drv_flags) && |
| 1860 | GET_FLAGS(SHMEM2_RD(bp, drv_flags), DRV_FLAGS_DCB_CONFIGURED)) { | 1862 | GET_FLAGS(SHMEM2_RD(bp, drv_flags), 1 << DRV_FLAGS_DCB_CONFIGURED)) { |
| 1861 | /* Read neg results if dcbx is in the FW */ | 1863 | /* Read neg results if dcbx is in the FW */ |
| 1862 | if (bnx2x_dcbx_read_shmem_neg_results(bp)) | 1864 | if (bnx2x_dcbx_read_shmem_neg_results(bp)) |
| 1863 | return; | 1865 | return; |
diff --git a/drivers/net/ethernet/broadcom/bnx2x/bnx2x_sp.c b/drivers/net/ethernet/broadcom/bnx2x/bnx2x_sp.c index cb6339c35571..94110e9ce51d 100644 --- a/drivers/net/ethernet/broadcom/bnx2x/bnx2x_sp.c +++ b/drivers/net/ethernet/broadcom/bnx2x/bnx2x_sp.c | |||
| @@ -5601,7 +5601,7 @@ static inline int bnx2x_func_send_start(struct bnx2x *bp, | |||
| 5601 | 5601 | ||
| 5602 | /* Fill the ramrod data with provided parameters */ | 5602 | /* Fill the ramrod data with provided parameters */ |
| 5603 | rdata->function_mode = cpu_to_le16(start_params->mf_mode); | 5603 | rdata->function_mode = cpu_to_le16(start_params->mf_mode); |
| 5604 | rdata->sd_vlan_tag = start_params->sd_vlan_tag; | 5604 | rdata->sd_vlan_tag = cpu_to_le16(start_params->sd_vlan_tag); |
| 5605 | rdata->path_id = BP_PATH(bp); | 5605 | rdata->path_id = BP_PATH(bp); |
| 5606 | rdata->network_cos_mode = start_params->network_cos_mode; | 5606 | rdata->network_cos_mode = start_params->network_cos_mode; |
| 5607 | 5607 | ||
diff --git a/drivers/net/ethernet/broadcom/bnx2x/bnx2x_stats.c b/drivers/net/ethernet/broadcom/bnx2x/bnx2x_stats.c index 1adef266fcd5..a766b25eec5f 100644 --- a/drivers/net/ethernet/broadcom/bnx2x/bnx2x_stats.c +++ b/drivers/net/ethernet/broadcom/bnx2x/bnx2x_stats.c | |||
| @@ -554,23 +554,11 @@ static void bnx2x_bmac_stats_update(struct bnx2x *bp) | |||
| 554 | UPDATE_STAT64(tx_stat_gtufl, tx_stat_mac_ufl); | 554 | UPDATE_STAT64(tx_stat_gtufl, tx_stat_mac_ufl); |
| 555 | 555 | ||
| 556 | /* collect PFC stats */ | 556 | /* collect PFC stats */ |
| 557 | DIFF_64(diff.hi, new->tx_stat_gtpp_hi, | ||
| 558 | pstats->pfc_frames_tx_hi, | ||
| 559 | diff.lo, new->tx_stat_gtpp_lo, | ||
| 560 | pstats->pfc_frames_tx_lo); | ||
| 561 | pstats->pfc_frames_tx_hi = new->tx_stat_gtpp_hi; | 557 | pstats->pfc_frames_tx_hi = new->tx_stat_gtpp_hi; |
| 562 | pstats->pfc_frames_tx_lo = new->tx_stat_gtpp_lo; | 558 | pstats->pfc_frames_tx_lo = new->tx_stat_gtpp_lo; |
| 563 | ADD_64(pstats->pfc_frames_tx_hi, diff.hi, | ||
| 564 | pstats->pfc_frames_tx_lo, diff.lo); | ||
| 565 | 559 | ||
| 566 | DIFF_64(diff.hi, new->rx_stat_grpp_hi, | ||
| 567 | pstats->pfc_frames_rx_hi, | ||
| 568 | diff.lo, new->rx_stat_grpp_lo, | ||
| 569 | pstats->pfc_frames_rx_lo); | ||
| 570 | pstats->pfc_frames_rx_hi = new->rx_stat_grpp_hi; | 560 | pstats->pfc_frames_rx_hi = new->rx_stat_grpp_hi; |
| 571 | pstats->pfc_frames_rx_lo = new->rx_stat_grpp_lo; | 561 | pstats->pfc_frames_rx_lo = new->rx_stat_grpp_lo; |
| 572 | ADD_64(pstats->pfc_frames_rx_hi, diff.hi, | ||
| 573 | pstats->pfc_frames_rx_lo, diff.lo); | ||
| 574 | } | 562 | } |
| 575 | 563 | ||
| 576 | estats->pause_frames_received_hi = | 564 | estats->pause_frames_received_hi = |
