net/enetc: do not stall in clean Tx ring
authorAlex Marginean <alexandru.marginean@nxp.com>
Mon, 2 Mar 2020 14:32:00 +0000 (20:02 +0530)
committerFerruh Yigit <ferruh.yigit@intel.com>
Wed, 18 Mar 2020 09:21:41 +0000 (10:21 +0100)
commit6efb46f0e8662f346057461f0ea43f7ce7e28f26
treee72f7396eada5b53fd5c7c5618a0b51b29e3cc7d
parent48f9faddc65d3a45cdd7e41fef49a91cfc156d04
net/enetc: do not stall in clean Tx ring

Don't read the hardware CI register in a loop, read it once, clean up
and exit.
The issue with reading the register in a loop is that we're stalling
here trying to catch up with hardware which keeps sending traffic as
long as it has traffic to send, so in effect we could be waiting here
for the Tx ring to be drained by hardware, instead of us doing Rx in
that meantime.
At the time we return the function there may be new BDs in the ring that
could be cleaned, we're just leaving those there for the next time.

Signed-off-by: Alex Marginean <alexandru.marginean@nxp.com>
Acked-by: Gagandeep Singh <g.singh@nxp.com>
drivers/net/enetc/enetc_rxtx.c