Skip to content

Commit

Permalink
net/bnx2x: fix link state
Browse files Browse the repository at this point in the history
[ upstream commit 6c5b9b2 ]

Don't call bnx2x_link_status_update() from bnx2x_link_update().
Actual use case of bnx2x_link_status_update() is to update the link
status in shared memory between driver and MFW, and not to get the
link status from HW.

So ideally, bnx2x_link_status_update() should be called when there
is an actual link event or change in link status.

Calling bnx2x_link_status_update() from bnx2x_link_update() may
corrupt the data of link status in shared memory and result
in inconsistent state of link.

Fixes: 540a211 ("bnx2x: driver core")

Signed-off-by: Shahed Shaikh <shshaikh@marvell.com>
Acked-by: Rasesh Mody <rmody@marvell.com>
  • Loading branch information
Shahed Shaikh authored and kevintraynor committed Jun 24, 2019
1 parent fee77da commit 882f29f
Showing 1 changed file with 0 additions and 1 deletion.
1 change: 0 additions & 1 deletion drivers/net/bnx2x/bnx2x_ethdev.c
Expand Up @@ -87,7 +87,6 @@ bnx2x_link_update(struct rte_eth_dev *dev)

PMD_INIT_FUNC_TRACE(sc);

bnx2x_link_status_update(sc);
memset(&link, 0, sizeof(link));
mb();
link.link_speed = sc->link_vars.line_speed;
Expand Down

0 comments on commit 882f29f

Please sign in to comment.