diff options
author | Hariprasad Shenai | 2016-08-23 08:05:32 +0200 |
---|---|---|
committer | David S. Miller | 2016-08-24 02:07:08 +0200 |
commit | e7b48a32dc5db48ca14e6472b920102c7e53f5aa (patch) | |
tree | 8d0bb64a559d51f41457ca4d04dda8c32a6a7ade /drivers/net/ethernet/chelsio/cxgb4/cxgb4.h | |
parent | net-tcp: retire TFO_SERVER_WO_SOCKOPT2 config (diff) | |
download | kernel-qcow2-linux-e7b48a32dc5db48ca14e6472b920102c7e53f5aa.tar.gz kernel-qcow2-linux-e7b48a32dc5db48ca14e6472b920102c7e53f5aa.tar.xz kernel-qcow2-linux-e7b48a32dc5db48ca14e6472b920102c7e53f5aa.zip |
cxgb4: Fix issue while re-registering VF mgmt netdev
When we disable SRIOV, we used to unregister the netdev but wasn't
freed. But next time when the same netdev is registered, since the state
was in 'NETREG_UNREGISTERED', we used to hit BUG_ON in register_netdevice,
where it expects the state to be 'NETREG_UNINITIALIZED'.
Alloc netdev and register them while configuring SRIOV, and free them
when SRIOV is disabled. Also added a new function to setup ethernet
properties instead of using ether_setup. Set carrier off by default,
since we don't have to do any transmit on the interface.
Fixes: 7829451c695e ("cxgb4: Add control net_device for configuring PCIe VF")
Signed-off-by: Hariprasad Shenai <hariprasad@chelsio.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/ethernet/chelsio/cxgb4/cxgb4.h')
-rw-r--r-- | drivers/net/ethernet/chelsio/cxgb4/cxgb4.h | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/net/ethernet/chelsio/cxgb4/cxgb4.h b/drivers/net/ethernet/chelsio/cxgb4/cxgb4.h index f988c600c68d..3f7b33aa5ec5 100644 --- a/drivers/net/ethernet/chelsio/cxgb4/cxgb4.h +++ b/drivers/net/ethernet/chelsio/cxgb4/cxgb4.h @@ -798,6 +798,7 @@ struct adapter { unsigned int mbox; unsigned int pf; unsigned int flags; + unsigned int adap_idx; enum chip_type chip; int msg_enable; |