]> git.baikalelectronics.ru Git - kernel.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)
commit520d850cb6dd82168535e6e95f7969420f6c5b19
treeb7605e8c600203c43768f48256c4382f30e5c390
parent25bda479ffc3f026bc7a15c45d5f18542d27f511
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