Message ID | 54dc821bf69fe8e7ae017f221069a4f41ae37893.1590260648.git.sean.wang@mediatek.com (mailing list archive) |
---|---|
State | Superseded |
Delegated to: | Felix Fietkau |
Headers | show |
Series | mt76: fix BUG: spinlock bad magic in mt76_dma_init | expand |
On 2020-05-24 12:14, sean.wang@mediatek.com wrote: > From: Sean Wang <sean.wang@mediatek.com> > > dma init should be done when dma have been allocated This fix seems incomplete to me. I've sent a replacement patch, please take a look. Thanks, - Felix
diff --git a/drivers/net/wireless/mediatek/mt76/dma.c b/drivers/net/wireless/mediatek/mt76/dma.c index 75e659774e07..eca39799f050 100644 --- a/drivers/net/wireless/mediatek/mt76/dma.c +++ b/drivers/net/wireless/mediatek/mt76/dma.c @@ -576,7 +576,7 @@ mt76_dma_init(struct mt76_dev *dev) init_dummy_netdev(&dev->napi_dev); - for (i = 0; i < ARRAY_SIZE(dev->q_rx); i++) { + for (i = 0; i < ARRAY_SIZE(dev->q_rx) && dev->q_rx[i].desc; i++) { netif_napi_add(&dev->napi_dev, &dev->napi[i], mt76_dma_rx_poll, 64); mt76_dma_rx_fill(dev, &dev->q_rx[i]);