]> git.baikalelectronics.ru Git - kernel.git/commit
octeontx2-af: Modify rvu_reg_poll() to check reg atleast twice
authorSunil Goutham <sgoutham@marvell.com>
Mon, 2 Mar 2020 07:19:28 +0000 (12:49 +0530)
committerDavid S. Miller <davem@davemloft.net>
Mon, 2 Mar 2020 19:08:52 +0000 (11:08 -0800)
commit5edbf10cf33e8ad08cb1fc99be37b02beb06738c
treec0d06fc96bee3f59dae86ebf8b0283e8ef25a780
parent801dae97090b3e8ee1128c10462fae7dc364e767
octeontx2-af: Modify rvu_reg_poll() to check reg atleast twice

Currently on the first check if the operation is still not
finished, the poll goes to sleep for 2-5 usecs. But if for
some reason (due to other priority stuff like interrupts etc) by
the time the poll wakes up the 10ms time is expired then we don't
check if operation is finished or not and return failure.

This patch modifies poll logic to check HW operation after sleep so
that the status is checked atleast twice.

Signed-off-by: Sunil Goutham <sgoutham@marvell.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/marvell/octeontx2/af/rvu.c