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: 1b7c55c453
("liquidio: CN23XX queue manipulation")
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
parent
775f4f0550
commit
10f6c4d6ab
|
@ -693,7 +693,7 @@ static int cn23xx_enable_io_queues(struct octeon_device *oct)
|
||||||
while ((reg_val & CN23XX_PKT_INPUT_CTL_RST) &&
|
while ((reg_val & CN23XX_PKT_INPUT_CTL_RST) &&
|
||||||
!(reg_val &
|
!(reg_val &
|
||||||
CN23XX_PKT_INPUT_CTL_QUIET) &&
|
CN23XX_PKT_INPUT_CTL_QUIET) &&
|
||||||
loop--) {
|
--loop) {
|
||||||
reg_val = octeon_read_csr64(
|
reg_val = octeon_read_csr64(
|
||||||
oct,
|
oct,
|
||||||
CN23XX_SLI_IQ_PKT_CONTROL64(q_no));
|
CN23XX_SLI_IQ_PKT_CONTROL64(q_no));
|
||||||
|
|
Loading…
Reference in New Issue