]> git.baikalelectronics.ru Git - kernel.git/commit
dpaa2-eth: Avoid unbounded while loops
authorIoana Radulescu <ruxandra.radulescu@nxp.com>
Mon, 7 Oct 2019 11:38:28 +0000 (14:38 +0300)
committerDavid S. Miller <davem@davemloft.net>
Mon, 7 Oct 2019 14:08:09 +0000 (10:08 -0400)
commit4f506f35b1caea3dce397bf02bcf6bbd0b9b9019
tree52dccd870803855a4b530a6a7eb778bb97584ad3
parent8c1495379ccaecef964385b4a64f890d6f81e50b
dpaa2-eth: Avoid unbounded while loops

Throughout the driver there are several places where we wait
indefinitely for DPIO portal commands to be executed, while
the portal returns a busy response code.

Even though in theory we are guaranteed the portals become
available eventually, in practice the QBMan hardware module
may become unresponsive in various corner cases.

Make sure we can never get stuck in an infinite while loop
by adding a retry counter for all portal commands.

Signed-off-by: Ioana Radulescu <ruxandra.radulescu@nxp.com>
Signed-off-by: Ioana Ciornei <ioana.ciornei@nxp.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/freescale/dpaa2/dpaa2-eth.c
drivers/net/ethernet/freescale/dpaa2/dpaa2-eth.h