Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 315738
b: refs/heads/master
c: a58915c
h: refs/heads/master
v: v3
  • Loading branch information
Alexander Duyck authored and Jeff Kirsher committed Jul 20, 2012
1 parent 35682ad commit af54ddf
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 9 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: ef89e0a24ea97fc9209074a19cf60e63bba18c22
refs/heads/master: a58915c7ecba89bef0914664ecf87c2156c68630
16 changes: 9 additions & 7 deletions trunk/drivers/net/ethernet/intel/ixgbe/ixgbe_fcoe.c
Original file line number Diff line number Diff line change
Expand Up @@ -616,11 +616,11 @@ void ixgbe_configure_fcoe(struct ixgbe_adapter *adapter)
int i, fcoe_q, fcoe_i;
u32 etqf;

/* leave registers unconfigued if FCoE is disabled */
if (!(adapter->flags & IXGBE_FLAG_FCOE_ENABLED))
/* Minimal functionality for FCoE requires at least CRC offloads */
if (!(adapter->netdev->features & NETIF_F_FCOE_CRC))
return;

/* Enable L2 EtherType filter for FCoE, necessary for FCoE Rx CRC */
/* Enable L2 EtherType filter for FCoE, needed for FCoE CRC and DDP */
etqf = ETH_P_FCOE | IXGBE_ETQF_FCOE | IXGBE_ETQF_FILTER_EN;
if (adapter->flags & IXGBE_FLAG_SRIOV_ENABLED) {
etqf |= IXGBE_ETQF_POOL_ENABLE;
Expand All @@ -629,6 +629,10 @@ void ixgbe_configure_fcoe(struct ixgbe_adapter *adapter)
IXGBE_WRITE_REG(hw, IXGBE_ETQF(IXGBE_ETQF_FILTER_FCOE), etqf);
IXGBE_WRITE_REG(hw, IXGBE_ETQS(IXGBE_ETQF_FILTER_FCOE), 0);

/* leave registers un-configured if FCoE is disabled */
if (!(adapter->flags & IXGBE_FLAG_FCOE_ENABLED))
return;

/* Use one or more Rx queues for FCoE by redirection table */
for (i = 0; i < IXGBE_FCRETA_SIZE; i++) {
fcoe_i = fcoe->offset + (i % fcoe->indices);
Expand Down Expand Up @@ -804,7 +808,7 @@ int ixgbe_fcoe_enable(struct net_device *netdev)

/* enable FCoE and notify stack */
adapter->flags |= IXGBE_FLAG_FCOE_ENABLED;
netdev->features |= NETIF_F_FSO | NETIF_F_FCOE_CRC | NETIF_F_FCOE_MTU;
netdev->features |= NETIF_F_FCOE_MTU;
netdev_features_change(netdev);

/* release existing queues and reallocate them */
Expand Down Expand Up @@ -844,9 +848,7 @@ int ixgbe_fcoe_disable(struct net_device *netdev)

/* disable FCoE and notify stack */
adapter->flags &= ~IXGBE_FLAG_FCOE_ENABLED;
netdev->features &= ~(NETIF_F_FCOE_CRC |
NETIF_F_FSO |
NETIF_F_FCOE_MTU);
netdev->features &= ~NETIF_F_FCOE_MTU;

netdev_features_change(netdev);

Expand Down
5 changes: 4 additions & 1 deletion trunk/drivers/net/ethernet/intel/ixgbe/ixgbe_main.c
Original file line number Diff line number Diff line change
Expand Up @@ -6382,7 +6382,7 @@ netdev_tx_t ixgbe_xmit_frame_ring(struct sk_buff *skb,
#ifdef IXGBE_FCOE
/* setup tx offload for FCoE */
if ((protocol == __constant_htons(ETH_P_FCOE)) &&
(adapter->flags & IXGBE_FLAG_FCOE_ENABLED)) {
(tx_ring->netdev->features & (NETIF_F_FSO | NETIF_F_FCOE_CRC))) {
tso = ixgbe_fso(tx_ring, first, &hdr_len);
if (tso < 0)
goto out_drop;
Expand Down Expand Up @@ -7257,6 +7257,9 @@ static int __devinit ixgbe_probe(struct pci_dev *pdev,

adapter->ring_feature[RING_F_FCOE].limit = IXGBE_FCRETA_SIZE;

netdev->features |= NETIF_F_FSO |
NETIF_F_FCOE_CRC;

netdev->vlan_features |= NETIF_F_FSO |
NETIF_F_FCOE_CRC |
NETIF_F_FCOE_MTU;
Expand Down

0 comments on commit af54ddf

Please sign in to comment.