dp8393x: Clear descriptor in_use field to release packet
commitd9fae13196a31716f45dcddcdd958fbb8e59b35a
authorFinn Thain <fthain@telegraphics.com.au>
Wed, 29 Jan 2020 09:27:49 +0000 (29 20:27 +1100)
committerJason Wang <jasowang@redhat.com>
Tue, 3 Mar 2020 10:04:47 +0000 (3 18:04 +0800)
tree9cc8bc3dc2c529b5e60cdb540b460cdcda0b0704
parent350e7d9a77d3b9ac74d240e4b232db1ebe5c05bc
dp8393x: Clear descriptor in_use field to release packet

When the SONIC receives a packet into the last available descriptor, it
retains ownership of that descriptor for as long as necessary.

Section 3.4.7 of the datasheet says,

    When the system appends more descriptors, the SONIC releases ownership
    of the descriptor after writing 0000h to the RXpkt.in_use field.

The packet can now be processed by the host, so raise a PKTRX interrupt,
just like the normal case.

Signed-off-by: Finn Thain <fthain@telegraphics.com.au>
Tested-by: Laurent Vivier <laurent@vivier.eu>
Signed-off-by: Jason Wang <jasowang@redhat.com>
hw/net/dp8393x.c