ChipCmd
outl(ChipReset, ioaddr + ChipCmd);
outl(RxOn, ioaddr + ChipCmd);
outl(ChipReset, ioaddr + ChipCmd);
outl(TxOff, ioaddr + ChipCmd);
outl(TxOn, ioaddr + ChipCmd);
outl(RxOn, ioaddr + ChipCmd);
outl(RxOff | TxOff, ioaddr + ChipCmd);
RTL_W8(ChipCmd, CmdReset);
if ((RTL_R8(ChipCmd) & CmdReset) == 0)
RTL_W8(ChipCmd, CmdReset);
if ((RTL_R8(ChipCmd) & CmdReset) == 0)
RTL_W8(ChipCmd, CmdTxEnb | CmdRxEnb);
RTL_W8(ChipCmd, 0x00);
outb(CmdReset, nic->ioaddr + ChipCmd);
while ((inb(nic->ioaddr + ChipCmd) & CmdReset) != 0 &&
outb(CmdRxEnb | CmdTxEnb, nic->ioaddr + ChipCmd);
outb(CmdRxEnb | CmdTxEnb, nic->ioaddr + ChipCmd);
if (inb(nic->ioaddr + ChipCmd) & RxBufEmpty) {
outb(CmdReset, nic->ioaddr + ChipCmd);
while ((inb(nic->ioaddr + ChipCmd) & CmdReset) != 0 && timer2_running())