Skip to content

Commit

Permalink
net/bnxt: fix unconditional wait in link update
Browse files Browse the repository at this point in the history
There is an unconditional delay in link update op.
Fixed it to wait only if wait for request completion is set.

Fixes: 7bc8e9a ("net/bnxt: support async link notification")
Cc: stable@dpdk.org

Signed-off-by: Kalesh AP <kalesh-anakkur.purayil@broadcom.com>
Reviewed-by: Lance Richardson <lance.richardson@broadcom.com>
  • Loading branch information
Kalesh AP authored and Ferruh Yigit committed Jul 23, 2019
1 parent d8b3bc7 commit 0a44537
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions drivers/net/bnxt/bnxt_ethdev.c
Expand Up @@ -973,11 +973,12 @@ int bnxt_link_update_op(struct rte_eth_dev *eth_dev, int wait_to_complete)
"Failed to retrieve link rc = 0x%x!\n", rc);
goto out;
}
rte_delay_ms(BNXT_LINK_WAIT_INTERVAL);

if (!wait_to_complete)
if (!wait_to_complete || new.link_status)
break;
} while (!new.link_status && cnt--);

rte_delay_ms(BNXT_LINK_WAIT_INTERVAL);
} while (cnt--);

out:
/* Timed out or success */
Expand Down

0 comments on commit 0a44537

Please sign in to comment.