]> git.ipfire.org Git - ipfire-2.x.git/blame - src/patches/suse-2.6.27.39/patches.drivers/ixgbe_DCB_compile_err.patch
Fix oinkmaster patch.
[ipfire-2.x.git] / src / patches / suse-2.6.27.39 / patches.drivers / ixgbe_DCB_compile_err.patch
CommitLineData
2cb7cef9
BS
1From: John Ronciak <john.ronciak@intel.com>
2Subject: DCB compile error fix
3Acked-by: Karsten Keil <kkeil@novell.com>
4Reference: bnc#465923
5
6DCB compile error fix
7
8User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.0.5)
9Gecko/2008120122 Firefox/3.0.5
10
11The files ixgbe_dcb.o ixgbe_dcb_82598.c and ixgbe_dcb_nl.c should not be
12compiled if DCB_CONFIG is not set. The makefile should handle this correctly
13now like in upstream kernel.
14
15
16---
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(-)
21
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
25 }
26 }
27
28+#ifdef CONFIG_IXGBE_DCB
29 /*
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);
35 }
36+#endif /* CONFIG_IXGBE_DCB */
37
38 static void ixgbe_configure(struct ixgbe_adapter *adapter)
39 {
40@@ -1963,12 +1965,17 @@ static void ixgbe_configure(struct ixgbe
41 ixgbe_set_rx_mode(netdev);
42
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);
48 } else {
49 netif_set_gso_max_size(netdev, 65536);
50 }
51+#else
52+ netif_set_gso_max_size(netdev, 65536);
53+#endif /* CONFIG_IXGBE_DCB */
54+
55
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;
61 unsigned int rss;
62+#ifdef CONFIG_IXGBE_DCB
63 int j;
64 struct tc_configuration *tc;
65+#endif /* CONFIG_IXGBE_DCB */
66
67 /* PCI config space info */
68
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;
72
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;
81-#ifdef CONFIG_DCBNL
82 ixgbe_copy_dcb_cfg(&adapter->dcb_cfg, &adapter->temp_dcb_cfg,
83 adapter->ring_feature[RING_F_DCB].indices);
84-#endif
85+#endif /* CONFIG_IXGBE_DCB */
86
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;
92
93-#ifdef CONFIG_DCBNL
94+#ifdef CONFIG_IXGBE_DCB
95 netdev->dcbnl_ops = &dcbnl_ops;
96-#endif
97+#endif /* CONFIG_IXGBE_DCB */
98
99 if (pci_using_dac)
100 netdev->features |= NETIF_F_HIGHDMA;
101--- a/drivers/net/ixgbe/Makefile
102+++ b/drivers/net/ixgbe/Makefile
103@@ -33,5 +33,6 @@
104 obj-$(CONFIG_IXGBE) += ixgbe.o
105
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 \
108- ixgbe_dcb_nl.o
109+ ixgbe_82598.o ixgbe_phy.o
110+
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
115
116 If in doubt, say N.
117
118+config IXGBE_DCB
119+ bool "Data Center Bridging (DCB) Support"
120+ default n
121+ depends on IXGBE && DCB
122+ ---help---
123+ Say Y here if you want to use Data Center Bridging (DCB) in the
124+ driver.
125+
126+ If unsure, say N.
127+
128 config IXGB
129 tristate "Intel(R) PRO/10GbE support"
130 depends on PCI