diff mbox

ixgbe: ixgbe_fcoe build break

Message ID 1280851078-4263-1-git-send-email-jon.mason@exar.com
State Awaiting Upstream, archived
Delegated to: David Miller
Headers show

Commit Message

Jon Mason Aug. 3, 2010, 3:57 p.m. UTC
struct ixgbe_fcoe has fields that are #ifdef'ed with CONFIG_IXGBE_DCB.
However, not all references to those fields check for CONFIG_IXGBE_DCB.
This patch adds the necessary check to allow for ixgbe to compile.

Signed-off-by: Jon Mason <jon.mason@exar.com>
---
 drivers/net/ixgbe/ixgbe_main.c |    4 ++++
 1 files changed, 4 insertions(+), 0 deletions(-)

Comments

Kirsher, Jeffrey T Aug. 3, 2010, 9:55 p.m. UTC | #1
On Tue, Aug 3, 2010 at 08:57, Jon Mason <jon.mason@exar.com> wrote:
> struct ixgbe_fcoe has fields that are #ifdef'ed with CONFIG_IXGBE_DCB.
> However, not all references to those fields check for CONFIG_IXGBE_DCB.
> This patch adds the necessary check to allow for ixgbe to compile.
>
> Signed-off-by: Jon Mason <jon.mason@exar.com>
> ---
>  drivers/net/ixgbe/ixgbe_main.c |    4 ++++
>  1 files changed, 4 insertions(+), 0 deletions(-)
>
> diff --git a/drivers/net/ixgbe/ixgbe_main.c b/drivers/net/ixgbe/ixgbe_main.c
> index 7d6a415..9ec3dfe 100644
> --- a/drivers/net/ixgbe/ixgbe_main.c
> +++ b/drivers/net/ixgbe/ixgbe_main.c
> @@ -6155,9 +6155,11 @@ static u16 ixgbe_select_queue(struct net_device *dev, struct sk_buff *skb)
>                        txq &= (adapter->ring_feature[RING_F_FCOE].indices - 1);
>                        txq += adapter->ring_feature[RING_F_FCOE].mask;
>                        return txq;
> +#ifdef CONFIG_IXGBE_DCB
>                } else if (adapter->flags & IXGBE_FLAG_DCB_ENABLED) {
>                        txq = adapter->fcoe.up;
>                        return txq;
> +#endif
>                }
>        }
>  #endif
> @@ -6218,8 +6220,10 @@ static netdev_tx_t ixgbe_xmit_frame(struct sk_buff *skb,
>             skb->protocol == htons(ETH_P_FIP))) {
>                tx_flags &= ~(IXGBE_TX_FLAGS_VLAN_PRIO_MASK
>                              << IXGBE_TX_FLAGS_VLAN_SHIFT);
> +#ifdef CONFIG_IXGBE_DCB
>                tx_flags |= ((adapter->fcoe.up << 13)
>                              << IXGBE_TX_FLAGS_VLAN_SHIFT);
> +#endif
>                /* flag for FCoE offloads */
>                if (skb->protocol == htons(ETH_P_FCOE))
>                        tx_flags |= IXGBE_TX_FLAGS_FCOE;
> --

Thanks Jon.  I think I may already have a patch in my queue with this
fix, but if I do not, I make sure to add your patch.
diff mbox

Patch

diff --git a/drivers/net/ixgbe/ixgbe_main.c b/drivers/net/ixgbe/ixgbe_main.c
index 7d6a415..9ec3dfe 100644
--- a/drivers/net/ixgbe/ixgbe_main.c
+++ b/drivers/net/ixgbe/ixgbe_main.c
@@ -6155,9 +6155,11 @@  static u16 ixgbe_select_queue(struct net_device *dev, struct sk_buff *skb)
 			txq &= (adapter->ring_feature[RING_F_FCOE].indices - 1);
 			txq += adapter->ring_feature[RING_F_FCOE].mask;
 			return txq;
+#ifdef CONFIG_IXGBE_DCB
 		} else if (adapter->flags & IXGBE_FLAG_DCB_ENABLED) {
 			txq = adapter->fcoe.up;
 			return txq;
+#endif
 		}
 	}
 #endif
@@ -6218,8 +6220,10 @@  static netdev_tx_t ixgbe_xmit_frame(struct sk_buff *skb,
 	     skb->protocol == htons(ETH_P_FIP))) {
 		tx_flags &= ~(IXGBE_TX_FLAGS_VLAN_PRIO_MASK
 			      << IXGBE_TX_FLAGS_VLAN_SHIFT);
+#ifdef CONFIG_IXGBE_DCB
 		tx_flags |= ((adapter->fcoe.up << 13)
 			      << IXGBE_TX_FLAGS_VLAN_SHIFT);
+#endif
 		/* flag for FCoE offloads */
 		if (skb->protocol == htons(ETH_P_FCOE))
 			tx_flags |= IXGBE_TX_FLAGS_FCOE;