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 @@ -3186,11 +3186,19 @@ static int mtk_dma_init(struct mtk_eth *eth)
3186
3186
static void mtk_dma_free (struct mtk_eth * eth )
3187
3187
{
3188
3188
const struct mtk_soc_data * soc = eth -> soc ;
3189
- int i ;
3189
+ int i , j , txqs = 1 ;
3190
+
3191
+ if (MTK_HAS_CAPS (eth -> soc -> caps , MTK_QDMA ))
3192
+ txqs = MTK_QDMA_NUM_QUEUES ;
3193
+
3194
+ for (i = 0 ; i < MTK_MAX_DEVS ; i ++ ) {
3195
+ if (!eth -> netdev [i ])
3196
+ continue ;
3197
+
3198
+ for (j = 0 ; j < txqs ; j ++ )
3199
+ netdev_tx_reset_subqueue (eth -> netdev [i ], j );
3200
+ }
3190
3201
3191
- for (i = 0 ; i < MTK_MAX_DEVS ; i ++ )
3192
- if (eth -> netdev [i ])
3193
- netdev_reset_queue (eth -> netdev [i ]);
3194
3202
if (!MTK_HAS_CAPS (soc -> caps , MTK_SRAM ) && eth -> scratch_ring ) {
3195
3203
dma_free_coherent (eth -> dma_dev ,
3196
3204
MTK_QDMA_RING_SIZE * soc -> tx .desc_size ,
You can’t perform that action at this time.
0 commit comments