||static void rtl_disable(struct nic *nic)
||{
|| int i;
||
|| /* reset the chip */
|| outb(CmdReset, ioaddr + ChipCmd);
||
|| /* Check that the chip has finished the reset. */
|| for (i = 1000; i > 0; i--)
|| if ((inb(ioaddr + ChipCmd) & CmdReset) == 0)
|| break;
||}
Actually I would make that:
static void rtl_disable(struct nic *nic)
{
/* reset the chip */
outb(CmdReset, ioaddr + ChipCmd);
/* 10 ms timeout */
load_timer2(10*TICKS_PER_MS);
while ((inb(ioaddr + ChipCmd) & CmdReset) != 0 && timer2_running())
/* wait */;
}
and add #include "timer.h" near the top. The hardware timer is more
consistent than a counting loop.
_______________________________________________
Etherboot-users mailing list
Eth...@li...
http://lists.sourceforge.net/lists/listinfo/etherboot-users
|