mirror of
https://github.com/torvalds/linux.git
synced 2024-12-04 01:51:34 +00:00
rtw88: pci: release tx skbs DMAed when stop
Interrupt is disabled to stop PCI, which means the skbs queued for each TX ring will not be released via DMA interrupt. To avoid those skbs remained being left in the skb queue until PCI has been removed, driver needs to release skbs by itself. Signed-off-by: Yan-Hsuan Chuang <yhchuang@realtek.com> Reviewed-by: Brian Norris <briannorris@chromium.org> Tested-by: Brian Norris <briannorris@chromium.org> Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
This commit is contained in:
parent
dc579ca5cf
commit
0e41edcdfe
@ -500,6 +500,17 @@ static void rtw_pci_dma_reset(struct rtw_dev *rtwdev, struct rtw_pci *rtwpci)
|
||||
rtwpci->rx_tag = 0;
|
||||
}
|
||||
|
||||
static void rtw_pci_dma_release(struct rtw_dev *rtwdev, struct rtw_pci *rtwpci)
|
||||
{
|
||||
struct rtw_pci_tx_ring *tx_ring;
|
||||
u8 queue;
|
||||
|
||||
for (queue = 0; queue < RTK_MAX_TX_QUEUE_NUM; queue++) {
|
||||
tx_ring = &rtwpci->tx_rings[queue];
|
||||
rtw_pci_free_tx_ring_skbs(rtwdev, tx_ring);
|
||||
}
|
||||
}
|
||||
|
||||
static int rtw_pci_start(struct rtw_dev *rtwdev)
|
||||
{
|
||||
struct rtw_pci *rtwpci = (struct rtw_pci *)rtwdev->priv;
|
||||
@ -521,6 +532,7 @@ static void rtw_pci_stop(struct rtw_dev *rtwdev)
|
||||
|
||||
spin_lock_irqsave(&rtwpci->irq_lock, flags);
|
||||
rtw_pci_disable_interrupt(rtwdev, rtwpci);
|
||||
rtw_pci_dma_release(rtwdev, rtwpci);
|
||||
spin_unlock_irqrestore(&rtwpci->irq_lock, flags);
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user