cxgb4vf: Update port information in cxgb4vf_open()
authorArjun Vynipadath <arjun@chelsio.com>
Tue, 29 Jan 2019 09:50:19 +0000 (15:20 +0530)
committerDavid S. Miller <davem@davemloft.net>
Tue, 29 Jan 2019 17:50:36 +0000 (09:50 -0800)
It's possible that the basic port information could have
changed since we first read it.

Signed-off-by: Arjun Vynipadath <arjun@chelsio.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/chelsio/cxgb4vf/cxgb4vf_main.c

index 2fab87e8656156ea7264b40a5cf4118296866a42..1fa24af8099f2b2cf96039d607ed1916d2230776 100644 (file)
@@ -791,6 +791,13 @@ static int cxgb4vf_open(struct net_device *dev)
                        return err;
        }
 
+       /* It's possible that the basic port information could have
+        * changed since we first read it.
+        */
+       err = t4vf_update_port_info(pi);
+       if (err < 0)
+               return err;
+
        /*
         * Note that this interface is up and start everything up ...
         */