mirror of
https://github.com/rd-stuffs/msm-4.14.git
synced 2025-02-20 11:45:48 +08:00
Merge branch 'alx-mq-fixes'
Tobias Regnery says: ==================== alx: fix fallout from multi queue conversion Here are 3 fixes for the multi queue conversion in v4.10. The first patch fixes a wrong condition in an if statement. Patches 2 and 3 fixes regressions in the corner case when requesting msi-x interrupts fails and we fall back to msi or legacy interrupts. ==================== Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
commit
294628c1fe
@ -685,8 +685,6 @@ static int alx_alloc_rings(struct alx_priv *alx)
|
||||
return -ENOMEM;
|
||||
}
|
||||
|
||||
alx_reinit_rings(alx);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
@ -703,7 +701,7 @@ static void alx_free_rings(struct alx_priv *alx)
|
||||
if (alx->qnapi[0] && alx->qnapi[0]->rxq)
|
||||
kfree(alx->qnapi[0]->rxq->bufs);
|
||||
|
||||
if (!alx->descmem.virt)
|
||||
if (alx->descmem.virt)
|
||||
dma_free_coherent(&alx->hw.pdev->dev,
|
||||
alx->descmem.size,
|
||||
alx->descmem.virt,
|
||||
@ -984,6 +982,7 @@ static int alx_realloc_resources(struct alx_priv *alx)
|
||||
alx_free_rings(alx);
|
||||
alx_free_napis(alx);
|
||||
alx_disable_advanced_intr(alx);
|
||||
alx_init_intr(alx, false);
|
||||
|
||||
err = alx_alloc_napis(alx);
|
||||
if (err)
|
||||
@ -1241,6 +1240,12 @@ static int __alx_open(struct alx_priv *alx, bool resume)
|
||||
if (err)
|
||||
goto out_free_rings;
|
||||
|
||||
/* must be called after alx_request_irq because the chip stops working
|
||||
* if we copy the dma addresses in alx_init_ring_ptrs twice when
|
||||
* requesting msi-x interrupts failed
|
||||
*/
|
||||
alx_reinit_rings(alx);
|
||||
|
||||
netif_set_real_num_tx_queues(alx->dev, alx->num_txq);
|
||||
netif_set_real_num_rx_queues(alx->dev, alx->num_rxq);
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user