Update mtk_eth_soc.c

This commit is contained in:
padavanonly 2024-09-17 09:02:11 +08:00 committed by GitHub
parent 1b52a3494e
commit d4f056b3e4
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -2399,6 +2399,11 @@ static int mtk_poll_rx(struct napi_struct *napi, int budget,
0 : RX_DMA_GET_SPORT(trxd.rxd4) - 1;
}
if (mac == 4) mac = 1;
if (MTK_HAS_CAPS(eth->soc->caps, MTK_NETSYS_RX_V2))
mac = (RX_DMA_GET_CRSN_V2(trxd.rxd5) == HIT_BIND_FORCE_TO_CPU) ? 1 : mac;
else
mac = (RX_DMA_GET_CRSN(trxd.rxd4) == HIT_BIND_FORCE_TO_CPU) ? 1 : mac;
if (unlikely(mac < 0 || mac >= MTK_MAC_COUNT ||
!eth->netdev[mac]))
goto release_desc;