net/bnxt: fix async link handling and update
authorAjit Khaparde <ajit.khaparde@broadcom.com>
Wed, 2 Oct 2019 17:17:34 +0000 (10:17 -0700)
committerFerruh Yigit <ferruh.yigit@intel.com>
Tue, 8 Oct 2019 10:14:30 +0000 (12:14 +0200)
commitc023cd5b2192ae2d63d041f17d3db384f9eb62cd
treec5603226d94daea3b2b1900b26593c0966aa9077
parent03abf3cfec405ceaeb0c505cefce46ea0c112e35
net/bnxt: fix async link handling and update

When updating the link because of an async link notification
there is no need to set wait_for_completion. At this point
the link related information should be available without need to poll.
Use rte_eth_linkstatus_set instead of memcpy to ensure atomicity
while updating the link status.
We force the physical link down as a part of device stop.
But we are not waiting there enough and handling the async notification
before exiting. It just sits in the default CQ till we do a device
start.
Fix it by calling the CQ handler in device stop.

Fixes: 7bc8e9a227cc ("net/bnxt: support async link notification")
Cc: stable@dpdk.org
Signed-off-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
Reviewed-by: Kalesh AP <kalesh-anakkur.purayil@broadcom.com>
Reviewed-by: Lance Richardson <lance.richardson@broadcom.com>
drivers/net/bnxt/bnxt_cpr.c
drivers/net/bnxt/bnxt_ethdev.c
drivers/net/bnxt/bnxt_irq.c
drivers/net/bnxt/bnxt_irq.h