LAN9118 Family Programmer Reference Guide
SMSC AN 12.12 37 Revision 1.0 (12-14-09)
APPLICATION NOTE
Figure 7.1 Packet Reception
In the Figure 7.1 above we only begin reading packets whenever the RX Status FIFO contains any
entries (see RX_FIFO_INF:RSXUSED). Then, as long as we have more packets remaining in the
device, we check the individual RX Status per packet, and try to allocate a data packet in memory
from the network operating system. If everything is OK, then we can transfer the packet from our
device into packet data memory, and hand the packet up to the protocol stack for application
processing. Should any errors in status or an inability to obtain data memory be encountered in the
process, the driver will need to purge the device of the bad packet.
If Multicast reception is required in the application, then the driver may be the point at which to validate
the destination multicast address against a current list of multicast addresses acceptable to the
application. Although the hardware supports hashed multicast address matching, perfect multicast
filtering match must be performed, whether it’s in the in the driver, or in the upper layers of the protocol
stack. Should 802.3 style frames be an issue for the application, the driver can also evaluate the
length/type field and validate it against the device’s notion of the true, physical packet length.
Return;
Rx Process
Packets
Interrupt Service Routine
Disable RSFL_INT_EN interrupt on
FIFO_INT:RX Status Level exceeding
threshold
Schedule NOS Rx process packets
thread
ISR Complete
RSFL Interrupt: FIFO_INT:RX Status
Level threshold crossed
Read Rx Status
N
Y
Allocate NOS packet data memory to hold transfer
Transfer data from device to
memory
Send packet data memory up to NOS protocol stack
Rx Status
errors?
Allocation
failure?
Y
N
Restart the interrupt de-assertion interval
Any more packets?
(RX_FIFO_INF:RXSUSED)
Y
N
Enable RSFL_INT_EN interrupt on
FIFO_INT:RX Status Level exceeding
threshold
Multicast
match?
802.3 size
error?
N
N
Y
Purge packet
from device
Y