octeontx2-af: Handle return value in block reset.
authorGeetha sowjanya <gakula@marvell.com>
Sun, 22 Aug 2021 12:02:20 +0000 (17:32 +0530)
committerDavid S. Miller <davem@davemloft.net>
Sun, 22 Aug 2021 20:38:15 +0000 (21:38 +0100)
Print debug message if any of the RVU hardware blocks
reset fails.

Signed-off-by: Geetha sowjanya <gakula@marvell.com>
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

index c2438ba..84f0aaa 100644 (file)
@@ -498,12 +498,15 @@ int rvu_lf_reset(struct rvu *rvu, struct rvu_block *block, int lf)
 static void rvu_block_reset(struct rvu *rvu, int blkaddr, u64 rst_reg)
 {
        struct rvu_block *block = &rvu->hw->block[blkaddr];
+       int err;
 
        if (!block->implemented)
                return;
 
        rvu_write64(rvu, blkaddr, rst_reg, BIT_ULL(0));
-       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)
+               dev_err(rvu->dev, "HW block:%d reset failed\n", blkaddr);
 }
 
 static void rvu_reset_all_blocks(struct rvu *rvu)