diff options
author | Ioana Radulescu <ruxandra.radulescu@nxp.com> | 2017-10-12 17:52:50 (GMT) |
---|---|---|
committer | Xie Xiaobo <xiaobo.xie@nxp.com> | 2017-12-12 07:32:42 (GMT) |
commit | 6372197ee1e986e9cc3f80e25b4f05169d2c3eb9 (patch) | |
tree | 996578b4c4bd6f1183cd2e1a8d3ac38449197814 | |
parent | b3401428a2b4b0427b6f484a019e0bb64cdcab61 (diff) | |
download | linux-6372197ee1e986e9cc3f80e25b4f05169d2c3eb9.tar.xz |
staging: fsl-dpaa2/eth: Don't yield the cpu unless necessary
When releasing buffers to the hardware pool, don't call
cpu_relax() unless we are actually waiting for the QBMan
portal to finish the previous command.
Signed-off-by: Ioana Radulescu <ruxandra.radulescu@nxp.com>
-rw-r--r-- | drivers/staging/fsl-dpaa2/ethernet/dpaa2-eth.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/drivers/staging/fsl-dpaa2/ethernet/dpaa2-eth.c b/drivers/staging/fsl-dpaa2/ethernet/dpaa2-eth.c index 2bbb0ca..47bf801 100644 --- a/drivers/staging/fsl-dpaa2/ethernet/dpaa2-eth.c +++ b/drivers/staging/fsl-dpaa2/ethernet/dpaa2-eth.c @@ -937,10 +937,9 @@ static int add_bufs(struct dpaa2_eth_priv *priv, u16 bpid) release_bufs: /* In case the portal is busy, retry until successful */ - do { - err = dpaa2_io_service_release(NULL, bpid, buf_array, i); + while ((err = dpaa2_io_service_release(NULL, bpid, + buf_array, i)) == -EBUSY) cpu_relax(); - } while (err == -EBUSY); /* If release command failed, clean up and bail out; not much * else we can do about it |