mirror of
https://github.com/torvalds/linux.git
synced 2026-06-02 03:24:19 +02:00
rtw88: pci: reset H2C queue indexes in a single write
If the driver doesn't reset the host's and device's indexes in a single write, the indexes will become different in a short period. And it will confuse the DMA engine, make it start to process non-existed entries. Better to Write-1-to-reset the indexes, for the DMA engine to know that this is a reset of the H2C queue, not a kick off. Signed-off-by: Yan-Hsuan Chuang <yhchuang@realtek.com> Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
This commit is contained in:
parent
3c51960585
commit
6f0b0d28fd
|
|
@ -457,9 +457,9 @@ static void rtw_pci_reset_buf_desc(struct rtw_dev *rtwdev)
|
|||
/* reset read/write point */
|
||||
rtw_write32(rtwdev, RTK_PCI_TXBD_RWPTR_CLR, 0xffffffff);
|
||||
|
||||
/* rest H2C Queue index */
|
||||
rtw_write32_set(rtwdev, RTK_PCI_TXBD_H2CQ_CSR, BIT_CLR_H2CQ_HOST_IDX);
|
||||
rtw_write32_set(rtwdev, RTK_PCI_TXBD_H2CQ_CSR, BIT_CLR_H2CQ_HW_IDX);
|
||||
/* reset H2C Queue index in a single write */
|
||||
rtw_write32_set(rtwdev, RTK_PCI_TXBD_H2CQ_CSR,
|
||||
BIT_CLR_H2CQ_HOST_IDX | BIT_CLR_H2CQ_HW_IDX);
|
||||
}
|
||||
|
||||
static void rtw_pci_reset_trx_ring(struct rtw_dev *rtwdev)
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user