On Wed, Dec 21, 2022 at 7:12 PM Felix Fietkau <nbd@xxxxxxxx> wrote: > > Thanks! I guess I focused on the wrong part of your kernel log > initially. After more code review, I found that there is in fact a DMA > related bug in the commit that your bisection pointed to, which happened > to uncover and trigger the deadlock fixed by my other patch. > > So here's my fix for the DMA issue: > --- [cutted] > qbuf.skip_unmap = false; > - if (mt76_dma_add_buf(dev, q, &qbuf, 1, 0, buf, t) < 0) { > + if (mt76_dma_add_rx_buf(dev, q, &qbuf, buf) < 0) { > dma_unmap_single(dev->dma_dev, addr, len, > DMA_FROM_DEVICE); > skb_free_frag(buf); > Sorry for stupid question. Do you have a separate branch? I see that the code is differ between master branch and the patch. For example in patch the line: - if (mt76_dma_add_buf(dev, q, &qbuf, 1, 0, buf, t) < 0) { replaced by the line: + if (mt76_dma_add_rx_buf(dev, q, &qbuf, buf) < 0) { But in master branch https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/drivers/net/wireless/mediatek/mt76/dma.c?id=b6bb9676f2165d518b35ba3bea5f1fcfc0d969bf#n604 after line: qbuf.skip_unmap = false; followed the line: mt76_dma_add_buf(dev, q, &qbuf, 1, 0, buf, t); without if condition. So I'm stuck applying the patch :( -- Best Regards, Mike Gavrilov.