]> git.proxmox.com Git - mirror_ubuntu-kernels.git/commit
sunvnet: Do not spin in an infinite loop when vio_ldc_send() returns EAGAIN
authorSowmini Varadhan <sowmini.varadhan@oracle.com>
Tue, 12 Aug 2014 14:33:10 +0000 (10:33 -0400)
committerDavid S. Miller <davem@davemloft.net>
Thu, 14 Aug 2014 03:04:46 +0000 (20:04 -0700)
commitadddc32d6fde82156c779997f928865100542e55
treeb7605e8c600203c43768f48256c4382f30e5c390
parent1f6394e382f137f07136182c591ca8a7eeba6a06
sunvnet: Do not spin in an infinite loop when vio_ldc_send() returns EAGAIN

ldc_rx -> vnet_rx -> .. -> vnet_walk_rx->vnet_send_ack should not
spin into an infinite loop waiting  EAGAIN to lift.

The sender could have sent us a burst, and gone to lunch without
doing any more ldc_read()'s. That should not cause the receiver to
loop infinitely till soft-lockup kicks in.

Similarly __vnet_tx_trigger should only loop on EAGAIN a finite
number of times. The caller (vnet_start_xmit()) already has code
to reset the dring state and bail on errors from __vnet_tx_trigger

Signed-off-by: Sowmini Varadhan <sowmini.varadhan@oracle.com>
Acked-by: Raghuram Kothakota <raghuram.kothakota@oracle.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/sun/sunvnet.c