summaryrefslogtreecommitdiffstats
path: root/drivers/net/ethernet/sun/sunvnet.c
diff options
context:
space:
mode:
authorSowmini Varadhan <sowmini.varadhan@oracle.com>2014-11-09 02:42:10 +0100
committerDavid S. Miller <davem@davemloft.net>2014-11-11 03:05:36 +0100
commit777362d7215f63318fc4a6fae9b320328d92e9f6 (patch)
tree83e0e6b6c35655a5d90d7b6154b2aa03ed822eca /drivers/net/ethernet/sun/sunvnet.c
parentsunvnet: Fix race between vnet_start_xmit() and vnet_ack() (diff)
downloadlinux-777362d7215f63318fc4a6fae9b320328d92e9f6.tar.xz
linux-777362d7215f63318fc4a6fae9b320328d92e9f6.zip
sunvnet: vnet_ack() should check if !start_cons to send a missed trigger
As per comments in vnet_start_xmit, for the edge case when outgoing vnet_start_xmit() data and an incoming STOPPED ACK cross each other in flight, we may need to send the missed START trigger from maybe_tx_wakeup() after checking for a false value of start_cons Signed-off-by: Sowmini Varadhan <sowmini.varadhan@oracle.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/ethernet/sun/sunvnet.c')
-rw-r--r--drivers/net/ethernet/sun/sunvnet.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/net/ethernet/sun/sunvnet.c b/drivers/net/ethernet/sun/sunvnet.c
index deb395a82e50..826b3852c7df 100644
--- a/drivers/net/ethernet/sun/sunvnet.c
+++ b/drivers/net/ethernet/sun/sunvnet.c
@@ -572,7 +572,7 @@ static int vnet_ack(struct vnet_port *port, void *msgbuf)
*/
dr->cons = next_idx(end, dr);
desc = vio_dring_entry(dr, dr->cons);
- if (desc->hdr.state == VIO_DESC_READY && port->start_cons) {
+ if (desc->hdr.state == VIO_DESC_READY && !port->start_cons) {
/* vnet_start_xmit() just populated this dring but missed
* sending the "start" LDC message to the consumer.
* Send a "start" trigger on its behalf.