12.15
Resetting the Device (SIOCIFRESET ioctl Command) ......... 12–11
12.16
Setting Device Characteristics (SIOCIFSETCHAR ioctl
Command) .............................................................
12–11
12.17
Releasing the Simple Lock and Resetting the IPL ............... 12–13
13 Implementing the Interrupt Section
13.1
Implementing the el_intr Routine .................................. 13–1
13.1.1
Setting the IPL and Obtaining the Simple Lock ............ 13–2
13.1.2
Rearming the Next Timeout .................................... 13–2
13.1.3
Reading the Interrupt Status .................................. 13–3
13.1.4
Processing Completed Receive and Transmit Operations . 13–3
13.1.5
Acknowledging the Interrupt .................................. 13–4
13.1.6
Transmitting Pending Frames ................................. 13–4
13.1.7
Releasing the Simple Lock and Resetting the IPL .......... 13–4
13.1.8
Indicating That the Interrupt Was Serviced ................. 13–5
13.2
Implementing the el_rint Routine .................................. 13–5
13.2.1
Counting the Receive Interrupt and Reading the Receive
Status ..............................................................
13–5
13.2.2
Pulling the Packets from the FIFO Buffer ................... 13–6
13.2.3
Examining the First Part of the Packet ...................... 13–7
13.2.4
Copying the Received Packet into the mbuf ................. 13–8
13.2.5
Discarding a Packet .............................................
13–9
13.3
Implementing the el_tint Routine .................................. 13–10
13.3.1
Counting the Transmit Interrupt .............................. 13–10
13.3.2
Reading the Transmit Status and Counting All Significant
Events ..............................................................
13–10
13.3.3
Managing Excessive Data Collisions .......................... 13–11
13.3.4
Writing to the Status Register to Obtain the Next Value .. 13–11
13.3.5
Queuing Other Transmits ...................................... 13–12
13.4
Implementing the el_error Routine ................................ 13–12
14 Network Device Driver Configuration
Index
Figures
1–1
Sections of a Network Device Driver ............................... 1–2
2–1
Window 0 Configuration Registers ................................. 2–5
2–2
Window 3 Configuration Registers ................................. 2–8
2–3
Window 1 Operational Registers ................................... 2–9
viii Contents