linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH net-next 1/3] net: mvpp2: avoid checking for free aggregated descriptors twice
@ 2018-02-26 14:14 Antoine Tenart
  2018-02-26 14:14 ` [PATCH net-next 2/3] net: mvpp2: adjust gso stop wake thresholds Antoine Tenart
  2018-02-26 14:14 ` [PATCH net-next 3/3] net: mvpp2: align the ethtool ops definition Antoine Tenart
  0 siblings, 2 replies; 8+ messages in thread
From: Antoine Tenart @ 2018-02-26 14:14 UTC (permalink / raw)
  To: davem
  Cc: Yan Markman, mw, stefanc, thomas.petazzoni, gregory.clement,
	miquel.raynal, nadavh, maxime.chevallier, netdev, linux-kernel,
	Antoine Tenart

From: Yan Markman <ymarkman@marvell.com>

Avoid repeating the check for free aggregated descriptors when it
already failed at the beginning of the function.

Signed-off-by: Yan Markman <ymarkman@marvell.com>
[Antoine: commit message]
Signed-off-by: Antoine Tenart <antoine.tenart@bootlin.com>
---
 drivers/net/ethernet/marvell/mvpp2.c | 7 +++----
 1 file changed, 3 insertions(+), 4 deletions(-)

diff --git a/drivers/net/ethernet/marvell/mvpp2.c b/drivers/net/ethernet/marvell/mvpp2.c
index 5a1668cdb461..55300b1fe6c0 100644
--- a/drivers/net/ethernet/marvell/mvpp2.c
+++ b/drivers/net/ethernet/marvell/mvpp2.c
@@ -5224,11 +5224,10 @@ static int mvpp2_aggr_desc_num_check(struct mvpp2 *priv,
 		u32 val = mvpp2_read(priv, MVPP2_AGGR_TXQ_STATUS_REG(cpu));
 
 		aggr_txq->count = val & MVPP2_AGGR_TXQ_PENDING_MASK;
-	}
-
-	if ((aggr_txq->count + num) > MVPP2_AGGR_TXQ_SIZE)
-		return -ENOMEM;
 
+		if ((aggr_txq->count + num) > MVPP2_AGGR_TXQ_SIZE)
+			return -ENOMEM;
+	}
 	return 0;
 }
 
-- 
2.14.3

^ permalink raw reply related	[flat|nested] 8+ messages in thread
* [PATCH net-next 0/3] net: mvpp2: small improvements
@ 2018-05-17  8:34 Antoine Tenart
  2018-05-17  8:34 ` [PATCH net-next 1/3] net: mvpp2: avoid checking for free aggregated descriptors twice Antoine Tenart
  0 siblings, 1 reply; 8+ messages in thread
From: Antoine Tenart @ 2018-05-17  8:34 UTC (permalink / raw)
  To: davem
  Cc: Antoine Tenart, netdev, linux-kernel, thomas.petazzoni,
	maxime.chevallier, gregory.clement, miquel.raynal, nadavh,
	stefanc, ymarkman, mw

Hi all,

Those 3 patches are small improvements to the Marvell PPv2 driver. The
series does not conflict with the one sent about phylink and
1000/2500baseX support, so the two series can live in parallel.

Thanks!
Antoine

Yan Markman (3):
  net: mvpp2: avoid checking for free aggregated descriptors twice
  net: mvpp2: set mac address does not require the stop/start sequence
  net: mvpp2: print rx error with rate-limit

 drivers/net/ethernet/marvell/mvpp2.c | 59 +++++++++-------------------
 1 file changed, 18 insertions(+), 41 deletions(-)

-- 
2.17.0

^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2018-05-17 20:20 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-02-26 14:14 [PATCH net-next 1/3] net: mvpp2: avoid checking for free aggregated descriptors twice Antoine Tenart
2018-02-26 14:14 ` [PATCH net-next 2/3] net: mvpp2: adjust gso stop wake thresholds Antoine Tenart
2018-02-27 16:13   ` David Miller
2018-02-27 17:13     ` Antoine Tenart
2018-02-27 17:48       ` Yan Markman
2018-02-26 14:14 ` [PATCH net-next 3/3] net: mvpp2: align the ethtool ops definition Antoine Tenart
2018-05-17  8:34 [PATCH net-next 0/3] net: mvpp2: small improvements Antoine Tenart
2018-05-17  8:34 ` [PATCH net-next 1/3] net: mvpp2: avoid checking for free aggregated descriptors twice Antoine Tenart
2018-05-17 20:19   ` David Miller

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).