[Etherboot-developers] Re: [Etherboot-users] RTL8139 EEPROM (SOLVED)
Brought to you by:
marty_connor,
stefanhajnoczi
|
From: Tania O. <ta...@ce...> - 2001-04-04 05:45:47
|
Hello
I solved my problem of not being able to receive packets via the RTL8139C on our
custom board. I needed a delay before calling the rtl8139_probe() routine. I'm
not sure exactly why this is, except I think it is probably specific to my
system. I have an extremely minimal BIOS and consequently the time from power-on
to when the rtl8139_probe() routine is called is much shorter than on a typical
PC.
I still haven't figured out why it worked without the delay if the EEPROM was
blank (all 0xffff). If anyone who knows this chip well has a theory I'd be
interested in hearing it.
Incidentally, while I was checking all sorts of things, I found a couple of
small things in the driver that didn't look right. I'll mention them here in
case they may be important to someone, but since everything works ok as it is I
wouldn't worry about them otherwise. (These comments apply to rtl8139.c in
Etherboot 4.7.20, please ignore if they have already been fixed).
1. The write to Config1 (register offset 0x52) in rtl8139_probe() under the
comment "Bring the chip out of low-power mode" probably is not having any effect
since bits EEM1-0 in Cfg9346 (register offset 0x50) need to be set first to
unlock the Config1 register for write.
2. The MultiIntr register (offset 0x5C) should be cleared, according to the
RTL8139C data sheet.
One other thing. I needed to reset the chip in rtl_disable(), which originally
was empty. Without doing this I got "Unable to handle kernel paging request"
panics when booting Linux after Etherboot. I had USE_INTERNAL_BUFFER defined.
The following code (just copied from elsewhere in the driver) worked for me:
static void rtl_disable(struct nic *nic)
{
int i;
/* disable TX/RX */
outb(0x00, ioaddr + ChipCmd);
/* reset the chip */
outb(CmdReset, ioaddr + ChipCmd);
cur_rx = 0;
cur_tx = 0;
/* Check that the chip has finished the reset. */
for (i = 1000; i > 0; i--)
if ((inb(ioaddr + ChipCmd) & CmdReset) == 0) {
break;
}
}
Cheers,
Tania
Ken Yap wrote:
> Some of the bytes in the EEPROM control the NIC's operation. Could some
> of them have an adverse effect on reception? You'd need a 8129
> datasheet.
|