diff options
author | Yi Zou <yi.zou@intel.com> | 2009-08-14 08:42:17 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2009-08-14 19:12:09 -0400 |
commit | f34c5c828439cedbc222030d7e45af69f947384d (patch) | |
tree | 314f85fe43c51418d3f29dcf474173d17e12d1f4 /drivers/net/ixgbe | |
parent | bb2af4f54ffa8245d5ce278cae9c66198bc14d8b (diff) |
ixgbe: Add support for NETIF_F_FCOE_MTU to 82599 devices
Enable netdev feature flag bit NETIF_F_FCOE_MTU for 82599 devices and enable
jumbo frame correspondingly when NETIF_F_FCOE_MTU is set.
Signed-off-by: Yi Zou <yi.zou@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')
-rw-r--r-- | drivers/net/ixgbe/ixgbe_dcb_nl.c | 4 | ||||
-rw-r--r-- | drivers/net/ixgbe/ixgbe_main.c | 6 |
2 files changed, 7 insertions, 3 deletions
diff --git a/drivers/net/ixgbe/ixgbe_dcb_nl.c b/drivers/net/ixgbe/ixgbe_dcb_nl.c index 116f12cc2c7..34bca45fbd1 100644 --- a/drivers/net/ixgbe/ixgbe_dcb_nl.c +++ b/drivers/net/ixgbe/ixgbe_dcb_nl.c | |||
@@ -148,8 +148,10 @@ static u8 ixgbe_dcbnl_set_state(struct net_device *netdev, u8 state) | |||
148 | IXGBE_FCRETA_SIZE; | 148 | IXGBE_FCRETA_SIZE; |
149 | netdev->features |= NETIF_F_FCOE_CRC; | 149 | netdev->features |= NETIF_F_FCOE_CRC; |
150 | netdev->features |= NETIF_F_FSO; | 150 | netdev->features |= NETIF_F_FSO; |
151 | netdev->features |= NETIF_F_FCOE_MTU; | ||
151 | netdev->vlan_features |= NETIF_F_FCOE_CRC; | 152 | netdev->vlan_features |= NETIF_F_FCOE_CRC; |
152 | netdev->vlan_features |= NETIF_F_FSO; | 153 | netdev->vlan_features |= NETIF_F_FSO; |
154 | netdev->vlan_features |= NETIF_F_FCOE_MTU; | ||
153 | netdev->fcoe_ddp_xid = IXGBE_FCOE_DDP_MAX - 1; | 155 | netdev->fcoe_ddp_xid = IXGBE_FCOE_DDP_MAX - 1; |
154 | netdev_features_change(netdev); | 156 | netdev_features_change(netdev); |
155 | } | 157 | } |
@@ -180,8 +182,10 @@ static u8 ixgbe_dcbnl_set_state(struct net_device *netdev, u8 state) | |||
180 | adapter->ring_feature[RING_F_FCOE].indices = 0; | 182 | adapter->ring_feature[RING_F_FCOE].indices = 0; |
181 | netdev->features &= ~NETIF_F_FCOE_CRC; | 183 | netdev->features &= ~NETIF_F_FCOE_CRC; |
182 | netdev->features &= ~NETIF_F_FSO; | 184 | netdev->features &= ~NETIF_F_FSO; |
185 | netdev->features &= ~NETIF_F_FCOE_MTU; | ||
183 | netdev->vlan_features &= ~NETIF_F_FCOE_CRC; | 186 | netdev->vlan_features &= ~NETIF_F_FCOE_CRC; |
184 | netdev->vlan_features &= ~NETIF_F_FSO; | 187 | netdev->vlan_features &= ~NETIF_F_FSO; |
188 | netdev->vlan_features &= ~NETIF_F_FCOE_MTU; | ||
185 | netdev->fcoe_ddp_xid = 0; | 189 | netdev->fcoe_ddp_xid = 0; |
186 | netdev_features_change(netdev); | 190 | netdev_features_change(netdev); |
187 | } | 191 | } |
diff --git a/drivers/net/ixgbe/ixgbe_main.c b/drivers/net/ixgbe/ixgbe_main.c index 8a8518dd694..d69d277886e 100644 --- a/drivers/net/ixgbe/ixgbe_main.c +++ b/drivers/net/ixgbe/ixgbe_main.c | |||
@@ -2026,7 +2026,7 @@ static void ixgbe_configure_rx(struct ixgbe_adapter *adapter) | |||
2026 | else | 2026 | else |
2027 | hlreg0 |= IXGBE_HLREG0_JUMBOEN; | 2027 | hlreg0 |= IXGBE_HLREG0_JUMBOEN; |
2028 | #ifdef IXGBE_FCOE | 2028 | #ifdef IXGBE_FCOE |
2029 | if (adapter->flags & IXGBE_FLAG_FCOE_ENABLED) | 2029 | if (netdev->features & NETIF_F_FCOE_MTU) |
2030 | hlreg0 |= IXGBE_HLREG0_JUMBOEN; | 2030 | hlreg0 |= IXGBE_HLREG0_JUMBOEN; |
2031 | #endif | 2031 | #endif |
2032 | IXGBE_WRITE_REG(hw, IXGBE_HLREG0, hlreg0); | 2032 | IXGBE_WRITE_REG(hw, IXGBE_HLREG0, hlreg0); |
@@ -2057,7 +2057,7 @@ static void ixgbe_configure_rx(struct ixgbe_adapter *adapter) | |||
2057 | rx_ring->flags |= IXGBE_RING_RX_PS_ENABLED; | 2057 | rx_ring->flags |= IXGBE_RING_RX_PS_ENABLED; |
2058 | 2058 | ||
2059 | #ifdef IXGBE_FCOE | 2059 | #ifdef IXGBE_FCOE |
2060 | if (adapter->flags & IXGBE_FLAG_FCOE_ENABLED) { | 2060 | if (netdev->features & NETIF_F_FCOE_MTU) { |
2061 | struct ixgbe_ring_feature *f; | 2061 | struct ixgbe_ring_feature *f; |
2062 | f = &adapter->ring_feature[RING_F_FCOE]; | 2062 | f = &adapter->ring_feature[RING_F_FCOE]; |
2063 | if ((i >= f->mask) && (i < f->mask + f->indices)) { | 2063 | if ((i >= f->mask) && (i < f->mask + f->indices)) { |
@@ -2609,7 +2609,7 @@ static int ixgbe_up_complete(struct ixgbe_adapter *adapter) | |||
2609 | 2609 | ||
2610 | #ifdef IXGBE_FCOE | 2610 | #ifdef IXGBE_FCOE |
2611 | /* adjust max frame to be able to do baby jumbo for FCoE */ | 2611 | /* adjust max frame to be able to do baby jumbo for FCoE */ |
2612 | if ((adapter->flags & IXGBE_FLAG_FCOE_ENABLED) && | 2612 | if ((netdev->features & NETIF_F_FCOE_MTU) && |
2613 | (max_frame < IXGBE_FCOE_JUMBO_FRAME_SIZE)) | 2613 | (max_frame < IXGBE_FCOE_JUMBO_FRAME_SIZE)) |
2614 | max_frame = IXGBE_FCOE_JUMBO_FRAME_SIZE; | 2614 | max_frame = IXGBE_FCOE_JUMBO_FRAME_SIZE; |
2615 | 2615 | ||