Am79C961A
195
The controller will
discard
all descriptors with
OWN = 1
and STP = 0 and move to the next descriptor
when
searching for a place to begin a new frame
. It dis-
cards these desciptors by simply changing the owner-
ship bit from OWN=1 to OWN = 0. Such a descriptor is
unused for receive purposes by the controller, and the
driver must recognize this. (The driver will recognize
this if it follows the software rules.)
The controller will
ignore
all descriptors with
OWN = 0
and STP = 0 and move to the next descriptor
when
searching for a place to begin a new frame
. In other
words, the controller is allowed to skip entries in the
ring that it does not own, but only when it is looking for
a place to begin a new frame.
Some Examples of LAPP Descriptor
Interaction
Choose an expected frame size of 1060 bytes.
Choose buffer sizes of 800, 200 and 200 bytes.
1. Assume that a 1060 byte frame arrives correctly,
and that the timing of the early interrupt and the soft-
ware is smooth. The descriptors will have changed
from:
*ENP or ERR
2. Assume that instead of the expected 1060 byte
frame, a 900 byte frame arrives, either because
there was an error in the network, or because this is
the last frame in a file transmission sequence.
*ENP or ERR
** Note that the PCnet-ISA II controller might write a ZERO to ENP location in the 3rd descriptor. Here are the two possibilities:
1. If the controller finishes the data transfers into buffer number 2 after the driver writes the application
’
s modified buffer pointer
into the third descriptor, then the controller will write a ZERO to ENP for this buffer and will write a ZERO to OWN and STP.
2. If the controller finishes the data transfers into buffer number 2 before the driver writes the application
’
s modified buffer pointer
into the third descriptor, then the controller will complete the frame in buffer number two and then skip the then unowned third
buffer. In this case, the PCnet-ISA II controller will not have had the opportunity to RESET the ENP bit in this descriptor, and
it is possible that the software left this bit as ENP=1 from the last time through the ring. Therefore, the software
must
treat
the location as a don
’
t care; The rule is, after finding ENP=1 (or ERR=1) in descriptor number 2, the software must ignore
ENP bits until it finds the next STP=1.
Descriptor
Number
Before the Frame Arrived
After the Frame Has Arrived
Comments
(After Frame Arrival)
OWN
STP
ENP*
OWN
STP
ENP*
1
1
1
X
0
1
0
Bytes 1
–
800
2
1
0
X
0
0
0
Bytes 801
–
1000
3
0
0
X
0
0
1
Bytes 1001
–
1060
4
1
1
X
1
1
X
Controller
’
s current location
5
1
0
X
1
0
X
Not yet used
6
0
0
X
0
0
X
Not yet used
etc.
1
1
X
1
1
X
Not yet used
Descriptor
Number
Before the Frame Arrived
After the Frame Has Arrived
Comments
(After Frame Arrival)
OWN
STP
ENP*
OWN
STP
ENP*
1
1
1
X
0
1
0
Bytes 1
–
800
2
1
0
X
0
0
1
Bytes 801
–
900
3
0
0
X
0
0
**
Discarded buffer
4
1
1
X
1
1
X
Controller
’
s current location
5
1
0
X
1
0
X
Not yet used
6
0
0
X
0
0
X
Not yet used
etc.
1
1
X
1
1
X
Not yet used