[openbeosnetteam] Re: Realtek 8139 Driver

  • From: "Axel Dörfler" <axeld@xxxxxxxxxxxxxxxx>
  • To: openbeosnetteam@xxxxxxxxxxxxx
  • Date: Thu, 12 Jun 2003 04:02:51 +0200 CEST

"Niels Reedijk" <n.reedijk@xxxxxxxxx> wrote:
> ...
> To be frank: I have completely forgotten to finish that (but it 
> shoudn't
> be a large problem though). It's something that needs to go to the 
> file. The reason it isn't finished, is because I can't even receive 
> the
> first packets normally, so there's little use in perfecting the whole
> thing already. 

Doesn't have to be perfect, but if you've issues with the current 
implementation, you should sort them out first - maybe they are 
responsible for your problems.

> > I notice, too, that both NewOS rtl8139.c driver (which, 
> > unfortunatly
> > for you, is no more
> > present in our CVS and as NewOS source depot seem unavailable these
> > days... bad luck)

I still have a copy of that around when he needs it. I am a bit 
surprised that you didn't just port that driver, that would have been 
far easier and not so time consuming.

> > and NetBSD rtl81x9.c drivers disable chip interrupts by writing 0 
> > to
> > IMR register at start of the interrupt handler,
> > and re-enable them at exit.
> > Maybe it's a good design to follow?
> If I spinlock the whole interrupt handler, it shouldn't be 
> interrupted,
> right? I don't think it is necessary to do so.

Sure you won't get interrupted, but it depends on the chip; maybe there 
are some issues with this - in drivers, nothing happens for no reason, 
it's a bit black magic to get it to work when the hardware has flaws 
(and unfortunately, every piece of hardware seem to have those, like 
everything else) :-)

> I remember I first wrote oxFF to the ISR but that didn't work, it 
> didn't
> clear the ISR. However, the main reason is that if such an 
> unimplemented
> interrupt occurred, I'd notice and implement them as well. But with 
> the
> driver now (perhaps) reaching a wider audience, it may be wise to fix
> this behaviour.

Alway :-)

> > I'll create a new rtl8139 directoy to host your driver in the next
> > hours or days, depends on son noise level :-p
> Thanks a million. I will send any updated files to you too. 

For now yes, but please use CVS directly once you got an account - 
that's the purpose of it, even if you don't like it now. It might never 
again be so easy to get write access to our repository, don't play with 
it ;-)


Other related posts: