osi: mgbe: Enable LSI only after UPHY lane bring up

Issue: During boot or interface up/down test local
fault interrupts observed during UPHY lane bring up
and which resuts in scheduling the UPHY lane bring up
again. With this HW is generating the continuous local
faults and link ok interrupts. This causes CPU to stall.

Fix:
Enable Link Status interrupt only after the PCS block
lock is a success.

Bug 4076432

Change-Id: I00049900d5d687cc043b184a7b87cc68a2651aea
Signed-off-by: Bhadram Varka <vbhadram@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/kernel/nvethernetrm/+/2893961
(cherry picked from commit 438811eb89ab5826df17349c1be9128d28e897f1)
Reviewed-on: https://git-master.nvidia.com/r/c/kernel/nvethernetrm/+/2894369
Reviewed-by: svc-mobile-coverity <svc-mobile-coverity@nvidia.com>
Reviewed-by: svc-mobile-cert <svc-mobile-cert@nvidia.com>
Reviewed-by: Narayan Reddy <narayanr@nvidia.com>
Reviewed-by: Krishna Thota <kthota@nvidia.com>
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
This commit is contained in:
Bhadram Varka
2023-04-25 14:08:21 +00:00
committed by mobile promotions
parent cf366ff65c
commit c6382f708e
2 changed files with 8 additions and 1 deletions

View File

@@ -193,6 +193,11 @@ nve32_t hw_set_speed(struct osi_core_priv_data *const osi_core, const nve32_t sp
if (ret < 0) { if (ret < 0) {
goto fail; goto fail;
} }
value = osi_readla(osi_core, (nveu8_t *)osi_core->base + MGBE_MAC_IER);
/* Enable Link Status interrupt only after lane bring up success */
value |= MGBE_IMR_RGSMIIIE;
osi_writela(osi_core, value, (nveu8_t *)osi_core->base + MGBE_MAC_IER);
} }
fail: fail:
return ret; return ret;

View File

@@ -1832,7 +1832,9 @@ static nve32_t mgbe_configure_mac(struct osi_core_priv_data *osi_core)
#ifndef OSI_STRIPPED_LIB #ifndef OSI_STRIPPED_LIB
value |= (MGBE_IMR_TXESIE); value |= (MGBE_IMR_TXESIE);
#endif #endif
value |= (MGBE_IMR_RGSMIIIE | MGBE_IMR_TSIE); /* Clear link status interrupt and enable after lane bring up done */
value &= ~MGBE_IMR_RGSMIIIE;
value |= MGBE_IMR_TSIE;
osi_writela(osi_core, value, (nveu8_t *)osi_core->base + MGBE_MAC_IER); osi_writela(osi_core, value, (nveu8_t *)osi_core->base + MGBE_MAC_IER);
/* Enable common interrupt at wrapper level */ /* Enable common interrupt at wrapper level */