aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/ixgbe/ixgbe_fcoe.h
diff options
context:
space:
mode:
authorYi Zou <yi.zou@intel.com>2010-10-20 23:00:30 +0000
committerDavid S. Miller <davem@davemloft.net>2010-10-21 03:55:23 -0700
commit27ab76065c0c6734ea98ccc7080046a72d98455b (patch)
tree91dd4a0b7e282585f9363bee0a966f02b11fabf3 /drivers/net/ixgbe/ixgbe_fcoe.h
parentde1036b1cea147c5049c65f5bd26fb451f1624cd (diff)
downloadkernel_samsung_smdk4412-27ab76065c0c6734ea98ccc7080046a72d98455b.zip
kernel_samsung_smdk4412-27ab76065c0c6734ea98ccc7080046a72d98455b.tar.gz
kernel_samsung_smdk4412-27ab76065c0c6734ea98ccc7080046a72d98455b.tar.bz2
ixgbe: add a refcnt when turning on/off FCoE offload capability
The FCoE offload is enabled/disabled per adapter, but upper FCoE protocol stack could have multiple FCoE instances created on the same physical network interface, e.g., FCoE on multiple VLAN interfaces on the same physical network interface. In this case we want to turn on FCoE offload at the first request from ndo_fcoe_enable() but only turn off FCoE offload at the very last call to ndo_fcoe_disable(). This is fixed by adding a refcnt in the per adapter FCoE structure and tear down FCoE offload when refcnt decrements to zero. Signed-off-by: Yi Zou <yi.zou@intel.com> Tested-by: Ross Brattain <ross.b.brattain@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/ixgbe/ixgbe_fcoe.h')
-rw-r--r--drivers/net/ixgbe/ixgbe_fcoe.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/net/ixgbe/ixgbe_fcoe.h b/drivers/net/ixgbe/ixgbe_fcoe.h
index abf4b2b..4bc2c55 100644
--- a/drivers/net/ixgbe/ixgbe_fcoe.h
+++ b/drivers/net/ixgbe/ixgbe_fcoe.h
@@ -66,6 +66,7 @@ struct ixgbe_fcoe {
u8 tc;
u8 up;
#endif
+ atomic_t refcnt;
spinlock_t lock;
struct pci_pool *pool;
struct ixgbe_fcoe_ddp ddp[IXGBE_FCOE_DDP_MAX];