HELP & Q : Ethernet device driver

HELP & Q : Ethernet device driver

Post by joh jae chu » Thu, 16 Sep 1999 04:00:00



Hi, all.  Writing device driver without enough knowledge made my life
miserable...  Please enlighten me basic things I am missing :-)

I have been writing a customized device driver for 3c905B ethernet card on
2.0.36.  Cards are installed like this:

3c905B (on board) w/ IRQ 11, my driver
Intel EtherPro100 w/ IRQ 11, generic TCP/IP traffic
3c905B (on slot)  w/ IRQ 14, my driver

or

3c905B (on board) w/ IRQ 11, my driver
Intel EtherPro100 w/ IRQ 10, generic TCP/IP traffic
3c905B (on slot)  w/ IRQ 11, my driver

My driver uses fast interrupt (SA_INTERRUPT), and generic driver uses slow
interrupt of course. Do I have to move the slots so that all the devices
that share an interrupt use either fast interrupt or slow interrupt?  What
if I add more cards, and that cards (using my driver) use IRQ that is
already used by other devices with slow interrupt?

Hmm... Is it okey to fix IRQ (using dip switch or jumper, if there is) in
order to share interrupts for all 3c905Bs?

Another question: I heard, in fast interrupt, interrupt is automatically
disabled when entering interrupt handler.  Does it mean that I may lose
incoming interrupt from 3c905B(II) if it takes too long processing
interrupt from 3c905B(I)?

There are so many questions, but the only references I have are "Linux
Kernel Internal" and "O'Reilly Device drivers".  Are there any other good
references I can find, or web sites?

Thank you.

-------------------------------------------------------------
I didn't know the worst 4-letter-word was "Aiee"

--Jae.

 
 
 

HELP & Q : Ethernet device driver

Post by Donald Beck » Thu, 23 Sep 1999 04:00:00




Quote:>I have been writing a customized device driver for 3c905B ethernet card on
>2.0.36.  Cards are installed like this:
...
>My driver uses fast interrupt (SA_INTERRUPT), and generic driver uses slow
>interrupt of course. Do I have to move the slots so that all the devices
>that share an interrupt use either fast interrupt or slow interrupt?  What
>if I add more cards, and that cards (using my driver) use IRQ that is
>already used by other devices with slow interrupt?

You don't understand SA_INTERRUPT.  It is no faster than using the proper
interrupt flag, and should *NEVER* be used when sharing interrupts.  It's
only purpose is for drivers like serial ports where a fixed, trivial amount
of work is done during a non-shared interrupt.  Historically it was
important for not dropping serial port characters on the 386SX-16 processor,
where avoiding executing three instructions mattered.

Quote:>Hmm... Is it okey to fix IRQ (using dip switch or jumper, if there is) in
>order to share interrupts for all 3c905Bs?

Only ancient 486 motherboards used jumpers to set the PCI interrupt.

Quote:>Another question: I heard, in fast interrupt, interrupt is automatically
>disabled when entering interrupt handler.  Does it mean that I may lose
>incoming interrupt from 3c905B(II) if it takes too long processing
>interrupt from 3c905B(I)?

Yes.  You can also lose timer ticks and increase the interrupt latency for
other devices, which may cause difficult to track down problem.

--

USRA-CESDIS, Center of Excellence in Space Data and Information Sciences.
Code 930.5, Goddard Space Flight Center,  Greenbelt, MD.  20771
301-286-0882         http://cesdis.gsfc.nasa.gov/people/becker/whoiam.html

 
 
 

1. Ethernet Device Driver Help Needed

Hi,
  I am interested in writing a network device driver for the Racal Interlan
NI6510 series cards.  I have got a lot of documentation on the card and
the ethernet controller chip (AMD LANCE), but need a bit of help.  If anyone
out there has done work on a network device driver, I would appreciate it
if I could use you as a resource.  Reply by email if possible.

Chris Hafey
--
Chris Hafey                      |  True programming is rebooting the machine

2. X Server config problem

3. Q: Ethernet Device Driver: install/config help needed...

4. What's the best POP server

5. Device driver calling another device driver.

6. Help on installing USB Iomega Zip drive on Linux Mandrake 7.0

7. Device driver question (generic device driver)

8. Trouble with XFree86-3.1 and Diamond Stealth64 VRAM (PCI)

9. HELP needed: Solaris PCI device driver, device not auto detected.

10. need help accessing device i/o memory from device driver

11. Basic Linux ISDN/Ethernet config Qs

12. Ethernet device drivers

13. Alpha test -- ethernet pocket adaptor device driver