Commit 9fb0969f authored by Colin Ian King's avatar Colin Ian King Committed by David S. Miller

bnx2x: fix various indentation issues

There are lines that have indentation issues, fix these.
Signed-off-by: default avatarColin Ian King <colin.king@canonical.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent ae5220c6
...@@ -449,7 +449,7 @@ static inline void bnx2x_init_fw_wrr(const struct cmng_init_input *input_data, ...@@ -449,7 +449,7 @@ static inline void bnx2x_init_fw_wrr(const struct cmng_init_input *input_data,
ccd[cos] = ccd[cos] =
(u32)input_data->cos_min_rate[cos] * 100 * (u32)input_data->cos_min_rate[cos] * 100 *
(T_FAIR_COEF / (8 * 100 * cosWeightSum)); (T_FAIR_COEF / (8 * 100 * cosWeightSum));
if (ccd[cos] < pdata->fair_vars.fair_threshold if (ccd[cos] < pdata->fair_vars.fair_threshold
+ MIN_ABOVE_THRESH) { + MIN_ABOVE_THRESH) {
ccd[cos] = ccd[cos] =
pdata->fair_vars.fair_threshold + pdata->fair_vars.fair_threshold +
......
...@@ -837,49 +837,45 @@ static int bnx2x_ets_e3b0_set_cos_bw(struct bnx2x *bp, ...@@ -837,49 +837,45 @@ static int bnx2x_ets_e3b0_set_cos_bw(struct bnx2x *bp,
switch (cos_entry) { switch (cos_entry) {
case 0: case 0:
nig_reg_adress_crd_weight = nig_reg_adress_crd_weight =
(port) ? NIG_REG_P1_TX_ARB_CREDIT_WEIGHT_0 : (port) ? NIG_REG_P1_TX_ARB_CREDIT_WEIGHT_0 :
NIG_REG_P0_TX_ARB_CREDIT_WEIGHT_0; NIG_REG_P0_TX_ARB_CREDIT_WEIGHT_0;
pbf_reg_adress_crd_weight = (port) ? pbf_reg_adress_crd_weight = (port) ?
PBF_REG_COS0_WEIGHT_P1 : PBF_REG_COS0_WEIGHT_P0; PBF_REG_COS0_WEIGHT_P1 : PBF_REG_COS0_WEIGHT_P0;
break; break;
case 1: case 1:
nig_reg_adress_crd_weight = (port) ? nig_reg_adress_crd_weight = (port) ?
NIG_REG_P1_TX_ARB_CREDIT_WEIGHT_1 : NIG_REG_P1_TX_ARB_CREDIT_WEIGHT_1 :
NIG_REG_P0_TX_ARB_CREDIT_WEIGHT_1; NIG_REG_P0_TX_ARB_CREDIT_WEIGHT_1;
pbf_reg_adress_crd_weight = (port) ? pbf_reg_adress_crd_weight = (port) ?
PBF_REG_COS1_WEIGHT_P1 : PBF_REG_COS1_WEIGHT_P0; PBF_REG_COS1_WEIGHT_P1 : PBF_REG_COS1_WEIGHT_P0;
break; break;
case 2: case 2:
nig_reg_adress_crd_weight = (port) ? nig_reg_adress_crd_weight = (port) ?
NIG_REG_P1_TX_ARB_CREDIT_WEIGHT_2 : NIG_REG_P1_TX_ARB_CREDIT_WEIGHT_2 :
NIG_REG_P0_TX_ARB_CREDIT_WEIGHT_2; NIG_REG_P0_TX_ARB_CREDIT_WEIGHT_2;
pbf_reg_adress_crd_weight = (port) ? pbf_reg_adress_crd_weight = (port) ?
PBF_REG_COS2_WEIGHT_P1 : PBF_REG_COS2_WEIGHT_P0; PBF_REG_COS2_WEIGHT_P1 : PBF_REG_COS2_WEIGHT_P0;
break; break;
case 3: case 3:
if (port) if (port)
return -EINVAL; return -EINVAL;
nig_reg_adress_crd_weight = nig_reg_adress_crd_weight = NIG_REG_P0_TX_ARB_CREDIT_WEIGHT_3;
NIG_REG_P0_TX_ARB_CREDIT_WEIGHT_3; pbf_reg_adress_crd_weight = PBF_REG_COS3_WEIGHT_P0;
pbf_reg_adress_crd_weight = break;
PBF_REG_COS3_WEIGHT_P0;
break;
case 4: case 4:
if (port) if (port)
return -EINVAL; return -EINVAL;
nig_reg_adress_crd_weight = nig_reg_adress_crd_weight = NIG_REG_P0_TX_ARB_CREDIT_WEIGHT_4;
NIG_REG_P0_TX_ARB_CREDIT_WEIGHT_4; pbf_reg_adress_crd_weight = PBF_REG_COS4_WEIGHT_P0;
pbf_reg_adress_crd_weight = PBF_REG_COS4_WEIGHT_P0; break;
break;
case 5: case 5:
if (port) if (port)
return -EINVAL; return -EINVAL;
nig_reg_adress_crd_weight = nig_reg_adress_crd_weight = NIG_REG_P0_TX_ARB_CREDIT_WEIGHT_5;
NIG_REG_P0_TX_ARB_CREDIT_WEIGHT_5; pbf_reg_adress_crd_weight = PBF_REG_COS5_WEIGHT_P0;
pbf_reg_adress_crd_weight = PBF_REG_COS5_WEIGHT_P0; break;
break;
} }
REG_WR(bp, nig_reg_adress_crd_weight, cos_bw_nig); REG_WR(bp, nig_reg_adress_crd_weight, cos_bw_nig);
...@@ -966,7 +962,7 @@ static int bnx2x_ets_e3b0_sp_pri_to_cos_set(const struct link_params *params, ...@@ -966,7 +962,7 @@ static int bnx2x_ets_e3b0_sp_pri_to_cos_set(const struct link_params *params,
if (pri >= max_num_of_cos) { if (pri >= max_num_of_cos) {
DP(NETIF_MSG_LINK, "bnx2x_ets_e3b0_sp_pri_to_cos_set invalid " DP(NETIF_MSG_LINK, "bnx2x_ets_e3b0_sp_pri_to_cos_set invalid "
"parameter Illegal strict priority\n"); "parameter Illegal strict priority\n");
return -EINVAL; return -EINVAL;
} }
if (sp_pri_to_cos[pri] != DCBX_INVALID_COS) { if (sp_pri_to_cos[pri] != DCBX_INVALID_COS) {
...@@ -1845,28 +1841,28 @@ static int bnx2x_emac_enable(struct link_params *params, ...@@ -1845,28 +1841,28 @@ static int bnx2x_emac_enable(struct link_params *params,
bnx2x_bits_en(bp, emac_base + EMAC_REG_EMAC_TX_MODE, bnx2x_bits_en(bp, emac_base + EMAC_REG_EMAC_TX_MODE,
EMAC_TX_MODE_RESET); EMAC_TX_MODE_RESET);
/* pause enable/disable */ /* pause enable/disable */
bnx2x_bits_dis(bp, emac_base + EMAC_REG_EMAC_RX_MODE, bnx2x_bits_dis(bp, emac_base + EMAC_REG_EMAC_RX_MODE,
EMAC_RX_MODE_FLOW_EN); EMAC_RX_MODE_FLOW_EN);
bnx2x_bits_dis(bp, emac_base + EMAC_REG_EMAC_TX_MODE, bnx2x_bits_dis(bp, emac_base + EMAC_REG_EMAC_TX_MODE,
(EMAC_TX_MODE_EXT_PAUSE_EN | (EMAC_TX_MODE_EXT_PAUSE_EN |
EMAC_TX_MODE_FLOW_EN)); EMAC_TX_MODE_FLOW_EN));
if (!(params->feature_config_flags & if (!(params->feature_config_flags &
FEATURE_CONFIG_PFC_ENABLED)) { FEATURE_CONFIG_PFC_ENABLED)) {
if (vars->flow_ctrl & BNX2X_FLOW_CTRL_RX) if (vars->flow_ctrl & BNX2X_FLOW_CTRL_RX)
bnx2x_bits_en(bp, emac_base + bnx2x_bits_en(bp, emac_base +
EMAC_REG_EMAC_RX_MODE, EMAC_REG_EMAC_RX_MODE,
EMAC_RX_MODE_FLOW_EN); EMAC_RX_MODE_FLOW_EN);
if (vars->flow_ctrl & BNX2X_FLOW_CTRL_TX) if (vars->flow_ctrl & BNX2X_FLOW_CTRL_TX)
bnx2x_bits_en(bp, emac_base + bnx2x_bits_en(bp, emac_base +
EMAC_REG_EMAC_TX_MODE, EMAC_REG_EMAC_TX_MODE,
(EMAC_TX_MODE_EXT_PAUSE_EN | (EMAC_TX_MODE_EXT_PAUSE_EN |
EMAC_TX_MODE_FLOW_EN)); EMAC_TX_MODE_FLOW_EN));
} else } else
bnx2x_bits_en(bp, emac_base + EMAC_REG_EMAC_TX_MODE, bnx2x_bits_en(bp, emac_base + EMAC_REG_EMAC_TX_MODE,
EMAC_TX_MODE_FLOW_EN); EMAC_TX_MODE_FLOW_EN);
/* KEEP_VLAN_TAG, promiscuous */ /* KEEP_VLAN_TAG, promiscuous */
val = REG_RD(bp, emac_base + EMAC_REG_EMAC_RX_MODE); val = REG_RD(bp, emac_base + EMAC_REG_EMAC_RX_MODE);
...@@ -6478,9 +6474,9 @@ int bnx2x_test_link(struct link_params *params, struct link_vars *vars, ...@@ -6478,9 +6474,9 @@ int bnx2x_test_link(struct link_params *params, struct link_vars *vars,
MDIO_REG_BANK_GP_STATUS, MDIO_REG_BANK_GP_STATUS,
MDIO_GP_STATUS_TOP_AN_STATUS1, MDIO_GP_STATUS_TOP_AN_STATUS1,
&gp_status); &gp_status);
/* Link is up only if both local phy and external phy are up */ /* Link is up only if both local phy and external phy are up */
if (!(gp_status & MDIO_GP_STATUS_TOP_AN_STATUS1_LINK_STATUS)) if (!(gp_status & MDIO_GP_STATUS_TOP_AN_STATUS1_LINK_STATUS))
return -ESRCH; return -ESRCH;
} }
/* In XGXS loopback mode, do not check external PHY */ /* In XGXS loopback mode, do not check external PHY */
if (params->loopback_mode == LOOPBACK_XGXS) if (params->loopback_mode == LOOPBACK_XGXS)
...@@ -7293,8 +7289,8 @@ static int bnx2x_8073_xaui_wa(struct bnx2x *bp, struct bnx2x_phy *phy) ...@@ -7293,8 +7289,8 @@ static int bnx2x_8073_xaui_wa(struct bnx2x *bp, struct bnx2x_phy *phy)
DP(NETIF_MSG_LINK, DP(NETIF_MSG_LINK,
"XAUI workaround has completed\n"); "XAUI workaround has completed\n");
return 0; return 0;
} }
usleep_range(3000, 6000); usleep_range(3000, 6000);
} }
break; break;
} }
...@@ -12675,39 +12671,39 @@ static void bnx2x_init_bmac_loopback(struct link_params *params, ...@@ -12675,39 +12671,39 @@ static void bnx2x_init_bmac_loopback(struct link_params *params,
struct link_vars *vars) struct link_vars *vars)
{ {
struct bnx2x *bp = params->bp; struct bnx2x *bp = params->bp;
vars->link_up = 1; vars->link_up = 1;
vars->line_speed = SPEED_10000; vars->line_speed = SPEED_10000;
vars->duplex = DUPLEX_FULL; vars->duplex = DUPLEX_FULL;
vars->flow_ctrl = BNX2X_FLOW_CTRL_NONE; vars->flow_ctrl = BNX2X_FLOW_CTRL_NONE;
vars->mac_type = MAC_TYPE_BMAC; vars->mac_type = MAC_TYPE_BMAC;
vars->phy_flags = PHY_XGXS_FLAG; vars->phy_flags = PHY_XGXS_FLAG;
bnx2x_xgxs_deassert(params); bnx2x_xgxs_deassert(params);
/* Set bmac loopback */ /* Set bmac loopback */
bnx2x_bmac_enable(params, vars, 1, 1); bnx2x_bmac_enable(params, vars, 1, 1);
REG_WR(bp, NIG_REG_EGRESS_DRAIN0_MODE + params->port*4, 0); REG_WR(bp, NIG_REG_EGRESS_DRAIN0_MODE + params->port * 4, 0);
} }
static void bnx2x_init_emac_loopback(struct link_params *params, static void bnx2x_init_emac_loopback(struct link_params *params,
struct link_vars *vars) struct link_vars *vars)
{ {
struct bnx2x *bp = params->bp; struct bnx2x *bp = params->bp;
vars->link_up = 1; vars->link_up = 1;
vars->line_speed = SPEED_1000; vars->line_speed = SPEED_1000;
vars->duplex = DUPLEX_FULL; vars->duplex = DUPLEX_FULL;
vars->flow_ctrl = BNX2X_FLOW_CTRL_NONE; vars->flow_ctrl = BNX2X_FLOW_CTRL_NONE;
vars->mac_type = MAC_TYPE_EMAC; vars->mac_type = MAC_TYPE_EMAC;
vars->phy_flags = PHY_XGXS_FLAG; vars->phy_flags = PHY_XGXS_FLAG;
bnx2x_xgxs_deassert(params); bnx2x_xgxs_deassert(params);
/* Set bmac loopback */ /* Set bmac loopback */
bnx2x_emac_enable(params, vars, 1); bnx2x_emac_enable(params, vars, 1);
bnx2x_emac_program(params, vars); bnx2x_emac_program(params, vars);
REG_WR(bp, NIG_REG_EGRESS_DRAIN0_MODE + params->port*4, 0); REG_WR(bp, NIG_REG_EGRESS_DRAIN0_MODE + params->port * 4, 0);
} }
static void bnx2x_init_xmac_loopback(struct link_params *params, static void bnx2x_init_xmac_loopback(struct link_params *params,
...@@ -13073,12 +13069,12 @@ int bnx2x_link_reset(struct link_params *params, struct link_vars *vars, ...@@ -13073,12 +13069,12 @@ int bnx2x_link_reset(struct link_params *params, struct link_vars *vars,
REG_WR(bp, NIG_REG_EGRESS_EMAC0_OUT_EN + port*4, 0); REG_WR(bp, NIG_REG_EGRESS_EMAC0_OUT_EN + port*4, 0);
} }
if (!CHIP_IS_E3(bp)) { if (!CHIP_IS_E3(bp)) {
bnx2x_set_bmac_rx(bp, params->chip_id, port, 0); bnx2x_set_bmac_rx(bp, params->chip_id, port, 0);
} else { } else {
bnx2x_set_xmac_rxtx(params, 0); bnx2x_set_xmac_rxtx(params, 0);
bnx2x_set_umac_rxtx(params, 0); bnx2x_set_umac_rxtx(params, 0);
} }
/* Disable emac */ /* Disable emac */
if (!CHIP_IS_E3(bp)) if (!CHIP_IS_E3(bp))
REG_WR(bp, NIG_REG_NIG_EMAC0_EN + port*4, 0); REG_WR(bp, NIG_REG_NIG_EMAC0_EN + port*4, 0);
......
...@@ -11298,7 +11298,7 @@ static void bnx2x_link_settings_supported(struct bnx2x *bp, u32 switch_cfg) ...@@ -11298,7 +11298,7 @@ static void bnx2x_link_settings_supported(struct bnx2x *bp, u32 switch_cfg)
dev_info.port_hw_config[port].external_phy_config), dev_info.port_hw_config[port].external_phy_config),
SHMEM_RD(bp, SHMEM_RD(bp,
dev_info.port_hw_config[port].external_phy_config2)); dev_info.port_hw_config[port].external_phy_config2));
return; return;
} }
if (CHIP_IS_E3(bp)) if (CHIP_IS_E3(bp))
......
...@@ -2977,8 +2977,8 @@ static inline void bnx2x_mcast_hdl_pending_del_e2(struct bnx2x *bp, ...@@ -2977,8 +2977,8 @@ static inline void bnx2x_mcast_hdl_pending_del_e2(struct bnx2x *bp,
cmd_pos->data.macs_num--; cmd_pos->data.macs_num--;
DP(BNX2X_MSG_SP, "Deleting MAC. %d left,cnt is %d\n", DP(BNX2X_MSG_SP, "Deleting MAC. %d left,cnt is %d\n",
cmd_pos->data.macs_num, cnt); cmd_pos->data.macs_num, cnt);
/* Break if we reached the maximum /* Break if we reached the maximum
* number of rules. * number of rules.
...@@ -3597,8 +3597,8 @@ static int bnx2x_mcast_validate_e1(struct bnx2x *bp, ...@@ -3597,8 +3597,8 @@ static int bnx2x_mcast_validate_e1(struct bnx2x *bp,
/* RESTORE command will restore the entire multicast configuration */ /* RESTORE command will restore the entire multicast configuration */
case BNX2X_MCAST_CMD_RESTORE: case BNX2X_MCAST_CMD_RESTORE:
p->mcast_list_len = reg_sz; p->mcast_list_len = reg_sz;
DP(BNX2X_MSG_SP, "Command %d, p->mcast_list_len=%d\n", DP(BNX2X_MSG_SP, "Command %d, p->mcast_list_len=%d\n",
cmd, p->mcast_list_len); cmd, p->mcast_list_len);
break; break;
case BNX2X_MCAST_CMD_ADD: case BNX2X_MCAST_CMD_ADD:
...@@ -3735,8 +3735,8 @@ static inline int bnx2x_mcast_handle_restore_cmd_e1( ...@@ -3735,8 +3735,8 @@ static inline int bnx2x_mcast_handle_restore_cmd_e1(
i++; i++;
DP(BNX2X_MSG_SP, "About to configure %pM mcast MAC\n", DP(BNX2X_MSG_SP, "About to configure %pM mcast MAC\n",
cfg_data.mac); cfg_data.mac);
} }
*rdata_idx = i; *rdata_idx = i;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment