From 5489420fba229eede12220106f478d42eb3d9aea Mon Sep 17 00:00:00 2001 From: Yi Zou Date: Mon, 19 Jul 2010 13:59:52 +0000 Subject: [PATCH] --- yaml --- r: 203642 b: refs/heads/master c: 5e09d7f6305fc9a1141bef116c7c02756d3bfa16 h: refs/heads/master v: v3 --- [refs] | 2 +- trunk/drivers/net/ixgbe/ixgbe_fcoe.c | 19 ++++++------------- trunk/drivers/net/ixgbe/ixgbe_main.c | 5 +++++ 3 files changed, 12 insertions(+), 14 deletions(-) diff --git a/[refs] b/[refs] index 1ef3dc6c60f7..8155ad3dde57 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: d6ea7c9ccc9fd351fa2675304695d1654331fca3 +refs/heads/master: 5e09d7f6305fc9a1141bef116c7c02756d3bfa16 diff --git a/trunk/drivers/net/ixgbe/ixgbe_fcoe.c b/trunk/drivers/net/ixgbe/ixgbe_fcoe.c index f6ef4cd0a12a..1737d2bddc19 100644 --- a/trunk/drivers/net/ixgbe/ixgbe_fcoe.c +++ b/trunk/drivers/net/ixgbe/ixgbe_fcoe.c @@ -622,9 +622,6 @@ int ixgbe_fcoe_enable(struct net_device *netdev) netdev->features |= NETIF_F_FCOE_CRC; netdev->features |= NETIF_F_FSO; netdev->features |= NETIF_F_FCOE_MTU; - netdev->vlan_features |= NETIF_F_FCOE_CRC; - netdev->vlan_features |= NETIF_F_FSO; - netdev->vlan_features |= NETIF_F_FCOE_MTU; netdev->fcoe_ddp_xid = IXGBE_FCOE_DDP_MAX - 1; ixgbe_init_interrupt_scheme(adapter); @@ -658,24 +655,20 @@ int ixgbe_fcoe_disable(struct net_device *netdev) goto out_disable; e_info(drv, "Disabling FCoE offload features.\n"); + netdev->features &= ~NETIF_F_FCOE_CRC; + netdev->features &= ~NETIF_F_FSO; + netdev->features &= ~NETIF_F_FCOE_MTU; + netdev->fcoe_ddp_xid = 0; + netdev_features_change(netdev); + if (netif_running(netdev)) netdev->netdev_ops->ndo_stop(netdev); ixgbe_clear_interrupt_scheme(adapter); - adapter->flags &= ~IXGBE_FLAG_FCOE_ENABLED; adapter->ring_feature[RING_F_FCOE].indices = 0; - netdev->features &= ~NETIF_F_FCOE_CRC; - netdev->features &= ~NETIF_F_FSO; - netdev->features &= ~NETIF_F_FCOE_MTU; - netdev->vlan_features &= ~NETIF_F_FCOE_CRC; - netdev->vlan_features &= ~NETIF_F_FSO; - netdev->vlan_features &= ~NETIF_F_FCOE_MTU; - netdev->fcoe_ddp_xid = 0; - ixgbe_cleanup_fcoe(adapter); ixgbe_init_interrupt_scheme(adapter); - netdev_features_change(netdev); if (netif_running(netdev)) netdev->netdev_ops->ndo_open(netdev); diff --git a/trunk/drivers/net/ixgbe/ixgbe_main.c b/trunk/drivers/net/ixgbe/ixgbe_main.c index 813d2cb5b4d0..7d619d620f2e 100644 --- a/trunk/drivers/net/ixgbe/ixgbe_main.c +++ b/trunk/drivers/net/ixgbe/ixgbe_main.c @@ -6740,6 +6740,11 @@ static int __devinit ixgbe_probe(struct pci_dev *pdev, adapter->flags &= ~IXGBE_FLAG_FCOE_CAPABLE; } } + if (adapter->flags & IXGBE_FLAG_FCOE_CAPABLE) { + netdev->vlan_features |= NETIF_F_FCOE_CRC; + netdev->vlan_features |= NETIF_F_FSO; + netdev->vlan_features |= NETIF_F_FCOE_MTU; + } #endif /* IXGBE_FCOE */ if (pci_using_dac) netdev->features |= NETIF_F_HIGHDMA;