Commit 52ca17f3 authored by Sunil Goutham's avatar Sunil Goutham Committed by Seth Forshee

net: thunderx: Don't set RX_PACKET_DIS while initializing

BugLink: http://bugs.launchpad.net/bugs/1630038

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: default avatarSunil Goutham <sgoutham@cavium.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
(backported from commit 93db2cf8)
Signed-off-by: default avatardann frazier <dann.frazier@canonical.com>
Acked-by: default avatarBrad Figg <brad.figg@canonical.com>
Signed-off-by: default avatarTim Gardner <tim.gardner@canonical.com>
parent 4125e8e9
...@@ -434,12 +434,14 @@ static int bgx_lmac_xaui_init(struct bgx *bgx, int lmacid, int lmac_type) ...@@ -434,12 +434,14 @@ static int bgx_lmac_xaui_init(struct bgx *bgx, int lmacid, int lmac_type)
bgx_reg_modify(bgx, lmacid, BGX_SPUX_CONTROL1, SPU_CTL_LOW_POWER); bgx_reg_modify(bgx, lmacid, BGX_SPUX_CONTROL1, SPU_CTL_LOW_POWER);
/* Set interleaved running disparity for RXAUI */ /* Set interleaved running disparity for RXAUI */
if (bgx->lmac_type != BGX_MODE_RXAUI) if (bgx->lmac_type == BGX_MODE_RXAUI)
bgx_reg_modify(bgx, lmacid,
BGX_SPUX_MISC_CONTROL, SPU_MISC_CTL_RX_DIS);
else
bgx_reg_modify(bgx, lmacid, BGX_SPUX_MISC_CONTROL, bgx_reg_modify(bgx, lmacid, BGX_SPUX_MISC_CONTROL,
SPU_MISC_CTL_RX_DIS | SPU_MISC_CTL_INTLV_RDISP); SPU_MISC_CTL_INTLV_RDISP);
/* Clear receive packet disable */
cfg = bgx_reg_read(bgx, lmacid, BGX_SPUX_MISC_CONTROL);
cfg &= ~SPU_MISC_CTL_RX_DIS;
bgx_reg_write(bgx, lmacid, BGX_SPUX_MISC_CONTROL, cfg);
/* clear all interrupts */ /* clear all interrupts */
cfg = bgx_reg_read(bgx, lmacid, BGX_SMUX_RX_INT); cfg = bgx_reg_read(bgx, lmacid, BGX_SMUX_RX_INT);
...@@ -512,7 +514,6 @@ static int bgx_xaui_check_link(struct lmac *lmac) ...@@ -512,7 +514,6 @@ static int bgx_xaui_check_link(struct lmac *lmac)
int lmac_type = bgx->lmac_type; int lmac_type = bgx->lmac_type;
u64 cfg; u64 cfg;
bgx_reg_modify(bgx, lmacid, BGX_SPUX_MISC_CONTROL, SPU_MISC_CTL_RX_DIS);
if (bgx->use_training) { if (bgx->use_training) {
cfg = bgx_reg_read(bgx, lmacid, BGX_SPUX_INT); cfg = bgx_reg_read(bgx, lmacid, BGX_SPUX_INT);
if (!(cfg & (1ull << 13))) { if (!(cfg & (1ull << 13))) {
...@@ -582,11 +583,6 @@ static int bgx_xaui_check_link(struct lmac *lmac) ...@@ -582,11 +583,6 @@ static int bgx_xaui_check_link(struct lmac *lmac)
return -1; return -1;
} }
/* Clear receive packet disable */
cfg = bgx_reg_read(bgx, lmacid, BGX_SPUX_MISC_CONTROL);
cfg &= ~SPU_MISC_CTL_RX_DIS;
bgx_reg_write(bgx, lmacid, BGX_SPUX_MISC_CONTROL, cfg);
/* Check for MAC RX faults */ /* Check for MAC RX faults */
cfg = bgx_reg_read(bgx, lmacid, BGX_SMUX_RX_CTL); cfg = bgx_reg_read(bgx, lmacid, BGX_SMUX_RX_CTL);
/* 0 - Link is okay, 1 - Local fault, 2 - Remote fault */ /* 0 - Link is okay, 1 - Local fault, 2 - Remote fault */
......
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