Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 294628c1 authored by David S. Miller's avatar David S. Miller
Browse files

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: default avatarDavid S. Miller <davem@davemloft.net>
parents 5b9f5751 185aceef
Loading
Loading
Loading
Loading
+8 −3
Original line number Diff line number Diff line
@@ -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);