Basic Driver Interrupt Processing Flow
BCM5718 Programmer’s Guide
Broadcom
®
January 29, 2016 • 5718-PG108-R
Page 232
Basic Driver Interrupt Processing Flow
Flowchart for Servicing an Interrupt
The following figure shows the basic driver interrupt service routine flow.
Figure 49: Basic Driver Interrupt Service Routine Flow
Is the "Updated bit" set in the Status
Block?
Driver reads the "status word" field in the
570X's "Status Block" (located in host
m emory)
No
Yes
NIC encounters an Interrupt event and
asserts in INTA# line to interrupt host
Host OS receives Interrupt and calls NIC
driver's ISR
Tell the OS "Not my interrupt", and
RETURN (this is important for interrupt-
sharing environm ents)
Driver claim s the Interrupt and schedules a
callback to handle the interrupt processing
(m any OSes due this via a lower priority
thread). Allternatively, the driver could directly
invoke the interrupt processing code.
Driver writes a value of '"1" into the 570X's
Interrupt M ailbox 0 register. W hile this register
contains a nonzero value, it prevents future
interrupt assertions from the 570X.
Driver clears the "updated" bit in the Status
Block.
Process any Link Status change events.
Process any received packets (receive
interrupts).
Process any completed transmits (transmit
interrupts).
Read the,
Is the "Updated bit" set in
the Status Block?
No
Yes
Read Interrupt M ailbox 0 in order to flush
any posted writes in the PCI chipset.
Enable Interrupts by writing the Interrupt
Mailbox 0 register to '0'.
No more work to do. Exit the DPC
There is m ore work to do. Force an interrupt
by setting bit 2 in the M isc Local Control
Regsiter (offset 0x6808)
DPC Code
ISR Code