nfp: mark port state as stale after reconfig
authorJakub Kicinski <jakub.kicinski@netronome.com>
Mon, 22 May 2017 17:59:32 +0000 (10:59 -0700)
committerDavid S. Miller <davem@davemloft.net>
Mon, 22 May 2017 18:59:05 +0000 (14:59 -0400)
After port configuration is performed mark it as changed. This
will close a window of time between configuration and async
state refresh which runs from a workqueue where old port state
would be reported.

Signed-off-by: Jakub Kicinski <jakub.kicinski@netronome.com>
Reviewed-by: Simon Horman <simon.horman@netronome.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/netronome/nfp/nfp_net_main.c

index 40ba5775ff79fd9a86da3102070accab0f22d43d..12cbf21df3b97c3ca175690663c90591d43290dc 100644 (file)
@@ -596,6 +596,8 @@ void nfp_net_refresh_port_table(struct nfp_port *port)
 {
        struct nfp_pf *pf = port->app->pf;
 
+       set_bit(NFP_PORT_CHANGED, &port->flags);
+
        schedule_work(&pf->port_refresh_work);
 }