All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 1/2] pch_can: Stop netif queue if last message buffer is filled
@ 2012-02-21 16:00 Alexander Stein
  2012-02-21 16:00 ` [PATCH 2/2] pch_can: (re)start Tx queue at first entry Alexander Stein
  2012-02-21 16:25 ` [PATCH 1/2] pch_can: Stop netif queue if last message buffer is filled Wolfgang Grandegger
  0 siblings, 2 replies; 7+ messages in thread
From: Alexander Stein @ 2012-02-21 16:00 UTC (permalink / raw)
  To: Wolfgang Grandegger, Marc Kleine-Budde; +Cc: linux-can, Alexander Stein

If all Tx buffers are empty and we start queuing frames (more than Tx
buffer size) beginning at the last message buffer we will override the
first inserted entry if it doesn't get sent meanwhile, e.g. low priority
or ACK error. There is no stop condition when all buffers are used.
We will get get awoken by pch_can_tx_complete when the last entry is sent.

Signed-off-by: Alexander Stein <alexander.stein@systec-electronic.com>
---
 drivers/net/can/pch_can.c |    4 +---
 1 files changed, 1 insertions(+), 3 deletions(-)

diff --git a/drivers/net/can/pch_can.c b/drivers/net/can/pch_can.c
index 6edc25e..3af5341 100644
--- a/drivers/net/can/pch_can.c
+++ b/drivers/net/can/pch_can.c
@@ -903,9 +903,7 @@ static netdev_tx_t pch_xmit(struct sk_buff *skb, struct net_device *ndev)
 
 	tx_obj_no = priv->tx_obj;
 	if (priv->tx_obj == PCH_TX_OBJ_END) {
-		if (ioread32(&priv->regs->treq2) & PCH_TREQ2_TX_MASK)
-			netif_stop_queue(ndev);
-
+		netif_stop_queue(ndev);
 		priv->tx_obj = PCH_TX_OBJ_START;
 	} else {
 		priv->tx_obj++;
-- 
1.7.3.4


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

end of thread, other threads:[~2012-02-22 13:05 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-02-21 16:00 [PATCH 1/2] pch_can: Stop netif queue if last message buffer is filled Alexander Stein
2012-02-21 16:00 ` [PATCH 2/2] pch_can: (re)start Tx queue at first entry Alexander Stein
2012-02-21 16:25 ` [PATCH 1/2] pch_can: Stop netif queue if last message buffer is filled Wolfgang Grandegger
2012-02-21 16:30   ` Alexander Stein
2012-02-22 10:58     ` Wolfgang Grandegger
2012-02-22 11:11       ` Bhupesh SHARMA
2012-02-22 13:05         ` Wolfgang Grandegger

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.