staging: vt6655: vnt_tx_packet Correct TX order of OWNED_BY_NIC
authorMalcolm Priestley <tvboxspy@gmail.com>
Tue, 21 Apr 2015 21:33:00 +0000 (22:33 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 8 May 2015 12:35:22 +0000 (14:35 +0200)
commitd65d2b25d2761153390df8026cca1a528d9b6c5a
treeb4f7a3c020fd6c2981281b56f912c7e5de447a9b
parentad3fee9b17b90b8f1ac94b615111b2f14dd90adb
staging: vt6655: vnt_tx_packet Correct TX order of OWNED_BY_NIC

The state of m_td0TD0.f1Owner should change after the buff_addr
has been filled otherwise the device grabs the buffer too early.

m_td0TD0.f1Owner is protected by memory barriers on both sides
of change.

iTDUsed is best incremented after MACvTransmit.

It appears that f1Owner actually polls to do the memory transfer.

A back port patch will be needed for v3.19

Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com>
Cc: <stable@vger.kernel.org> # v4.0+
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/vt6655/device_main.c