e1000: clear EOP for multi-buffer descriptors
authorMichael S. Tsirkin <mst@redhat.com>
Tue, 15 Feb 2011 16:27:52 +0000 (18:27 +0200)
committerAurelien Jarno <aurelien@aurel32.net>
Sun, 20 Feb 2011 14:18:20 +0000 (15:18 +0100)
commit04fce2d4989b18d27d6dd02f6b5d21e1cae155b1
tree6305a2d2de74ab75e45bd5a912c06d13a7f4e0f1
parentba1b856c893c7032cb0359fa04f3d532d7c740a4
e1000: clear EOP for multi-buffer descriptors

The e1000 spec says: if software statically allocates
buffers, and uses memory read to check for completed descriptors, it
simply has to zero the status byte in the descriptor to make it ready
for reuse by hardware. This is not a hardware requirement (moving the
hardware tail pointer is), but is necessary for performing an in–memory
scan.

Thus the guest does not have to clear the status byte.  In case it
doesn't we need to clear EOP for all descriptors
except the last.  While I don't know of any such guests,
it's probably a good idea to stick to the spec.

Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
Reported-by: Juan Quintela <quintela@redhat.com>
Acked-by: Alex Williamson <alex.williamson@redhat.com>
Acked-by: Kevin Wolf <kwolf@redhat.com>
Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
hw/e1000.c