Handling interrupts for Realtek 8139 NDIS driver

xxxxx@gmail.com wrote:

So my current problems are:

  1. Im stuck at device specific code like actual handling various interrupts (CarrierLost, Tx Error, etc.)
  2. How do I start handling? I cant find any explanation where should I get current interrupt status from the device.

You cannot possibly write a driver for a device without having a
datasheet that describes the registers for that device. There are
RTL8139 datasheets available on the Interwebs. The Interrupt Status
Register is at 0x003E. There are 10 different interrupt causes, several
of which you can’t do anything about anyway.

I have a linux driver for this card with handling implemented and working

  1. For specific code I have offests of events
  2. I read status as RTL_R16(IntrStatusOffset) and find event as if (status & EventOffset)

Yep, that’s the concept.


Tim Roberts, xxxxx@probo.com
Providenza & Boekelheide, Inc.