From a1572e0ab0f5fab9a1f0185ded593bec811aa175 Mon Sep 17 00:00:00 2001 From: Alexey Zaytsev Date: Sun, 2 Mar 2008 03:41:10 +0300 Subject: Modify gPXE core and drivers to work with the new timer subsystem Signed-off-by: Alexey Zaytsev --- src/drivers/net/3c90x.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'src/drivers/net/3c90x.c') diff --git a/src/drivers/net/3c90x.c b/src/drivers/net/3c90x.c index 8e1f160ea..8158239d6 100644 --- a/src/drivers/net/3c90x.c +++ b/src/drivers/net/3c90x.c @@ -43,7 +43,6 @@ #include "nic.h" #include #include -#include "timer.h" static struct nic_operations a3c90x_operations; @@ -498,6 +497,7 @@ a3c90x_transmit(struct nic *nic __unused, const char *d, unsigned int t, unsigned char status; unsigned i, retries; + tick_t ct; for (retries=0; retries < XMIT_RETRIES ; retries++) { @@ -540,9 +540,10 @@ a3c90x_transmit(struct nic *nic __unused, const char *d, unsigned int t, ; /** Wait for NIC Transmit to Complete **/ - load_timer2(10*TICKS_PER_MS); /* Give it 10 ms */ + ct = currticks(); + while (!(inw(INF_3C90X.IOAddr + regCommandIntStatus_w)&0x0004) && - timer2_running()) + ct + 10*USECS_IN_MSEC < currticks()); ; if (!(inw(INF_3C90X.IOAddr + regCommandIntStatus_w)&0x0004)) -- cgit v1.2.3-55-g7522