aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/ixgbe
diff options
context:
space:
mode:
authorJeff Garzik <jeff@garzik.org>2008-10-16 05:09:31 -0400
committerJeff Garzik <jgarzik@redhat.com>2008-10-16 05:09:31 -0400
commit5dd2d3322836036da169904afcb7d0f6dff5363f (patch)
tree0ae7a4c1041e7d7a821ce8a4c7e0edcdaa11b2e4 /drivers/net/ixgbe
parent8fa0b315fc0c1a414da1371f1fc39523a657c192 (diff)
[netdrvr] myri10ge, ixgbe: remove broken select INTEL_IOATDMA
We cannot select INTEL_IOATDMA in Kconfig as soon as MYRI10GE or IXGBE is enabled since the former is not available on all architectures. Just use a Kconfig bool {IXGBE,MYRI10GE}_DCA set to =y when DCA support can actually be built. [myri10ge portion written and signed-off-by] Brice Goglin <brice@myri.com> Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
Diffstat (limited to 'drivers/net/ixgbe')
-rw-r--r--drivers/net/ixgbe/ixgbe.h4
-rw-r--r--drivers/net/ixgbe/ixgbe_main.c32
2 files changed, 18 insertions, 18 deletions
diff --git a/drivers/net/ixgbe/ixgbe.h b/drivers/net/ixgbe/ixgbe.h
index 2198b77c53ed..e116d340dcc6 100644
--- a/drivers/net/ixgbe/ixgbe.h
+++ b/drivers/net/ixgbe/ixgbe.h
@@ -36,7 +36,7 @@
36#include "ixgbe_type.h" 36#include "ixgbe_type.h"
37#include "ixgbe_common.h" 37#include "ixgbe_common.h"
38 38
39#if defined(CONFIG_DCA) || defined(CONFIG_DCA_MODULE) 39#ifdef CONFIG_IXGBE_DCA
40#include <linux/dca.h> 40#include <linux/dca.h>
41#endif 41#endif
42 42
@@ -136,7 +136,7 @@ struct ixgbe_ring {
136 * offset associated with this ring, which is different 136 * offset associated with this ring, which is different
137 * for DCE and RSS modes */ 137 * for DCE and RSS modes */
138 138
139#if defined(CONFIG_DCA) || defined(CONFIG_DCA_MODULE) 139#ifdef CONFIG_IXGBE_DCA
140 /* cpu for tx queue */ 140 /* cpu for tx queue */
141 int cpu; 141 int cpu;
142#endif 142#endif
diff --git a/drivers/net/ixgbe/ixgbe_main.c b/drivers/net/ixgbe/ixgbe_main.c
index ca17af4349d0..7548fb7360d9 100644
--- a/drivers/net/ixgbe/ixgbe_main.c
+++ b/drivers/net/ixgbe/ixgbe_main.c
@@ -80,7 +80,7 @@ static struct pci_device_id ixgbe_pci_tbl[] = {
80}; 80};
81MODULE_DEVICE_TABLE(pci, ixgbe_pci_tbl); 81MODULE_DEVICE_TABLE(pci, ixgbe_pci_tbl);
82 82
83#if defined(CONFIG_DCA) || defined(CONFIG_DCA_MODULE) 83#ifdef CONFIG_IXGBE_DCA
84static int ixgbe_notify_dca(struct notifier_block *, unsigned long event, 84static int ixgbe_notify_dca(struct notifier_block *, unsigned long event,
85 void *p); 85 void *p);
86static struct notifier_block dca_notifier = { 86static struct notifier_block dca_notifier = {
@@ -296,7 +296,7 @@ done_cleaning:
296 return (total_packets ? true : false); 296 return (total_packets ? true : false);
297} 297}
298 298
299#if defined(CONFIG_DCA) || defined(CONFIG_DCA_MODULE) 299#ifdef CONFIG_IXGBE_DCA
300static void ixgbe_update_rx_dca(struct ixgbe_adapter *adapter, 300static void ixgbe_update_rx_dca(struct ixgbe_adapter *adapter,
301 struct ixgbe_ring *rx_ring) 301 struct ixgbe_ring *rx_ring)
302{ 302{
@@ -383,7 +383,7 @@ static int __ixgbe_notify_dca(struct device *dev, void *data)
383 return 0; 383 return 0;
384} 384}
385 385
386#endif /* CONFIG_DCA or CONFIG_DCA_MODULE */ 386#endif /* CONFIG_IXGBE_DCA */
387/** 387/**
388 * ixgbe_receive_skb - Send a completed packet up the stack 388 * ixgbe_receive_skb - Send a completed packet up the stack
389 * @adapter: board private structure 389 * @adapter: board private structure
@@ -947,7 +947,7 @@ static irqreturn_t ixgbe_msix_clean_tx(int irq, void *data)
947 r_idx = find_first_bit(q_vector->txr_idx, adapter->num_tx_queues); 947 r_idx = find_first_bit(q_vector->txr_idx, adapter->num_tx_queues);
948 for (i = 0; i < q_vector->txr_count; i++) { 948 for (i = 0; i < q_vector->txr_count; i++) {
949 tx_ring = &(adapter->tx_ring[r_idx]); 949 tx_ring = &(adapter->tx_ring[r_idx]);
950#if defined(CONFIG_DCA) || defined(CONFIG_DCA_MODULE) 950#ifdef CONFIG_IXGBE_DCA
951 if (adapter->flags & IXGBE_FLAG_DCA_ENABLED) 951 if (adapter->flags & IXGBE_FLAG_DCA_ENABLED)
952 ixgbe_update_tx_dca(adapter, tx_ring); 952 ixgbe_update_tx_dca(adapter, tx_ring);
953#endif 953#endif
@@ -1022,7 +1022,7 @@ static int ixgbe_clean_rxonly(struct napi_struct *napi, int budget)
1022 1022
1023 r_idx = find_first_bit(q_vector->rxr_idx, adapter->num_rx_queues); 1023 r_idx = find_first_bit(q_vector->rxr_idx, adapter->num_rx_queues);
1024 rx_ring = &(adapter->rx_ring[r_idx]); 1024 rx_ring = &(adapter->rx_ring[r_idx]);
1025#if defined(CONFIG_DCA) || defined(CONFIG_DCA_MODULE) 1025#ifdef CONFIG_IXGBE_DCA
1026 if (adapter->flags & IXGBE_FLAG_DCA_ENABLED) 1026 if (adapter->flags & IXGBE_FLAG_DCA_ENABLED)
1027 ixgbe_update_rx_dca(adapter, rx_ring); 1027 ixgbe_update_rx_dca(adapter, rx_ring);
1028#endif 1028#endif
@@ -1066,7 +1066,7 @@ static int ixgbe_clean_rxonly_many(struct napi_struct *napi, int budget)
1066 r_idx = find_first_bit(q_vector->rxr_idx, adapter->num_rx_queues); 1066 r_idx = find_first_bit(q_vector->rxr_idx, adapter->num_rx_queues);
1067 for (i = 0; i < q_vector->rxr_count; i++) { 1067 for (i = 0; i < q_vector->rxr_count; i++) {
1068 rx_ring = &(adapter->rx_ring[r_idx]); 1068 rx_ring = &(adapter->rx_ring[r_idx]);
1069#if defined(CONFIG_DCA) || defined(CONFIG_DCA_MODULE) 1069#ifdef CONFIG_IXGBE_DCA
1070 if (adapter->flags & IXGBE_FLAG_DCA_ENABLED) 1070 if (adapter->flags & IXGBE_FLAG_DCA_ENABLED)
1071 ixgbe_update_rx_dca(adapter, rx_ring); 1071 ixgbe_update_rx_dca(adapter, rx_ring);
1072#endif 1072#endif
@@ -2155,7 +2155,7 @@ void ixgbe_down(struct ixgbe_adapter *adapter)
2155 2155
2156 netif_carrier_off(netdev); 2156 netif_carrier_off(netdev);
2157 2157
2158#if defined(CONFIG_DCA) || defined(CONFIG_DCA_MODULE) 2158#ifdef CONFIG_IXGBE_DCA
2159 if (adapter->flags & IXGBE_FLAG_DCA_ENABLED) { 2159 if (adapter->flags & IXGBE_FLAG_DCA_ENABLED) {
2160 adapter->flags &= ~IXGBE_FLAG_DCA_ENABLED; 2160 adapter->flags &= ~IXGBE_FLAG_DCA_ENABLED;
2161 dca_remove_requester(&adapter->pdev->dev); 2161 dca_remove_requester(&adapter->pdev->dev);
@@ -2167,7 +2167,7 @@ void ixgbe_down(struct ixgbe_adapter *adapter)
2167 ixgbe_clean_all_tx_rings(adapter); 2167 ixgbe_clean_all_tx_rings(adapter);
2168 ixgbe_clean_all_rx_rings(adapter); 2168 ixgbe_clean_all_rx_rings(adapter);
2169 2169
2170#if defined(CONFIG_DCA) || defined(CONFIG_DCA_MODULE) 2170#ifdef CONFIG_IXGBE_DCA
2171 /* since we reset the hardware DCA settings were cleared */ 2171 /* since we reset the hardware DCA settings were cleared */
2172 if (dca_add_requester(&adapter->pdev->dev) == 0) { 2172 if (dca_add_requester(&adapter->pdev->dev) == 0) {
2173 adapter->flags |= IXGBE_FLAG_DCA_ENABLED; 2173 adapter->flags |= IXGBE_FLAG_DCA_ENABLED;
@@ -2193,7 +2193,7 @@ static int ixgbe_poll(struct napi_struct *napi, int budget)
2193 struct ixgbe_adapter *adapter = q_vector->adapter; 2193 struct ixgbe_adapter *adapter = q_vector->adapter;
2194 int tx_cleaned, work_done = 0; 2194 int tx_cleaned, work_done = 0;
2195 2195
2196#if defined(CONFIG_DCA) || defined(CONFIG_DCA_MODULE) 2196#ifdef CONFIG_IXGBE_DCA
2197 if (adapter->flags & IXGBE_FLAG_DCA_ENABLED) { 2197 if (adapter->flags & IXGBE_FLAG_DCA_ENABLED) {
2198 ixgbe_update_tx_dca(adapter, adapter->tx_ring); 2198 ixgbe_update_tx_dca(adapter, adapter->tx_ring);
2199 ixgbe_update_rx_dca(adapter, adapter->rx_ring); 2199 ixgbe_update_rx_dca(adapter, adapter->rx_ring);
@@ -3922,7 +3922,7 @@ static int __devinit ixgbe_probe(struct pci_dev *pdev,
3922 if (err) 3922 if (err)
3923 goto err_register; 3923 goto err_register;
3924 3924
3925#if defined(CONFIG_DCA) || defined(CONFIG_DCA_MODULE) 3925#ifdef CONFIG_IXGBE_DCA
3926 if (dca_add_requester(&pdev->dev) == 0) { 3926 if (dca_add_requester(&pdev->dev) == 0) {
3927 adapter->flags |= IXGBE_FLAG_DCA_ENABLED; 3927 adapter->flags |= IXGBE_FLAG_DCA_ENABLED;
3928 /* always use CB2 mode, difference is masked 3928 /* always use CB2 mode, difference is masked
@@ -3972,7 +3972,7 @@ static void __devexit ixgbe_remove(struct pci_dev *pdev)
3972 3972
3973 flush_scheduled_work(); 3973 flush_scheduled_work();
3974 3974
3975#if defined(CONFIG_DCA) || defined(CONFIG_DCA_MODULE) 3975#ifdef CONFIG_IXGBE_DCA
3976 if (adapter->flags & IXGBE_FLAG_DCA_ENABLED) { 3976 if (adapter->flags & IXGBE_FLAG_DCA_ENABLED) {
3977 adapter->flags &= ~IXGBE_FLAG_DCA_ENABLED; 3977 adapter->flags &= ~IXGBE_FLAG_DCA_ENABLED;
3978 dca_remove_requester(&pdev->dev); 3978 dca_remove_requester(&pdev->dev);
@@ -4105,10 +4105,10 @@ static int __init ixgbe_init_module(void)
4105 4105
4106 printk(KERN_INFO "%s: %s\n", ixgbe_driver_name, ixgbe_copyright); 4106 printk(KERN_INFO "%s: %s\n", ixgbe_driver_name, ixgbe_copyright);
4107 4107
4108#if defined(CONFIG_DCA) || defined(CONFIG_DCA_MODULE) 4108#ifdef CONFIG_IXGBE_DCA
4109 dca_register_notify(&dca_notifier); 4109 dca_register_notify(&dca_notifier);
4110
4111#endif 4110#endif
4111
4112 ret = pci_register_driver(&ixgbe_driver); 4112 ret = pci_register_driver(&ixgbe_driver);
4113 return ret; 4113 return ret;
4114} 4114}
@@ -4123,13 +4123,13 @@ module_init(ixgbe_init_module);
4123 **/ 4123 **/
4124static void __exit ixgbe_exit_module(void) 4124static void __exit ixgbe_exit_module(void)
4125{ 4125{
4126#if defined(CONFIG_DCA) || defined(CONFIG_DCA_MODULE) 4126#ifdef CONFIG_IXGBE_DCA
4127 dca_unregister_notify(&dca_notifier); 4127 dca_unregister_notify(&dca_notifier);
4128#endif 4128#endif
4129 pci_unregister_driver(&ixgbe_driver); 4129 pci_unregister_driver(&ixgbe_driver);
4130} 4130}
4131 4131
4132#if defined(CONFIG_DCA) || defined(CONFIG_DCA_MODULE) 4132#ifdef CONFIG_IXGBE_DCA
4133static int ixgbe_notify_dca(struct notifier_block *nb, unsigned long event, 4133static int ixgbe_notify_dca(struct notifier_block *nb, unsigned long event,
4134 void *p) 4134 void *p)
4135{ 4135{
@@ -4140,7 +4140,7 @@ static int ixgbe_notify_dca(struct notifier_block *nb, unsigned long event,
4140 4140
4141 return ret_val ? NOTIFY_BAD : NOTIFY_DONE; 4141 return ret_val ? NOTIFY_BAD : NOTIFY_DONE;
4142} 4142}
4143#endif /* CONFIG_DCA or CONFIG_DCA_MODULE */ 4143#endif /* CONFIG_IXGBE_DCA */
4144 4144
4145module_exit(ixgbe_exit_module); 4145module_exit(ixgbe_exit_module);
4146 4146