netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] atarilance: timeout ignored in lance_open()
@ 2009-12-27 13:26 Roel Kluin
  2010-01-04  5:43 ` David Miller
  0 siblings, 1 reply; 4+ messages in thread
From: Roel Kluin @ 2009-12-27 13:26 UTC (permalink / raw)
  To: netdev, Andrew Morton, LKML

With `while (--i > 0)' i reaches 0 after the loop, so upon timeout the
error was not issued.

Signed-off-by: Roel Kluin <roel.kluin@gmail.com>
---
 drivers/net/atarilance.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/drivers/net/atarilance.c b/drivers/net/atarilance.c
index c5721cb..cc9ed86 100644
--- a/drivers/net/atarilance.c
+++ b/drivers/net/atarilance.c
@@ -663,7 +663,7 @@ static int lance_open( struct net_device *dev )
 	while (--i > 0)
 		if (DREG & CSR0_IDON)
 			break;
-	if (i < 0 || (DREG & CSR0_ERR)) {
+	if (i <= 0 || (DREG & CSR0_ERR)) {
 		DPRINTK( 2, ( "lance_open(): opening %s failed, i=%d, csr0=%04x\n",
 					  dev->name, i, DREG ));
 		DREG = CSR0_STOP;

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

* [PATCH] atarilance: timeout ignored in lance_open()
@ 2009-12-27 13:28 Roel Kluin
  2009-12-27 14:09 ` Roel Kluin
  0 siblings, 1 reply; 4+ messages in thread
From: Roel Kluin @ 2009-12-27 13:28 UTC (permalink / raw)
  To: netdev, Andrew Morton, LKML

With `while (--limit > 0)' i reaches 0 after the loop, so upon timeout the
error was not returned.

Signed-off-by: Roel Kluin <roel.kluin@gmail.com>
---
diff --git a/drivers/net/niu.c b/drivers/net/niu.c
index 8ce58c4..2aed2b3 100644
--- a/drivers/net/niu.c
+++ b/drivers/net/niu.c
@@ -2844,7 +2844,7 @@ static int tcam_wait_bit(struct niu *np, u64 bit)
 			break;
 		udelay(1);
 	}
-	if (limit < 0)
+	if (limit <= 0)
 		return -ENODEV;
 
 	return 0;

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

* Re: [PATCH] atarilance: timeout ignored in lance_open()
  2009-12-27 13:28 [PATCH] atarilance: timeout ignored in lance_open() Roel Kluin
@ 2009-12-27 14:09 ` Roel Kluin
  0 siblings, 0 replies; 4+ messages in thread
From: Roel Kluin @ 2009-12-27 14:09 UTC (permalink / raw)
  To: Roel Kluin; +Cc: netdev, Andrew Morton, LKML

Op 27-12-09 14:28, Roel Kluin schreef:
> With `while (--limit > 0)' i reaches 0 after the loop, so upon timeout the
> error was not returned.
> 
> Signed-off-by: Roel Kluin <roel.kluin@gmail.com>
> ---
> diff --git a/drivers/net/niu.c b/drivers/net/niu.c

Oops, forgot to update the subject, please ignore, I'll send another.

Roel

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

* Re: [PATCH] atarilance: timeout ignored in lance_open()
  2009-12-27 13:26 Roel Kluin
@ 2010-01-04  5:43 ` David Miller
  0 siblings, 0 replies; 4+ messages in thread
From: David Miller @ 2010-01-04  5:43 UTC (permalink / raw)
  To: roel.kluin; +Cc: netdev, akpm, linux-kernel

From: Roel Kluin <roel.kluin@gmail.com>
Date: Sun, 27 Dec 2009 14:26:12 +0100

> With `while (--i > 0)' i reaches 0 after the loop, so upon timeout the
> error was not issued.
> 
> Signed-off-by: Roel Kluin <roel.kluin@gmail.com>

Applied.

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

end of thread, other threads:[~2010-01-04  5:43 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-12-27 13:28 [PATCH] atarilance: timeout ignored in lance_open() Roel Kluin
2009-12-27 14:09 ` Roel Kluin
  -- strict thread matches above, loose matches on Subject: below --
2009-12-27 13:26 Roel Kluin
2010-01-04  5:43 ` 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).