* [dpdk-dev] [PATCH] bnx2x: check sc->state to prevent double init
@ 2015-12-08 14:48 Chas Williams
2015-12-09 20:24 ` Thomas Monjalon
0 siblings, 1 reply; 2+ messages in thread
From: Chas Williams @ 2015-12-08 14:48 UTC (permalink / raw)
To: dev
If the link is up, then the driver cannot be stopped and started
successfully. Instead of checking the link status, use the driver's
state.
Signed-off-by: Chas Williams <3chas3@gmail.com>
---
drivers/net/bnx2x/bnx2x.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/net/bnx2x/bnx2x.c b/drivers/net/bnx2x/bnx2x.c
index 294711f..2dc2a47 100644
--- a/drivers/net/bnx2x/bnx2x.c
+++ b/drivers/net/bnx2x/bnx2x.c
@@ -7430,7 +7430,7 @@ int bnx2x_init(struct bnx2x_softc *sc)
int rc;
/* Check if the driver is still running and bail out if it is. */
- if (sc->link_vars.link_up) {
+ if (sc->state != BNX2X_STATE_CLOSED) {
PMD_DRV_LOG(DEBUG, "Init called while driver is running!");
rc = 0;
goto bnx2x_init_done;
--
2.1.0
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2015-12-09 20:25 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-12-08 14:48 [dpdk-dev] [PATCH] bnx2x: check sc->state to prevent double init Chas Williams
2015-12-09 20:24 ` Thomas Monjalon
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).