Skip to content

Commit 93db2cf

Browse files
Sunil Gouthamdavem330
authored andcommitted
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 <[email protected]> Signed-off-by: David S. Miller <[email protected]>
1 parent 0052c92 commit 93db2cf

File tree

1 file changed

+7
-11
lines changed

1 file changed

+7
-11
lines changed

drivers/net/ethernet/cavium/thunder/thunder_bgx.c

Lines changed: 7 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -459,12 +459,14 @@ static int bgx_lmac_xaui_init(struct bgx *bgx, struct lmac *lmac)
459459

460460
bgx_reg_modify(bgx, lmacid, BGX_SPUX_CONTROL1, SPU_CTL_LOW_POWER);
461461
/* Set interleaved running disparity for 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
462+
if (lmac->lmac_type == BGX_MODE_RXAUI)
466463
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);
468470

469471
/* clear all interrupts */
470472
cfg = bgx_reg_read(bgx, lmacid, BGX_SMUX_RX_INT);
@@ -537,7 +539,6 @@ static int bgx_xaui_check_link(struct lmac *lmac)
537539
int lmac_type = lmac->lmac_type;
538540
u64 cfg;
539541

540-
bgx_reg_modify(bgx, lmacid, BGX_SPUX_MISC_CONTROL, SPU_MISC_CTL_RX_DIS);
541542
if (lmac->use_training) {
542543
cfg = bgx_reg_read(bgx, lmacid, BGX_SPUX_INT);
543544
if (!(cfg & (1ull << 13))) {
@@ -607,11 +608,6 @@ static int bgx_xaui_check_link(struct lmac *lmac)
607608
return -1;
608609
}
609610

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-
615611
/* Check for MAC RX faults */
616612
cfg = bgx_reg_read(bgx, lmacid, BGX_SMUX_RX_CTL);
617613
/* 0 - Link is okay, 1 - Local fault, 2 - Remote fault */

0 commit comments

Comments
 (0)