Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net
This commit is contained in:
@@ -1992,7 +1992,7 @@ int bnx2x_nic_load(struct bnx2x *bp, int load_mode)
|
||||
}
|
||||
|
||||
if (bp->port.pmf)
|
||||
bnx2x_update_drv_flags(bp, DRV_FLAGS_DCB_CONFIGURED, 0);
|
||||
bnx2x_update_drv_flags(bp, 1 << DRV_FLAGS_DCB_CONFIGURED, 0);
|
||||
else
|
||||
bnx2x__link_status_update(bp);
|
||||
|
||||
|
@@ -1181,10 +1181,16 @@ static inline int bnx2x_alloc_rx_bds(struct bnx2x_fastpath *fp,
|
||||
*/
|
||||
static inline u8 bnx2x_stats_id(struct bnx2x_fastpath *fp)
|
||||
{
|
||||
if (!CHIP_IS_E1x(fp->bp))
|
||||
struct bnx2x *bp = fp->bp;
|
||||
if (!CHIP_IS_E1x(bp)) {
|
||||
#ifdef BCM_CNIC
|
||||
/* there are special statistics counters for FCoE 136..140 */
|
||||
if (IS_FCOE_FP(fp))
|
||||
return bp->cnic_base_cl_id + (bp->pf_num >> 1);
|
||||
#endif
|
||||
return fp->cl_id;
|
||||
else
|
||||
return fp->cl_id + BP_PORT(fp->bp) * FP_SB_MAX_E1x;
|
||||
}
|
||||
return fp->cl_id + BP_PORT(bp) * FP_SB_MAX_E1x;
|
||||
}
|
||||
|
||||
static inline void bnx2x_init_vlan_mac_fp_objs(struct bnx2x_fastpath *fp,
|
||||
|
@@ -735,7 +735,9 @@ void bnx2x_dcbx_set_params(struct bnx2x *bp, u32 state)
|
||||
bp->dcbx_error);
|
||||
|
||||
/* mark DCBX result for PMF migration */
|
||||
bnx2x_update_drv_flags(bp, DRV_FLAGS_DCB_CONFIGURED, 1);
|
||||
bnx2x_update_drv_flags(bp,
|
||||
1 << DRV_FLAGS_DCB_CONFIGURED,
|
||||
1);
|
||||
#ifdef BCM_DCBNL
|
||||
/*
|
||||
* Add new app tlvs to dcbnl
|
||||
@@ -1020,7 +1022,7 @@ void bnx2x_dcbx_init(struct bnx2x *bp)
|
||||
DP(NETIF_MSG_LINK, "dcbx_lldp_params_offset 0x%x\n",
|
||||
dcbx_lldp_params_offset);
|
||||
|
||||
bnx2x_update_drv_flags(bp, DRV_FLAGS_DCB_CONFIGURED, 0);
|
||||
bnx2x_update_drv_flags(bp, 1 << DRV_FLAGS_DCB_CONFIGURED, 0);
|
||||
|
||||
if (SHMEM_LLDP_DCBX_PARAMS_NONE != dcbx_lldp_params_offset) {
|
||||
bnx2x_dcbx_admin_mib_updated_params(bp,
|
||||
@@ -1857,7 +1859,7 @@ void bnx2x_dcbx_pmf_update(struct bnx2x *bp)
|
||||
* read it from shmem and update bp and netdev accordingly
|
||||
*/
|
||||
if (SHMEM2_HAS(bp, drv_flags) &&
|
||||
GET_FLAGS(SHMEM2_RD(bp, drv_flags), DRV_FLAGS_DCB_CONFIGURED)) {
|
||||
GET_FLAGS(SHMEM2_RD(bp, drv_flags), 1 << DRV_FLAGS_DCB_CONFIGURED)) {
|
||||
/* Read neg results if dcbx is in the FW */
|
||||
if (bnx2x_dcbx_read_shmem_neg_results(bp))
|
||||
return;
|
||||
|
@@ -10907,38 +10907,36 @@ do { \
|
||||
|
||||
int bnx2x_init_firmware(struct bnx2x *bp)
|
||||
{
|
||||
const char *fw_file_name;
|
||||
struct bnx2x_fw_file_hdr *fw_hdr;
|
||||
int rc;
|
||||
|
||||
if (bp->firmware)
|
||||
return 0;
|
||||
|
||||
if (!bp->firmware) {
|
||||
const char *fw_file_name;
|
||||
if (CHIP_IS_E1(bp))
|
||||
fw_file_name = FW_FILE_NAME_E1;
|
||||
else if (CHIP_IS_E1H(bp))
|
||||
fw_file_name = FW_FILE_NAME_E1H;
|
||||
else if (!CHIP_IS_E1x(bp))
|
||||
fw_file_name = FW_FILE_NAME_E2;
|
||||
else {
|
||||
BNX2X_ERR("Unsupported chip revision\n");
|
||||
return -EINVAL;
|
||||
}
|
||||
BNX2X_DEV_INFO("Loading %s\n", fw_file_name);
|
||||
|
||||
if (CHIP_IS_E1(bp))
|
||||
fw_file_name = FW_FILE_NAME_E1;
|
||||
else if (CHIP_IS_E1H(bp))
|
||||
fw_file_name = FW_FILE_NAME_E1H;
|
||||
else if (!CHIP_IS_E1x(bp))
|
||||
fw_file_name = FW_FILE_NAME_E2;
|
||||
else {
|
||||
BNX2X_ERR("Unsupported chip revision\n");
|
||||
return -EINVAL;
|
||||
}
|
||||
BNX2X_DEV_INFO("Loading %s\n", fw_file_name);
|
||||
rc = request_firmware(&bp->firmware, fw_file_name, &bp->pdev->dev);
|
||||
if (rc) {
|
||||
BNX2X_ERR("Can't load firmware file %s\n",
|
||||
fw_file_name);
|
||||
goto request_firmware_exit;
|
||||
}
|
||||
|
||||
rc = request_firmware(&bp->firmware, fw_file_name,
|
||||
&bp->pdev->dev);
|
||||
if (rc) {
|
||||
BNX2X_ERR("Can't load firmware file %s\n",
|
||||
fw_file_name);
|
||||
goto request_firmware_exit;
|
||||
}
|
||||
|
||||
rc = bnx2x_check_firmware(bp);
|
||||
if (rc) {
|
||||
BNX2X_ERR("Corrupt firmware file %s\n", fw_file_name);
|
||||
goto request_firmware_exit;
|
||||
}
|
||||
rc = bnx2x_check_firmware(bp);
|
||||
if (rc) {
|
||||
BNX2X_ERR("Corrupt firmware file %s\n", fw_file_name);
|
||||
goto request_firmware_exit;
|
||||
}
|
||||
|
||||
fw_hdr = (struct bnx2x_fw_file_hdr *)bp->firmware->data;
|
||||
@@ -10984,6 +10982,7 @@ init_ops_alloc_err:
|
||||
kfree(bp->init_data);
|
||||
request_firmware_exit:
|
||||
release_firmware(bp->firmware);
|
||||
bp->firmware = NULL;
|
||||
|
||||
return rc;
|
||||
}
|
||||
|
@@ -5591,7 +5591,7 @@ static inline int bnx2x_func_send_start(struct bnx2x *bp,
|
||||
|
||||
/* Fill the ramrod data with provided parameters */
|
||||
rdata->function_mode = cpu_to_le16(start_params->mf_mode);
|
||||
rdata->sd_vlan_tag = start_params->sd_vlan_tag;
|
||||
rdata->sd_vlan_tag = cpu_to_le16(start_params->sd_vlan_tag);
|
||||
rdata->path_id = BP_PATH(bp);
|
||||
rdata->network_cos_mode = start_params->network_cos_mode;
|
||||
|
||||
|
@@ -554,23 +554,11 @@ static void bnx2x_bmac_stats_update(struct bnx2x *bp)
|
||||
UPDATE_STAT64(tx_stat_gtufl, tx_stat_mac_ufl);
|
||||
|
||||
/* collect PFC stats */
|
||||
DIFF_64(diff.hi, new->tx_stat_gtpp_hi,
|
||||
pstats->pfc_frames_tx_hi,
|
||||
diff.lo, new->tx_stat_gtpp_lo,
|
||||
pstats->pfc_frames_tx_lo);
|
||||
pstats->pfc_frames_tx_hi = new->tx_stat_gtpp_hi;
|
||||
pstats->pfc_frames_tx_lo = new->tx_stat_gtpp_lo;
|
||||
ADD_64(pstats->pfc_frames_tx_hi, diff.hi,
|
||||
pstats->pfc_frames_tx_lo, diff.lo);
|
||||
|
||||
DIFF_64(diff.hi, new->rx_stat_grpp_hi,
|
||||
pstats->pfc_frames_rx_hi,
|
||||
diff.lo, new->rx_stat_grpp_lo,
|
||||
pstats->pfc_frames_rx_lo);
|
||||
pstats->pfc_frames_rx_hi = new->rx_stat_grpp_hi;
|
||||
pstats->pfc_frames_rx_lo = new->rx_stat_grpp_lo;
|
||||
ADD_64(pstats->pfc_frames_rx_hi, diff.hi,
|
||||
pstats->pfc_frames_rx_lo, diff.lo);
|
||||
}
|
||||
|
||||
estats->pause_frames_received_hi =
|
||||
|
Reference in New Issue
Block a user