File tree Expand file tree Collapse file tree 1 file changed +12
-4
lines changed
drivers/net/ethernet/mediatek Expand file tree Collapse file tree 1 file changed +12
-4
lines changed Original file line number Diff line number Diff line change @@ -3140,11 +3140,19 @@ static int mtk_dma_init(struct mtk_eth *eth)
31403140static void mtk_dma_free (struct mtk_eth * eth )
31413141{
31423142 const struct mtk_soc_data * soc = eth -> soc ;
3143- int i ;
3143+ int i , j , txqs = 1 ;
3144+
3145+ if (MTK_HAS_CAPS (eth -> soc -> caps , MTK_QDMA ))
3146+ txqs = MTK_QDMA_NUM_QUEUES ;
3147+
3148+ for (i = 0 ; i < MTK_MAX_DEVS ; i ++ ) {
3149+ if (!eth -> netdev [i ])
3150+ continue ;
3151+
3152+ for (j = 0 ; j < txqs ; j ++ )
3153+ netdev_tx_reset_subqueue (eth -> netdev [i ], j );
3154+ }
31443155
3145- for (i = 0 ; i < MTK_MAX_DEVS ; i ++ )
3146- if (eth -> netdev [i ])
3147- netdev_reset_queue (eth -> netdev [i ]);
31483156 if (!MTK_HAS_CAPS (soc -> caps , MTK_SRAM ) && eth -> scratch_ring ) {
31493157 dma_free_coherent (eth -> dma_dev ,
31503158 MTK_QDMA_RING_SIZE * soc -> tx .desc_size ,
You can’t perform that action at this time.
0 commit comments