|
@@ -80,7 +80,7 @@ static struct pci_device_id ixgbe_pci_tbl[] = {
|
|
};
|
|
};
|
|
MODULE_DEVICE_TABLE(pci, ixgbe_pci_tbl);
|
|
MODULE_DEVICE_TABLE(pci, ixgbe_pci_tbl);
|
|
|
|
|
|
-#if defined(CONFIG_DCA) || defined(CONFIG_DCA_MODULE)
|
|
|
|
|
|
+#ifdef CONFIG_IXGBE_DCA
|
|
static int ixgbe_notify_dca(struct notifier_block *, unsigned long event,
|
|
static int ixgbe_notify_dca(struct notifier_block *, unsigned long event,
|
|
void *p);
|
|
void *p);
|
|
static struct notifier_block dca_notifier = {
|
|
static struct notifier_block dca_notifier = {
|
|
@@ -296,7 +296,7 @@ done_cleaning:
|
|
return (total_packets ? true : false);
|
|
return (total_packets ? true : false);
|
|
}
|
|
}
|
|
|
|
|
|
-#if defined(CONFIG_DCA) || defined(CONFIG_DCA_MODULE)
|
|
|
|
|
|
+#ifdef CONFIG_IXGBE_DCA
|
|
static void ixgbe_update_rx_dca(struct ixgbe_adapter *adapter,
|
|
static void ixgbe_update_rx_dca(struct ixgbe_adapter *adapter,
|
|
struct ixgbe_ring *rx_ring)
|
|
struct ixgbe_ring *rx_ring)
|
|
{
|
|
{
|
|
@@ -383,7 +383,7 @@ static int __ixgbe_notify_dca(struct device *dev, void *data)
|
|
return 0;
|
|
return 0;
|
|
}
|
|
}
|
|
|
|
|
|
-#endif /* CONFIG_DCA or CONFIG_DCA_MODULE */
|
|
|
|
|
|
+#endif /* CONFIG_IXGBE_DCA */
|
|
/**
|
|
/**
|
|
* ixgbe_receive_skb - Send a completed packet up the stack
|
|
* ixgbe_receive_skb - Send a completed packet up the stack
|
|
* @adapter: board private structure
|
|
* @adapter: board private structure
|
|
@@ -947,7 +947,7 @@ static irqreturn_t ixgbe_msix_clean_tx(int irq, void *data)
|
|
r_idx = find_first_bit(q_vector->txr_idx, adapter->num_tx_queues);
|
|
r_idx = find_first_bit(q_vector->txr_idx, adapter->num_tx_queues);
|
|
for (i = 0; i < q_vector->txr_count; i++) {
|
|
for (i = 0; i < q_vector->txr_count; i++) {
|
|
tx_ring = &(adapter->tx_ring[r_idx]);
|
|
tx_ring = &(adapter->tx_ring[r_idx]);
|
|
-#if defined(CONFIG_DCA) || defined(CONFIG_DCA_MODULE)
|
|
|
|
|
|
+#ifdef CONFIG_IXGBE_DCA
|
|
if (adapter->flags & IXGBE_FLAG_DCA_ENABLED)
|
|
if (adapter->flags & IXGBE_FLAG_DCA_ENABLED)
|
|
ixgbe_update_tx_dca(adapter, tx_ring);
|
|
ixgbe_update_tx_dca(adapter, tx_ring);
|
|
#endif
|
|
#endif
|
|
@@ -1022,7 +1022,7 @@ static int ixgbe_clean_rxonly(struct napi_struct *napi, int budget)
|
|
|
|
|
|
r_idx = find_first_bit(q_vector->rxr_idx, adapter->num_rx_queues);
|
|
r_idx = find_first_bit(q_vector->rxr_idx, adapter->num_rx_queues);
|
|
rx_ring = &(adapter->rx_ring[r_idx]);
|
|
rx_ring = &(adapter->rx_ring[r_idx]);
|
|
-#if defined(CONFIG_DCA) || defined(CONFIG_DCA_MODULE)
|
|
|
|
|
|
+#ifdef CONFIG_IXGBE_DCA
|
|
if (adapter->flags & IXGBE_FLAG_DCA_ENABLED)
|
|
if (adapter->flags & IXGBE_FLAG_DCA_ENABLED)
|
|
ixgbe_update_rx_dca(adapter, rx_ring);
|
|
ixgbe_update_rx_dca(adapter, rx_ring);
|
|
#endif
|
|
#endif
|
|
@@ -1066,7 +1066,7 @@ static int ixgbe_clean_rxonly_many(struct napi_struct *napi, int budget)
|
|
r_idx = find_first_bit(q_vector->rxr_idx, adapter->num_rx_queues);
|
|
r_idx = find_first_bit(q_vector->rxr_idx, adapter->num_rx_queues);
|
|
for (i = 0; i < q_vector->rxr_count; i++) {
|
|
for (i = 0; i < q_vector->rxr_count; i++) {
|
|
rx_ring = &(adapter->rx_ring[r_idx]);
|
|
rx_ring = &(adapter->rx_ring[r_idx]);
|
|
-#if defined(CONFIG_DCA) || defined(CONFIG_DCA_MODULE)
|
|
|
|
|
|
+#ifdef CONFIG_IXGBE_DCA
|
|
if (adapter->flags & IXGBE_FLAG_DCA_ENABLED)
|
|
if (adapter->flags & IXGBE_FLAG_DCA_ENABLED)
|
|
ixgbe_update_rx_dca(adapter, rx_ring);
|
|
ixgbe_update_rx_dca(adapter, rx_ring);
|
|
#endif
|
|
#endif
|
|
@@ -2155,7 +2155,7 @@ void ixgbe_down(struct ixgbe_adapter *adapter)
|
|
|
|
|
|
netif_carrier_off(netdev);
|
|
netif_carrier_off(netdev);
|
|
|
|
|
|
-#if defined(CONFIG_DCA) || defined(CONFIG_DCA_MODULE)
|
|
|
|
|
|
+#ifdef CONFIG_IXGBE_DCA
|
|
if (adapter->flags & IXGBE_FLAG_DCA_ENABLED) {
|
|
if (adapter->flags & IXGBE_FLAG_DCA_ENABLED) {
|
|
adapter->flags &= ~IXGBE_FLAG_DCA_ENABLED;
|
|
adapter->flags &= ~IXGBE_FLAG_DCA_ENABLED;
|
|
dca_remove_requester(&adapter->pdev->dev);
|
|
dca_remove_requester(&adapter->pdev->dev);
|
|
@@ -2167,7 +2167,7 @@ void ixgbe_down(struct ixgbe_adapter *adapter)
|
|
ixgbe_clean_all_tx_rings(adapter);
|
|
ixgbe_clean_all_tx_rings(adapter);
|
|
ixgbe_clean_all_rx_rings(adapter);
|
|
ixgbe_clean_all_rx_rings(adapter);
|
|
|
|
|
|
-#if defined(CONFIG_DCA) || defined(CONFIG_DCA_MODULE)
|
|
|
|
|
|
+#ifdef CONFIG_IXGBE_DCA
|
|
/* since we reset the hardware DCA settings were cleared */
|
|
/* since we reset the hardware DCA settings were cleared */
|
|
if (dca_add_requester(&adapter->pdev->dev) == 0) {
|
|
if (dca_add_requester(&adapter->pdev->dev) == 0) {
|
|
adapter->flags |= IXGBE_FLAG_DCA_ENABLED;
|
|
adapter->flags |= IXGBE_FLAG_DCA_ENABLED;
|
|
@@ -2193,7 +2193,7 @@ static int ixgbe_poll(struct napi_struct *napi, int budget)
|
|
struct ixgbe_adapter *adapter = q_vector->adapter;
|
|
struct ixgbe_adapter *adapter = q_vector->adapter;
|
|
int tx_cleaned, work_done = 0;
|
|
int tx_cleaned, work_done = 0;
|
|
|
|
|
|
-#if defined(CONFIG_DCA) || defined(CONFIG_DCA_MODULE)
|
|
|
|
|
|
+#ifdef CONFIG_IXGBE_DCA
|
|
if (adapter->flags & IXGBE_FLAG_DCA_ENABLED) {
|
|
if (adapter->flags & IXGBE_FLAG_DCA_ENABLED) {
|
|
ixgbe_update_tx_dca(adapter, adapter->tx_ring);
|
|
ixgbe_update_tx_dca(adapter, adapter->tx_ring);
|
|
ixgbe_update_rx_dca(adapter, adapter->rx_ring);
|
|
ixgbe_update_rx_dca(adapter, adapter->rx_ring);
|
|
@@ -3922,7 +3922,7 @@ static int __devinit ixgbe_probe(struct pci_dev *pdev,
|
|
if (err)
|
|
if (err)
|
|
goto err_register;
|
|
goto err_register;
|
|
|
|
|
|
-#if defined(CONFIG_DCA) || defined(CONFIG_DCA_MODULE)
|
|
|
|
|
|
+#ifdef CONFIG_IXGBE_DCA
|
|
if (dca_add_requester(&pdev->dev) == 0) {
|
|
if (dca_add_requester(&pdev->dev) == 0) {
|
|
adapter->flags |= IXGBE_FLAG_DCA_ENABLED;
|
|
adapter->flags |= IXGBE_FLAG_DCA_ENABLED;
|
|
/* always use CB2 mode, difference is masked
|
|
/* always use CB2 mode, difference is masked
|
|
@@ -3972,7 +3972,7 @@ static void __devexit ixgbe_remove(struct pci_dev *pdev)
|
|
|
|
|
|
flush_scheduled_work();
|
|
flush_scheduled_work();
|
|
|
|
|
|
-#if defined(CONFIG_DCA) || defined(CONFIG_DCA_MODULE)
|
|
|
|
|
|
+#ifdef CONFIG_IXGBE_DCA
|
|
if (adapter->flags & IXGBE_FLAG_DCA_ENABLED) {
|
|
if (adapter->flags & IXGBE_FLAG_DCA_ENABLED) {
|
|
adapter->flags &= ~IXGBE_FLAG_DCA_ENABLED;
|
|
adapter->flags &= ~IXGBE_FLAG_DCA_ENABLED;
|
|
dca_remove_requester(&pdev->dev);
|
|
dca_remove_requester(&pdev->dev);
|
|
@@ -4105,10 +4105,10 @@ static int __init ixgbe_init_module(void)
|
|
|
|
|
|
printk(KERN_INFO "%s: %s\n", ixgbe_driver_name, ixgbe_copyright);
|
|
printk(KERN_INFO "%s: %s\n", ixgbe_driver_name, ixgbe_copyright);
|
|
|
|
|
|
-#if defined(CONFIG_DCA) || defined(CONFIG_DCA_MODULE)
|
|
|
|
|
|
+#ifdef CONFIG_IXGBE_DCA
|
|
dca_register_notify(&dca_notifier);
|
|
dca_register_notify(&dca_notifier);
|
|
-
|
|
|
|
#endif
|
|
#endif
|
|
|
|
+
|
|
ret = pci_register_driver(&ixgbe_driver);
|
|
ret = pci_register_driver(&ixgbe_driver);
|
|
return ret;
|
|
return ret;
|
|
}
|
|
}
|
|
@@ -4123,13 +4123,13 @@ module_init(ixgbe_init_module);
|
|
**/
|
|
**/
|
|
static void __exit ixgbe_exit_module(void)
|
|
static void __exit ixgbe_exit_module(void)
|
|
{
|
|
{
|
|
-#if defined(CONFIG_DCA) || defined(CONFIG_DCA_MODULE)
|
|
|
|
|
|
+#ifdef CONFIG_IXGBE_DCA
|
|
dca_unregister_notify(&dca_notifier);
|
|
dca_unregister_notify(&dca_notifier);
|
|
#endif
|
|
#endif
|
|
pci_unregister_driver(&ixgbe_driver);
|
|
pci_unregister_driver(&ixgbe_driver);
|
|
}
|
|
}
|
|
|
|
|
|
-#if defined(CONFIG_DCA) || defined(CONFIG_DCA_MODULE)
|
|
|
|
|
|
+#ifdef CONFIG_IXGBE_DCA
|
|
static int ixgbe_notify_dca(struct notifier_block *nb, unsigned long event,
|
|
static int ixgbe_notify_dca(struct notifier_block *nb, unsigned long event,
|
|
void *p)
|
|
void *p)
|
|
{
|
|
{
|
|
@@ -4140,7 +4140,7 @@ static int ixgbe_notify_dca(struct notifier_block *nb, unsigned long event,
|
|
|
|
|
|
return ret_val ? NOTIFY_BAD : NOTIFY_DONE;
|
|
return ret_val ? NOTIFY_BAD : NOTIFY_DONE;
|
|
}
|
|
}
|
|
-#endif /* CONFIG_DCA or CONFIG_DCA_MODULE */
|
|
|
|
|
|
+#endif /* CONFIG_IXGBE_DCA */
|
|
|
|
|
|
module_exit(ixgbe_exit_module);
|
|
module_exit(ixgbe_exit_module);
|
|
|
|
|