Re: Re: [Etherboot-users] Sporadic eepro(10) RX problems after reboot
Marty Connor <[email protected]>
| Newsgroups | gmane.network.etherboot.devel |
|---|---|
| Message-ID | <[email protected]> |
On Apr 23, 2005, at 9:05 AM, Timothy Legge wrote:
> That is interesting to know. I fixed relocation in a lot of the
> drivers, but I never had a eepro to try. This is the first report we
> have had (to my knowledge) about this driver.
>
>> BTW: one change I noted was the introduction of 'virt_to_bus' and
>> 'bus_to_virt'
>
> Did you try removing them? Some of the older cards just worked when
> relocation was introduced without changes. I don't think anyone would
> have made changes without testing the driver but I am not sure.
I dug through my card collection and find that I have a few eepro
cards. I can verify that 5.0.10 works and 5.4.0 does not. Transmit
works, but receive does not get back any data.
I looked at the driver, and I'm pretty sure that it's a relocation
issue.
Till: in order to do relocation in i386 we use magic virt_to_bus
macros that may seem like noops, but in places like:
static void
natsemi_init_txd(struct nic *nic __unused)
{
txd.link = (u32) 0;
txd.cmdsts = (u32) 0;
txd.bufptr = virt_to_bus(&txb[0]);
/* load Transmit Descriptor Register */
outl(virt_to_bus(&txd), ioaddr + TxRingPtr);
if (natsemi_debug > 1)
printf("natsemi_init_txd: TX descriptor register loaded
with: %X\n",
inl(ioaddr + TxRingPtr));
}
I don't fully understand the Etherboot relocation internals, but
basically if you want to pass an address to a function in a driver you
need to wrap that address in virt_to_bus(), otherwise the address that
gets passed will be wrong. Maybe someone else can give a better
explanation.
Relocation allows us to have Etherboot code be larger than 64K, with
just a little extra coding work.
> BTW, if you have an extra card that you would like to send me I can
> try to fix the issue in 5.4.
It turns out that I have 3 eepro cards, and would be happy to send you
one. Just email me your postal address off-list.
Marty
-------------------------------------------------------
SF email is sponsored by - The IT Product Guide
Read honest & candid reviews on hundreds of IT Products from real users.
Discover which products truly live up to the hype. Start reading now.
http://ads.osdn.com/?ad_id=6595&alloc_id=14396&op=click