aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/ixgbe/ixgbe_dcb_nl.c
diff options
context:
space:
mode:
authorYi Zou <yi.zou@intel.com>2009-08-31 08:32:14 -0400
committerDavid S. Miller <davem@davemloft.net>2009-09-01 04:24:25 -0400
commit8450ff8cd7fba6e78c07d7c14bf4dc582f8a6c3d (patch)
tree5307a571506bef42e4f228a5febb3a3f6516769b /drivers/net/ixgbe/ixgbe_dcb_nl.c
parent0af46d997fcbfd25a9e166c2431bfebc03720a36 (diff)
ixgbe: Add support for the net_device_ops.ndo_fcoe_enable/disable to 82599
This adds support to the net_device_ops.ndo_fcoe_enable/disable for 82599. This consequently allows us to dynamically turn FCoE offload feature on or off upon incoming calls to ndo_fcoe_enable/disable. When this happens, FCoE offload features are enabled/disabled accordingly, and this is regardless of whether DCB being turned on or not. Signed-off-by: Yi Zou <yi.zou@intel.com> Acked-by: Peter P Waskiewicz Jr <peter.p.waskiewicz.jr@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_dcb_nl.c')
-rw-r--r--drivers/net/ixgbe/ixgbe_dcb_nl.c33
1 files changed, 0 insertions, 33 deletions
diff --git a/drivers/net/ixgbe/ixgbe_dcb_nl.c b/drivers/net/ixgbe/ixgbe_dcb_nl.c
index 34bca45fbd17..e05c62ac56b2 100644
--- a/drivers/net/ixgbe/ixgbe_dcb_nl.c
+++ b/drivers/net/ixgbe/ixgbe_dcb_nl.c
@@ -139,23 +139,6 @@ static u8 ixgbe_dcbnl_set_state(struct net_device *netdev, u8 state)
139 adapter->flags &= ~IXGBE_FLAG_FDIR_PERFECT_CAPABLE; 139 adapter->flags &= ~IXGBE_FLAG_FDIR_PERFECT_CAPABLE;
140 } 140 }
141 adapter->flags |= IXGBE_FLAG_DCB_ENABLED; 141 adapter->flags |= IXGBE_FLAG_DCB_ENABLED;
142#ifdef IXGBE_FCOE
143 /* Turn on FCoE offload */
144 if ((adapter->flags & IXGBE_FLAG_FCOE_CAPABLE) &&
145 (!(adapter->flags & IXGBE_FLAG_FCOE_ENABLED))) {
146 adapter->flags |= IXGBE_FLAG_FCOE_ENABLED;
147 adapter->ring_feature[RING_F_FCOE].indices =
148 IXGBE_FCRETA_SIZE;
149 netdev->features |= NETIF_F_FCOE_CRC;
150 netdev->features |= NETIF_F_FSO;
151 netdev->features |= NETIF_F_FCOE_MTU;
152 netdev->vlan_features |= NETIF_F_FCOE_CRC;
153 netdev->vlan_features |= NETIF_F_FSO;
154 netdev->vlan_features |= NETIF_F_FCOE_MTU;
155 netdev->fcoe_ddp_xid = IXGBE_FCOE_DDP_MAX - 1;
156 netdev_features_change(netdev);
157 }
158#endif /* IXGBE_FCOE */
159 ixgbe_init_interrupt_scheme(adapter); 142 ixgbe_init_interrupt_scheme(adapter);
160 if (netif_running(netdev)) 143 if (netif_running(netdev))
161 netdev->netdev_ops->ndo_open(netdev); 144 netdev->netdev_ops->ndo_open(netdev);
@@ -174,22 +157,6 @@ static u8 ixgbe_dcbnl_set_state(struct net_device *netdev, u8 state)
174 if (adapter->hw.mac.type == ixgbe_mac_82599EB) 157 if (adapter->hw.mac.type == ixgbe_mac_82599EB)
175 adapter->flags |= IXGBE_FLAG_FDIR_HASH_CAPABLE; 158 adapter->flags |= IXGBE_FLAG_FDIR_HASH_CAPABLE;
176 159
177#ifdef IXGBE_FCOE
178 /* Turn off FCoE offload */
179 if (adapter->flags & (IXGBE_FLAG_FCOE_CAPABLE |
180 IXGBE_FLAG_FCOE_ENABLED)) {
181 adapter->flags &= ~IXGBE_FLAG_FCOE_ENABLED;
182 adapter->ring_feature[RING_F_FCOE].indices = 0;
183 netdev->features &= ~NETIF_F_FCOE_CRC;
184 netdev->features &= ~NETIF_F_FSO;
185 netdev->features &= ~NETIF_F_FCOE_MTU;
186 netdev->vlan_features &= ~NETIF_F_FCOE_CRC;
187 netdev->vlan_features &= ~NETIF_F_FSO;
188 netdev->vlan_features &= ~NETIF_F_FCOE_MTU;
189 netdev->fcoe_ddp_xid = 0;
190 netdev_features_change(netdev);
191 }
192#endif /* IXGBE_FCOE */
193 ixgbe_init_interrupt_scheme(adapter); 160 ixgbe_init_interrupt_scheme(adapter);
194 if (netif_running(netdev)) 161 if (netif_running(netdev))
195 netdev->netdev_ops->ndo_open(netdev); 162 netdev->netdev_ops->ndo_open(netdev);