[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20101025.130513.102558756.davem@davemloft.net>
Date: Mon, 25 Oct 2010 13:05:13 -0700 (PDT)
From: David Miller <davem@...emloft.net>
To: andi@...stfloor.org
Cc: netdev@...r.kernel.org
Subject: Re: __bad_udelay in network driver breaks build
From: Andi Kleen <andi@...stfloor.org>
Date: Mon, 18 Oct 2010 13:52:30 +0200
>
> Current Linus master x86-64 allyesconfig fails with
>
> drivers/built-in.o: In function `tms380tr_chipset_init':
> tms380tr.c:(.text+0x10f02de): undefined reference to `__bad_udelay'
> tms380tr.c:(.text+0x10f03ab): undefined reference to `__bad_udelay'
> tms380tr.c:(.text+0x10f0400): undefined reference to `__bad_udelay'
> tms380tr.c:(.text+0x10f07b2): undefined reference to `__bad_udelay'
> tms380tr.c:(.text+0x10f08ed): undefined reference to `__bad_udelay'
> make[2]: *** [.tmp_vmlinux1] Error 1
Let me know if this fixes things:
--------------------
tms380tr: Use mdelay() in tms380tr_wait().
This driver tries to do up to half-second udelay()
calls, which overflows on x86-64.
Reported-by: Andi Kleen <andi@...stfloor.org>
Signed-off-by: David S. Miller <davem@...emloft.net>
---
drivers/net/tokenring/tms380tr.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/drivers/net/tokenring/tms380tr.c b/drivers/net/tokenring/tms380tr.c
index 663b886..7930203 100644
--- a/drivers/net/tokenring/tms380tr.c
+++ b/drivers/net/tokenring/tms380tr.c
@@ -1220,7 +1220,7 @@ void tms380tr_wait(unsigned long time)
tmp = schedule_timeout_interruptible(tmp);
} while(time_after(tmp, jiffies));
#else
- udelay(time);
+ mdelay(time / 1000);
#endif
}
--
1.7.3.2
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Powered by blists - more mailing lists