1 From: John Ronciak <john.ronciak@intel.com>
2 Subject: DCB compile error fix
3 Acked-by: Karsten Keil <kkeil@novell.com>
8 User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.0.5)
9 Gecko/2008120122 Firefox/3.0.5
11 The files ixgbe_dcb.o ixgbe_dcb_82598.c and ixgbe_dcb_nl.c should not be
12 compiled if DCB_CONFIG is not set. The makefile should handle this correctly
13 now like in upstream kernel.
17 drivers/net/Kconfig | 10 ++++++++++
18 drivers/net/ixgbe/Makefile | 5 +++--
19 drivers/net/ixgbe/ixgbe_main.c | 17 +++++++++++++----
20 3 files changed, 26 insertions(+), 6 deletions(-)
22 --- a/drivers/net/ixgbe/ixgbe_main.c
23 +++ b/drivers/net/ixgbe/ixgbe_main.c
24 @@ -1919,6 +1919,7 @@ static void ixgbe_napi_disable_all(struc
28 +#ifdef CONFIG_IXGBE_DCB
30 * ixgbe_configure_dcb - Configure DCB hardware
31 * @adapter: ixgbe adapter struct
32 @@ -1954,6 +1955,7 @@ static void ixgbe_configure_dcb(struct i
33 IXGBE_WRITE_REG(hw, IXGBE_VLNCTRL, vlnctrl);
34 hw->mac.ops.set_vfta(&adapter->hw, 0, 0, true);
36 +#endif /* CONFIG_IXGBE_DCB */
38 static void ixgbe_configure(struct ixgbe_adapter *adapter)
40 @@ -1963,12 +1965,17 @@ static void ixgbe_configure(struct ixgbe
41 ixgbe_set_rx_mode(netdev);
43 ixgbe_restore_vlan(adapter);
44 +#ifdef CONFIG_IXGBE_DCB
45 if (adapter->flags & IXGBE_FLAG_DCB_ENABLED) {
46 netif_set_gso_max_size(netdev, 32768);
47 ixgbe_configure_dcb(adapter);
49 netif_set_gso_max_size(netdev, 65536);
52 + netif_set_gso_max_size(netdev, 65536);
53 +#endif /* CONFIG_IXGBE_DCB */
56 ixgbe_configure_tx(adapter);
57 ixgbe_configure_rx(adapter);
58 @@ -2746,8 +2753,10 @@ static int __devinit ixgbe_sw_init(struc
59 struct ixgbe_hw *hw = &adapter->hw;
60 struct pci_dev *pdev = adapter->pdev;
62 +#ifdef CONFIG_IXGBE_DCB
64 struct tc_configuration *tc;
65 +#endif /* CONFIG_IXGBE_DCB */
67 /* PCI config space info */
69 @@ -2766,6 +2775,7 @@ static int __devinit ixgbe_sw_init(struc
70 adapter->flags |= IXGBE_FLAG_FAN_FAIL_CAPABLE;
71 adapter->ring_feature[RING_F_DCB].indices = IXGBE_MAX_DCB_INDICES;
73 +#ifdef CONFIG_IXGBE_DCB
74 /* Configure DCB traffic classes */
75 for (j = 0; j < MAX_TRAFFIC_CLASS; j++) {
76 tc = &adapter->dcb_cfg.tc_config[j];
77 @@ -2780,10 +2790,9 @@ static int __devinit ixgbe_sw_init(struc
78 adapter->dcb_cfg.rx_pba_cfg = pba_equal;
79 adapter->dcb_cfg.round_robin_enable = false;
80 adapter->dcb_set_bitmap = 0x00;
82 ixgbe_copy_dcb_cfg(&adapter->dcb_cfg, &adapter->temp_dcb_cfg,
83 adapter->ring_feature[RING_F_DCB].indices);
85 +#endif /* CONFIG_IXGBE_DCB */
87 /* default flow control settings */
88 hw->fc.original_type = ixgbe_fc_none;
89 @@ -4116,9 +4125,9 @@ static int __devinit ixgbe_probe(struct
90 if (adapter->flags & IXGBE_FLAG_DCB_ENABLED)
91 adapter->flags &= ~IXGBE_FLAG_RSS_ENABLED;
94 +#ifdef CONFIG_IXGBE_DCB
95 netdev->dcbnl_ops = &dcbnl_ops;
97 +#endif /* CONFIG_IXGBE_DCB */
100 netdev->features |= NETIF_F_HIGHDMA;
101 --- a/drivers/net/ixgbe/Makefile
102 +++ b/drivers/net/ixgbe/Makefile
104 obj-$(CONFIG_IXGBE) += ixgbe.o
106 ixgbe-objs := ixgbe_main.o ixgbe_common.o ixgbe_ethtool.o \
107 - ixgbe_82598.o ixgbe_phy.o ixgbe_dcb.o ixgbe_dcb_82598.o \
109 + ixgbe_82598.o ixgbe_phy.o
111 +ixgbe-$(CONFIG_IXGBE_DCB) += ixgbe_dcb.o ixgbe_dcb_82598.o ixgbe_dcb_nl.o
112 --- a/drivers/net/Kconfig
113 +++ b/drivers/net/Kconfig
114 @@ -2406,6 +2406,16 @@ config IXGBE_LRO
119 + bool "Data Center Bridging (DCB) Support"
121 + depends on IXGBE && DCB
123 + Say Y here if you want to use Data Center Bridging (DCB) in the
129 tristate "Intel(R) PRO/10GbE support"