diff options
author | Sunil Goutham <sgoutham@cavium.com> | 2016-08-12 07:21:44 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2016-08-13 14:59:33 -0400 |
commit | 93db2cf8caa1fa69cb833175cc5d30a7d178d53b (patch) | |
tree | 5ae041b1ed35785365cf7d0d733b20daf2438c20 /drivers/net/ethernet/cavium/thunder/thunder_bgx.c | |
parent | 0052c92f8f84ef94210b91dd471a3dfa1f25625a (diff) |
net: thunderx: Don't set RX_PACKET_DIS while initializing
Setting BGXX_SPUX_MISC_CONTROL::RX_PACKET_DIS is not needed as
packet reception is anyway disabled by BGXX_CMRX_CONFIG::DATA_PKT_RX_EN.
Also setting RX_PACKET_DIS causes a bogus remote fault condition
which delays link detection.
Signed-off-by: Sunil Goutham <sgoutham@cavium.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/ethernet/cavium/thunder/thunder_bgx.c')
-rw-r--r-- | drivers/net/ethernet/cavium/thunder/thunder_bgx.c | 18 |
1 files changed, 7 insertions, 11 deletions
diff --git a/drivers/net/ethernet/cavium/thunder/thunder_bgx.c b/drivers/net/ethernet/cavium/thunder/thunder_bgx.c index ca58d7f52ecd..8bbaedbb7b94 100644 --- a/drivers/net/ethernet/cavium/thunder/thunder_bgx.c +++ b/drivers/net/ethernet/cavium/thunder/thunder_bgx.c | |||
@@ -459,12 +459,14 @@ static int bgx_lmac_xaui_init(struct bgx *bgx, struct lmac *lmac) | |||
459 | 459 | ||
460 | bgx_reg_modify(bgx, lmacid, BGX_SPUX_CONTROL1, SPU_CTL_LOW_POWER); | 460 | bgx_reg_modify(bgx, lmacid, BGX_SPUX_CONTROL1, SPU_CTL_LOW_POWER); |
461 | /* Set interleaved running disparity for RXAUI */ | 461 | /* Set interleaved running disparity for RXAUI */ |
462 | if (lmac->lmac_type != BGX_MODE_RXAUI) | 462 | if (lmac->lmac_type == BGX_MODE_RXAUI) |
463 | bgx_reg_modify(bgx, lmacid, | ||
464 | BGX_SPUX_MISC_CONTROL, SPU_MISC_CTL_RX_DIS); | ||
465 | else | ||
466 | bgx_reg_modify(bgx, lmacid, BGX_SPUX_MISC_CONTROL, | 463 | bgx_reg_modify(bgx, lmacid, BGX_SPUX_MISC_CONTROL, |
467 | SPU_MISC_CTL_RX_DIS | SPU_MISC_CTL_INTLV_RDISP); | 464 | SPU_MISC_CTL_INTLV_RDISP); |
465 | |||
466 | /* Clear receive packet disable */ | ||
467 | cfg = bgx_reg_read(bgx, lmacid, BGX_SPUX_MISC_CONTROL); | ||
468 | cfg &= ~SPU_MISC_CTL_RX_DIS; | ||
469 | bgx_reg_write(bgx, lmacid, BGX_SPUX_MISC_CONTROL, cfg); | ||
468 | 470 | ||
469 | /* clear all interrupts */ | 471 | /* clear all interrupts */ |
470 | cfg = bgx_reg_read(bgx, lmacid, BGX_SMUX_RX_INT); | 472 | cfg = bgx_reg_read(bgx, lmacid, BGX_SMUX_RX_INT); |
@@ -537,7 +539,6 @@ static int bgx_xaui_check_link(struct lmac *lmac) | |||
537 | int lmac_type = lmac->lmac_type; | 539 | int lmac_type = lmac->lmac_type; |
538 | u64 cfg; | 540 | u64 cfg; |
539 | 541 | ||
540 | bgx_reg_modify(bgx, lmacid, BGX_SPUX_MISC_CONTROL, SPU_MISC_CTL_RX_DIS); | ||
541 | if (lmac->use_training) { | 542 | if (lmac->use_training) { |
542 | cfg = bgx_reg_read(bgx, lmacid, BGX_SPUX_INT); | 543 | cfg = bgx_reg_read(bgx, lmacid, BGX_SPUX_INT); |
543 | if (!(cfg & (1ull << 13))) { | 544 | if (!(cfg & (1ull << 13))) { |
@@ -607,11 +608,6 @@ static int bgx_xaui_check_link(struct lmac *lmac) | |||
607 | return -1; | 608 | return -1; |
608 | } | 609 | } |
609 | 610 | ||
610 | /* Clear receive packet disable */ | ||
611 | cfg = bgx_reg_read(bgx, lmacid, BGX_SPUX_MISC_CONTROL); | ||
612 | cfg &= ~SPU_MISC_CTL_RX_DIS; | ||
613 | bgx_reg_write(bgx, lmacid, BGX_SPUX_MISC_CONTROL, cfg); | ||
614 | |||
615 | /* Check for MAC RX faults */ | 611 | /* Check for MAC RX faults */ |
616 | cfg = bgx_reg_read(bgx, lmacid, BGX_SMUX_RX_CTL); | 612 | cfg = bgx_reg_read(bgx, lmacid, BGX_SMUX_RX_CTL); |
617 | /* 0 - Link is okay, 1 - Local fault, 2 - Remote fault */ | 613 | /* 0 - Link is okay, 1 - Local fault, 2 - Remote fault */ |