netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] isa-skelton: Remove a wrong netif_wake_queue() call
@ 2010-02-24 16:00 Atsushi Nemoto
  2010-02-26  9:51 ` David Miller
  2010-02-26 17:03 ` Jeff Garzik
  0 siblings, 2 replies; 4+ messages in thread
From: Atsushi Nemoto @ 2010-02-24 16:00 UTC (permalink / raw)
  To: netdev; +Cc: David Miller

The netif_wake_queue() is called correctly (i.e. only on !txfull
condition) from net_tx().  So Unconditional call to the
netif_wake_queue() here is wrong.  This might cause calling of
start_xmit routine on txfull state and trigger tx-ring overflow.

This fix is ported from commit 662a96bd6f020782dfbdc0d0bd177c7dbb556687.

Signed-off-by: Atsushi Nemoto <anemo@mba.ocn.ne.jp>
---
 drivers/net/isa-skeleton.c |    1 -
 1 files changed, 0 insertions(+), 1 deletions(-)

diff --git a/drivers/net/isa-skeleton.c b/drivers/net/isa-skeleton.c
index 04d0502..3f33c90 100644
--- a/drivers/net/isa-skeleton.c
+++ b/drivers/net/isa-skeleton.c
@@ -536,7 +536,6 @@ static irqreturn_t net_interrupt(int irq, void *dev_id)
 		/* Transmit complete. */
 		net_tx(dev);
 		np->stats.tx_packets++;
-		netif_wake_queue(dev);
 	}
 #endif
 	if (status & COUNTERS_INTR) {
-- 
1.5.6.5


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

* Re: [PATCH] isa-skelton: Remove a wrong netif_wake_queue() call
  2010-02-24 16:00 [PATCH] isa-skelton: Remove a wrong netif_wake_queue() call Atsushi Nemoto
@ 2010-02-26  9:51 ` David Miller
  2010-02-26 16:13   ` Atsushi Nemoto
  2010-02-26 17:03 ` Jeff Garzik
  1 sibling, 1 reply; 4+ messages in thread
From: David Miller @ 2010-02-26  9:51 UTC (permalink / raw)
  To: anemo; +Cc: netdev

From: Atsushi Nemoto <anemo@mba.ocn.ne.jp>
Date: Thu, 25 Feb 2010 01:00:17 +0900

> The netif_wake_queue() is called correctly (i.e. only on !txfull
> condition) from net_tx().  So Unconditional call to the
> netif_wake_queue() here is wrong.  This might cause calling of
> start_xmit routine on txfull state and trigger tx-ring overflow.
> 
> This fix is ported from commit 662a96bd6f020782dfbdc0d0bd177c7dbb556687.
> 
> Signed-off-by: Atsushi Nemoto <anemo@mba.ocn.ne.jp>

Applied.

Please reference commits by also making mention of the commit
log message header line.  This way when a patch is backported
into another tree, people can still find it even if the
SHA1 ID is different.  For exmaple, I fixed the above to
read:

    This fix is ported from commit 662a96bd6f020782dfbdc0d0bd177c7dbb556687
    ("tc35815: Remove a wrong netif_wake_queue() call which triggers BUG_ON").

Thanks.

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

* Re: [PATCH] isa-skelton: Remove a wrong netif_wake_queue() call
  2010-02-26  9:51 ` David Miller
@ 2010-02-26 16:13   ` Atsushi Nemoto
  0 siblings, 0 replies; 4+ messages in thread
From: Atsushi Nemoto @ 2010-02-26 16:13 UTC (permalink / raw)
  To: davem; +Cc: netdev

On Fri, 26 Feb 2010 01:51:38 -0800 (PST), David Miller <davem@davemloft.net> wrote:
> Please reference commits by also making mention of the commit
> log message header line.  This way when a patch is backported
> into another tree, people can still find it even if the
> SHA1 ID is different.  For exmaple, I fixed the above to
> read:
> 
>     This fix is ported from commit 662a96bd6f020782dfbdc0d0bd177c7dbb556687
>     ("tc35815: Remove a wrong netif_wake_queue() call which triggers BUG_ON").

Yes, I will do so next time.  Thank you.

---
Atsushi Nemoto

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

* Re: [PATCH] isa-skelton: Remove a wrong netif_wake_queue() call
  2010-02-24 16:00 [PATCH] isa-skelton: Remove a wrong netif_wake_queue() call Atsushi Nemoto
  2010-02-26  9:51 ` David Miller
@ 2010-02-26 17:03 ` Jeff Garzik
  1 sibling, 0 replies; 4+ messages in thread
From: Jeff Garzik @ 2010-02-26 17:03 UTC (permalink / raw)
  To: Atsushi Nemoto; +Cc: netdev, David Miller

On 02/24/2010 11:00 AM, Atsushi Nemoto wrote:
> The netif_wake_queue() is called correctly (i.e. only on !txfull
> condition) from net_tx().  So Unconditional call to the
> netif_wake_queue() here is wrong.  This might cause calling of
> start_xmit routine on txfull state and trigger tx-ring overflow.
>
> This fix is ported from commit 662a96bd6f020782dfbdc0d0bd177c7dbb556687.
>
> Signed-off-by: Atsushi Nemoto<anemo@mba.ocn.ne.jp>
> ---
>   drivers/net/isa-skeleton.c |    1 -
>   1 files changed, 0 insertions(+), 1 deletions(-)
>
> diff --git a/drivers/net/isa-skeleton.c b/drivers/net/isa-skeleton.c
> index 04d0502..3f33c90 100644
> --- a/drivers/net/isa-skeleton.c
> +++ b/drivers/net/isa-skeleton.c
> @@ -536,7 +536,6 @@ static irqreturn_t net_interrupt(int irq, void *dev_id)
>   		/* Transmit complete. */
>   		net_tx(dev);
>   		np->stats.tx_packets++;
> -		netif_wake_queue(dev);
>   	}
>   #endif

I would suggest deleting this "driver" entirely...  Any new drivers 
remotely like ISA would use the platform API and look more like a PCI 
driver.

	Jeff




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

end of thread, other threads:[~2010-02-26 17:03 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-02-24 16:00 [PATCH] isa-skelton: Remove a wrong netif_wake_queue() call Atsushi Nemoto
2010-02-26  9:51 ` David Miller
2010-02-26 16:13   ` Atsushi Nemoto
2010-02-26 17:03 ` Jeff Garzik

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).