octeontx2-af: Retry until RVU block reset complete

Few RVU blocks like SSO require more time for reset on some
silicons. Hence retrying the block reset until success.

Fixes: c0fa2cff88 ("octeontx2-af: Handle return value in block reset")
Signed-off-by: Geetha sowjanya <gakula@marvell.com>
Signed-off-by: Subbaraya Sundeep <sbhatta@marvell.com>
Signed-off-by: Sunil Goutham <sgoutham@marvell.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
Geetha sowjanya 2022-01-21 12:04:41 +05:30 committed by David S. Miller
parent 00bfe94e38
commit 03ffbc9914
1 changed files with 5 additions and 2 deletions

View File

@ -520,8 +520,11 @@ static void rvu_block_reset(struct rvu *rvu, int blkaddr, u64 rst_reg)
rvu_write64(rvu, blkaddr, rst_reg, BIT_ULL(0)); rvu_write64(rvu, blkaddr, rst_reg, BIT_ULL(0));
err = rvu_poll_reg(rvu, blkaddr, rst_reg, BIT_ULL(63), true); err = rvu_poll_reg(rvu, blkaddr, rst_reg, BIT_ULL(63), true);
if (err) if (err) {
dev_err(rvu->dev, "HW block:%d reset failed\n", blkaddr); dev_err(rvu->dev, "HW block:%d reset timeout retrying again\n", blkaddr);
while (rvu_poll_reg(rvu, blkaddr, rst_reg, BIT_ULL(63), true) == -EBUSY)
;
}
} }
static void rvu_reset_all_blocks(struct rvu *rvu) static void rvu_reset_all_blocks(struct rvu *rvu)