diff options
author | Dan Carpenter <dan.carpenter@oracle.com> | 2016-10-13 08:56:57 (GMT) |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2016-10-13 16:12:50 (GMT) |
commit | 10f6c4d6ab2cdde768e29f41fbfbdde6c91fd1ff (patch) | |
tree | 894ec103f7821c783a42274bd17e61cfaeeca103 /drivers | |
parent | 775f4f05501b3e36550ab63a592de3abd02e7591 (diff) | |
download | linux-10f6c4d6ab2cdde768e29f41fbfbdde6c91fd1ff.tar.xz |
liquidio: CN23XX: fix a loop timeout
This is supposed to loop 1000 times and then give up. The problem is
it's a post-op and after the loop we test if "loop" is zero when really
it would be -1. Fix this by making it a pre-op.
Fixes: 1b7c55c4538b ("liquidio: CN23XX queue manipulation")
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/net/ethernet/cavium/liquidio/cn23xx_pf_device.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/net/ethernet/cavium/liquidio/cn23xx_pf_device.c b/drivers/net/ethernet/cavium/liquidio/cn23xx_pf_device.c index bddb198..380a641 100644 --- a/drivers/net/ethernet/cavium/liquidio/cn23xx_pf_device.c +++ b/drivers/net/ethernet/cavium/liquidio/cn23xx_pf_device.c @@ -693,7 +693,7 @@ static int cn23xx_enable_io_queues(struct octeon_device *oct) while ((reg_val & CN23XX_PKT_INPUT_CTL_RST) && !(reg_val & CN23XX_PKT_INPUT_CTL_QUIET) && - loop--) { + --loop) { reg_val = octeon_read_csr64( oct, CN23XX_SLI_IQ_PKT_CONTROL64(q_no)); |