Update mtk_eth_soc.c

This commit is contained in:
padavanonly 2024-09-24 21:13:13 +08:00 committed by GitHub
parent 7623e0502e
commit e40b50cd6a
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -3703,18 +3703,11 @@ static int mtk_dma_init(struct mtk_eth *eth)
static void mtk_dma_free(struct mtk_eth *eth)
{
const struct mtk_soc_data *soc = eth->soc;
int i, j, txqs;
txqs = MTK_QDMA_TX_NUM;
int i;
for (i = 0; i < MTK_MAC_COUNT; i++) {
if (!eth->netdev[i])
continue;
for (j = 0; j < txqs; j++)
netdev_tx_reset_queue(netdev_get_tx_queue(eth->netdev[i], j));
}
for (i = 0; i < MTK_MAC_COUNT; i++)
if (eth->netdev[i])
netdev_reset_queue(eth->netdev[i]);
if ( !eth->soc->has_sram && eth->scratch_ring) {
dma_free_coherent(eth->dma_dev,
soc->txrx.fq_dma_size * soc->txrx.txd_size,