[dpdk-dev] [PATCH 02/10] bnx2x: Remove unused preprocessor symbols and code

2016-07-15 Thread Bruce Richardson
On Tue, Jul 12, 2016 at 09:38:06AM -0400, Chas Williams wrote:
> ELINK_INCLUDE_EMUL and ELINK_INCLUDE_FPGA are never defined.  Remove them
> along with enumeration constants dependent on their inclusion.
> 
> Fixes: 540a211084a7 ("bnx2x: driver core")
> 
> Signed-off-by: Chas Williams <3chas3 at gmail.com>

Hi Chas,

the threading on this submission is very awkward - poor patch 1 got somehow
separated from the rest of it's patch family. :-)

Besides this, given where we are in the release cycle for 16.07, these cleanups
are being deferred for possible inclusion in 16.11 (once reviewed and acked,
obviously). To get cleanup like this in in future release, please submit by
the integration deadline date.

BTW: If there are any critical bug fixes in this set, please
sent them as separate patches clearing calling them out as fixes, so they
can get the attention and review they deserve.

Thanks,
/Bruce



[dpdk-dev] [PATCH 02/10] bnx2x: Remove unused preprocessor symbols and code

2016-07-15 Thread Chas Williams
On Fri, 2016-07-15 at 16:56 +0100, Bruce Richardson wrote:
> On Tue, Jul 12, 2016 at 09:38:06AM -0400, Chas Williams wrote:
> > ELINK_INCLUDE_EMUL and ELINK_INCLUDE_FPGA are never defined.??Remove them
> > along with enumeration constants dependent on their inclusion.
> >?
> > Fixes: 540a211084a7 ("bnx2x: driver core")
> >?
> > Signed-off-by: Chas Williams <3chas3 at gmail.com>
> 
> Hi Chas,
> 
> the threading on this submission is very awkward - poor patch 1 got somehow
> separated from the rest of it's patch family. :-)

Yeah, I don't know what happened there.

> Besides this, given where we are in the release cycle for 16.07, these 
> cleanups
> are being deferred for possible inclusion in 16.11 (once reviewed and acked,
> obviously). To get cleanup like this in in future release, please submit by
> the integration deadline date.

Not a problem. ?These are not urgent changes. ?There are some
real issues fixed but I suspect no one runs into them.


[dpdk-dev] [PATCH 02/10] bnx2x: Remove unused preprocessor symbols and code

2016-07-12 Thread Chas Williams
ELINK_INCLUDE_EMUL and ELINK_INCLUDE_FPGA are never defined.  Remove them
along with enumeration constants dependent on their inclusion.

Fixes: 540a211084a7 ("bnx2x: driver core")

Signed-off-by: Chas Williams <3chas3 at gmail.com>
---
 drivers/net/bnx2x/bnx2x.c |  28 
 drivers/net/bnx2x/elink.c | 392 --
 drivers/net/bnx2x/elink.h |   4 -
 3 files changed, 64 insertions(+), 360 deletions(-)

diff --git a/drivers/net/bnx2x/bnx2x.c b/drivers/net/bnx2x/bnx2x.c
index 6edb2f9..7599e9c 100644
--- a/drivers/net/bnx2x/bnx2x.c
+++ b/drivers/net/bnx2x/bnx2x.c
@@ -7035,34 +7035,6 @@ static int bnx2x_initial_phy_init(struct bnx2x_softc 
*sc, int load_mode)

bnx2x_set_requested_fc(sc);

-   if (CHIP_REV_IS_SLOW(sc)) {
-   uint32_t bond = CHIP_BOND_ID(sc);
-   uint32_t feat = 0;
-
-   if (CHIP_IS_E2(sc) && CHIP_IS_MODE_4_PORT(sc)) {
-   feat |= ELINK_FEATURE_CONFIG_EMUL_DISABLE_BMAC;
-   } else if (bond & 0x4) {
-   if (CHIP_IS_E3(sc)) {
-   feat |= ELINK_FEATURE_CONFIG_EMUL_DISABLE_XMAC;
-   } else {
-   feat |= ELINK_FEATURE_CONFIG_EMUL_DISABLE_BMAC;
-   }
-   } else if (bond & 0x8) {
-   if (CHIP_IS_E3(sc)) {
-   feat |= ELINK_FEATURE_CONFIG_EMUL_DISABLE_UMAC;
-   } else {
-   feat |= ELINK_FEATURE_CONFIG_EMUL_DISABLE_EMAC;
-   }
-   }
-
-/* disable EMAC for E3 and above */
-   if (bond & 0x2) {
-   feat |= ELINK_FEATURE_CONFIG_EMUL_DISABLE_EMAC;
-   }
-
-   sc->link_params.feature_config_flags |= feat;
-   }
-
if (load_mode == LOAD_DIAG) {
lp->loopback_mode = ELINK_LOOPBACK_XGXS;
 /* Prefer doing PHY loopback at 10G speed, if possible */
diff --git a/drivers/net/bnx2x/elink.c b/drivers/net/bnx2x/elink.c
index b9149b8..3a3bb30 100644
--- a/drivers/net/bnx2x/elink.c
+++ b/drivers/net/bnx2x/elink.c
@@ -1586,26 +1586,6 @@ static elink_status_t elink_emac_enable(struct 
elink_params *params,
/* enable emac and not bmac */
REG_WR(sc, NIG_REG_EGRESS_EMAC0_PORT + port * 4, 1);

-#ifdef ELINK_INCLUDE_EMUL
-   /* for paladium */
-   if (CHIP_REV_IS_EMUL(sc)) {
-   /* Use lane 1 (of lanes 0-3) */
-   REG_WR(sc, NIG_REG_XGXS_LANE_SEL_P0 + port * 4, 1);
-   REG_WR(sc, NIG_REG_XGXS_SERDES0_MODE_SEL + port * 4, 1);
-   }
-   /* for fpga */
-   else
-#endif
-#ifdef ELINK_INCLUDE_FPGA
-   if (CHIP_REV_IS_FPGA(sc)) {
-   /* Use lane 1 (of lanes 0-3) */
-   PMD_DRV_LOG(DEBUG, "elink_emac_enable: Setting FPGA");
-
-   REG_WR(sc, NIG_REG_XGXS_LANE_SEL_P0 + port * 4, 1);
-   REG_WR(sc, NIG_REG_XGXS_SERDES0_MODE_SEL + port * 4, 0);
-   } else
-#endif
-   /* ASIC */
if (vars->phy_flags & PHY_XGXS_FLAG) {
uint32_t ser_lane = ((params->lane_config &
  PORT_HW_CFG_LANE_SWAP_CFG_MASTER_MASK) >>
@@ -1628,39 +1608,28 @@ static elink_status_t elink_emac_enable(struct 
elink_params *params,
elink_bits_en(sc, emac_base + EMAC_REG_EMAC_TX_MODE,
  EMAC_TX_MODE_RESET);

-#if defined(ELINK_INCLUDE_EMUL) || defined(ELINK_INCLUDE_FPGA)
-   if (CHIP_REV_IS_SLOW(sc)) {
-   /* config GMII mode */
-   val = REG_RD(sc, emac_base + EMAC_REG_EMAC_MODE);
-   elink_cb_reg_write(sc, emac_base + EMAC_REG_EMAC_MODE,
-  (val | EMAC_MODE_PORT_GMII));
-   } else {/* ASIC */
-#endif
-   /* pause enable/disable */
-   elink_bits_dis(sc, emac_base + EMAC_REG_EMAC_RX_MODE,
-  EMAC_RX_MODE_FLOW_EN);
+   /* pause enable/disable */
+   elink_bits_dis(sc, emac_base + EMAC_REG_EMAC_RX_MODE,
+  EMAC_RX_MODE_FLOW_EN);

-   elink_bits_dis(sc, emac_base + EMAC_REG_EMAC_TX_MODE,
-  (EMAC_TX_MODE_EXT_PAUSE_EN |
-   EMAC_TX_MODE_FLOW_EN));
-   if (!(params->feature_config_flags &
- ELINK_FEATURE_CONFIG_PFC_ENABLED)) {
-   if (vars->flow_ctrl & ELINK_FLOW_CTRL_RX)
-   elink_bits_en(sc, emac_base +
- EMAC_REG_EMAC_RX_MODE,
- EMAC_RX_MODE_FLOW_EN);
-
-   if (vars->flow_ctrl & ELINK_FLOW_CTRL_TX)
-   elink_bits_en(sc, emac_base +
- EMAC_REG_EMAC_TX_MODE,
-