mirror of
https://github.com/padavanonly/immortalwrt-mt798x.git
synced 2025-12-16 16:56:38 +00:00
Update mtk_eth_soc.c
This commit is contained in:
parent
7623e0502e
commit
e40b50cd6a
@ -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,
|
||||
|
||||
Loading…
Reference in New Issue
Block a user