From: Yi Zou Date: Wed, 20 Oct 2010 23:00:30 +0000 (+0000) Subject: ixgbe: add a refcnt when turning on/off FCoE offload capability X-Git-Tag: v2.6.37-rc1~147^2~21 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=27ab76065c0c6734ea98ccc7080046a72d98455b;p=pandora-kernel.git 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 Tested-by: Ross Brattain Signed-off-by: Jeff Kirsher Signed-off-by: David S. Miller --- Reading git-diff-tree failed