Page 1 of 1
IRQ Issues.
Posted: Wed Oct 24, 2007 10:14 pm
by 01000101
Recently I decided to switch my network driver from a polling system to an interrupt based method. Just to tell everyone right off, the only IRQ assignment I've done so far is for the keyboard, and even that I didnt fully understand.
I believe I have everything setup correctly for the card, but for some reason it doesnt see the interrupt when packets come in. I got the irq number from the PCI bios when I enumerated the devices. Is that the correct place? should I be getting the number from the card itself? its a rtl8139 chipset Realtek PCI card btw.
I guess I just need general help in setting up IRQ_Handlers.
Posted: Thu Oct 25, 2007 12:16 am
by pcmattman
Well, firstly, you need to tell the card to interrupt when a new packet arrives. I'm not 100% sure how to do that (but this might help:
my driver, look at the ne2k stuff, which is the same chipset).
Also, I'd suggest learning how to setup IRQs (we can help, if you want us to) so that you can be better prepared for future drivers.
irq
Posted: Thu Oct 25, 2007 12:21 am
by gmoney
goto osdever.net and look at the brians osdev. there's a irq handler you may want to look at.
Posted: Thu Oct 25, 2007 8:06 am
by neon
goto osdever.net
goto's are evil, dont use them
Nontheless, Brians tutorial has what you are looking for.
Posted: Thu Oct 25, 2007 8:09 am
by 01000101
lol, yes goto's are indeed evil.
Thank you all for the help and references, I shall look at those links a bit later, once I have more time to code.
Posted: Thu Oct 25, 2007 7:14 pm
by 01000101
Thanks for the references, I finally got to check the drivers out. also, I did not see a 'brians ' IRQ tutorial on osdever.net.
I guess I just need a abstract explanation of a network cards IRQ phase.
Posted: Thu Oct 25, 2007 8:15 pm
by Brynet-Inc
His name is Brandon, His article was called "Bran's Kernel Development Tutorial".
It's several years old... and it has a few bugs..
Posted: Fri Oct 26, 2007 1:29 am
by JamesM
I really hope noone is getting sick of me posting my own links, but I feel you might benefit from it:
http://www.jamesmolloy.co.uk/tutorial_h ... 20PIT.html
Similar to Bran's, but written in a different style.