diff options
author | Brice Goglin <brice@myri.com> | 2008-09-13 16:42:07 -0400 |
---|---|---|
committer | Jeff Garzik <jgarzik@redhat.com> | 2008-09-24 18:58:57 -0400 |
commit | ead7b9406c252014175bdf7c6c31894edfa0d1fa (patch) | |
tree | 85c419de9346280d356727c969da9202d99ee140 /drivers/net/myri10ge/myri10ge.c | |
parent | 004f23b9d3874efc81d2d1cf18fd0fe48dc2f26f (diff) |
myri10ge: use DCA if DCA is compiled as a module
Use DCA in myri10ge when CONFIG_DCA_MODULE is set as well.
And thus force INTEL_IOATDMA to =y so that DCA=y if we are =y.
Signed-off-by: Brice Goglin <brice@myri.com>
Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
Diffstat (limited to 'drivers/net/myri10ge/myri10ge.c')
-rw-r--r-- | drivers/net/myri10ge/myri10ge.c | 26 |
1 files changed, 13 insertions, 13 deletions
diff --git a/drivers/net/myri10ge/myri10ge.c b/drivers/net/myri10ge/myri10ge.c index ce9fc66e73b7..005f2aa75019 100644 --- a/drivers/net/myri10ge/myri10ge.c +++ b/drivers/net/myri10ge/myri10ge.c | |||
@@ -183,7 +183,7 @@ struct myri10ge_slice_state { | |||
183 | dma_addr_t fw_stats_bus; | 183 | dma_addr_t fw_stats_bus; |
184 | int watchdog_tx_done; | 184 | int watchdog_tx_done; |
185 | int watchdog_tx_req; | 185 | int watchdog_tx_req; |
186 | #ifdef CONFIG_DCA | 186 | #if (defined CONFIG_DCA) || (defined CONFIG_DCA_MODULE) |
187 | int cached_dca_tag; | 187 | int cached_dca_tag; |
188 | int cpu; | 188 | int cpu; |
189 | __be32 __iomem *dca_tag; | 189 | __be32 __iomem *dca_tag; |
@@ -215,7 +215,7 @@ struct myri10ge_priv { | |||
215 | int msi_enabled; | 215 | int msi_enabled; |
216 | int msix_enabled; | 216 | int msix_enabled; |
217 | struct msix_entry *msix_vectors; | 217 | struct msix_entry *msix_vectors; |
218 | #ifdef CONFIG_DCA | 218 | #if (defined CONFIG_DCA) || (defined CONFIG_DCA_MODULE) |
219 | int dca_enabled; | 219 | int dca_enabled; |
220 | #endif | 220 | #endif |
221 | u32 link_state; | 221 | u32 link_state; |
@@ -891,7 +891,7 @@ static int myri10ge_reset(struct myri10ge_priv *mgp) | |||
891 | struct myri10ge_slice_state *ss; | 891 | struct myri10ge_slice_state *ss; |
892 | int i, status; | 892 | int i, status; |
893 | size_t bytes; | 893 | size_t bytes; |
894 | #ifdef CONFIG_DCA | 894 | #if (defined CONFIG_DCA) || (defined CONFIG_DCA_MODULE) |
895 | unsigned long dca_tag_off; | 895 | unsigned long dca_tag_off; |
896 | #endif | 896 | #endif |
897 | 897 | ||
@@ -986,7 +986,7 @@ static int myri10ge_reset(struct myri10ge_priv *mgp) | |||
986 | } | 986 | } |
987 | put_be32(htonl(mgp->intr_coal_delay), mgp->intr_coal_delay_ptr); | 987 | put_be32(htonl(mgp->intr_coal_delay), mgp->intr_coal_delay_ptr); |
988 | 988 | ||
989 | #ifdef CONFIG_DCA | 989 | #if (defined CONFIG_DCA) || (defined CONFIG_DCA_MODULE) |
990 | status = myri10ge_send_cmd(mgp, MXGEFW_CMD_GET_DCA_OFFSET, &cmd, 0); | 990 | status = myri10ge_send_cmd(mgp, MXGEFW_CMD_GET_DCA_OFFSET, &cmd, 0); |
991 | dca_tag_off = cmd.data0; | 991 | dca_tag_off = cmd.data0; |
992 | for (i = 0; i < mgp->num_slices; i++) { | 992 | for (i = 0; i < mgp->num_slices; i++) { |
@@ -1025,7 +1025,7 @@ static int myri10ge_reset(struct myri10ge_priv *mgp) | |||
1025 | return status; | 1025 | return status; |
1026 | } | 1026 | } |
1027 | 1027 | ||
1028 | #ifdef CONFIG_DCA | 1028 | #if (defined CONFIG_DCA) || (defined CONFIG_DCA_MODULE) |
1029 | static void | 1029 | static void |
1030 | myri10ge_write_dca(struct myri10ge_slice_state *ss, int cpu, int tag) | 1030 | myri10ge_write_dca(struct myri10ge_slice_state *ss, int cpu, int tag) |
1031 | { | 1031 | { |
@@ -1458,7 +1458,7 @@ static int myri10ge_poll(struct napi_struct *napi, int budget) | |||
1458 | struct net_device *netdev = ss->mgp->dev; | 1458 | struct net_device *netdev = ss->mgp->dev; |
1459 | int work_done; | 1459 | int work_done; |
1460 | 1460 | ||
1461 | #ifdef CONFIG_DCA | 1461 | #if (defined CONFIG_DCA) || (defined CONFIG_DCA_MODULE) |
1462 | if (ss->mgp->dca_enabled) | 1462 | if (ss->mgp->dca_enabled) |
1463 | myri10ge_update_dca(ss); | 1463 | myri10ge_update_dca(ss); |
1464 | #endif | 1464 | #endif |
@@ -1687,7 +1687,7 @@ static const char myri10ge_gstrings_main_stats[][ETH_GSTRING_LEN] = { | |||
1687 | "tx_boundary", "WC", "irq", "MSI", "MSIX", | 1687 | "tx_boundary", "WC", "irq", "MSI", "MSIX", |
1688 | "read_dma_bw_MBs", "write_dma_bw_MBs", "read_write_dma_bw_MBs", | 1688 | "read_dma_bw_MBs", "write_dma_bw_MBs", "read_write_dma_bw_MBs", |
1689 | "serial_number", "watchdog_resets", | 1689 | "serial_number", "watchdog_resets", |
1690 | #ifdef CONFIG_DCA | 1690 | #if (defined CONFIG_DCA) || (defined CONFIG_DCA_MODULE) |
1691 | "dca_capable_firmware", "dca_device_present", | 1691 | "dca_capable_firmware", "dca_device_present", |
1692 | #endif | 1692 | #endif |
1693 | "link_changes", "link_up", "dropped_link_overflow", | 1693 | "link_changes", "link_up", "dropped_link_overflow", |
@@ -1766,7 +1766,7 @@ myri10ge_get_ethtool_stats(struct net_device *netdev, | |||
1766 | data[i++] = (unsigned int)mgp->read_write_dma; | 1766 | data[i++] = (unsigned int)mgp->read_write_dma; |
1767 | data[i++] = (unsigned int)mgp->serial_number; | 1767 | data[i++] = (unsigned int)mgp->serial_number; |
1768 | data[i++] = (unsigned int)mgp->watchdog_resets; | 1768 | data[i++] = (unsigned int)mgp->watchdog_resets; |
1769 | #ifdef CONFIG_DCA | 1769 | #if (defined CONFIG_DCA) || (defined CONFIG_DCA_MODULE) |
1770 | data[i++] = (unsigned int)(mgp->ss[0].dca_tag != NULL); | 1770 | data[i++] = (unsigned int)(mgp->ss[0].dca_tag != NULL); |
1771 | data[i++] = (unsigned int)(mgp->dca_enabled); | 1771 | data[i++] = (unsigned int)(mgp->dca_enabled); |
1772 | #endif | 1772 | #endif |
@@ -3764,7 +3764,7 @@ static int myri10ge_probe(struct pci_dev *pdev, const struct pci_device_id *ent) | |||
3764 | dev_err(&pdev->dev, "failed reset\n"); | 3764 | dev_err(&pdev->dev, "failed reset\n"); |
3765 | goto abort_with_slices; | 3765 | goto abort_with_slices; |
3766 | } | 3766 | } |
3767 | #ifdef CONFIG_DCA | 3767 | #if (defined CONFIG_DCA) || (defined CONFIG_DCA_MODULE) |
3768 | myri10ge_setup_dca(mgp); | 3768 | myri10ge_setup_dca(mgp); |
3769 | #endif | 3769 | #endif |
3770 | pci_set_drvdata(pdev, mgp); | 3770 | pci_set_drvdata(pdev, mgp); |
@@ -3867,7 +3867,7 @@ static void myri10ge_remove(struct pci_dev *pdev) | |||
3867 | netdev = mgp->dev; | 3867 | netdev = mgp->dev; |
3868 | unregister_netdev(netdev); | 3868 | unregister_netdev(netdev); |
3869 | 3869 | ||
3870 | #ifdef CONFIG_DCA | 3870 | #if (defined CONFIG_DCA) || (defined CONFIG_DCA_MODULE) |
3871 | myri10ge_teardown_dca(mgp); | 3871 | myri10ge_teardown_dca(mgp); |
3872 | #endif | 3872 | #endif |
3873 | myri10ge_dummy_rdma(mgp, 0); | 3873 | myri10ge_dummy_rdma(mgp, 0); |
@@ -3912,7 +3912,7 @@ static struct pci_driver myri10ge_driver = { | |||
3912 | #endif | 3912 | #endif |
3913 | }; | 3913 | }; |
3914 | 3914 | ||
3915 | #ifdef CONFIG_DCA | 3915 | #if (defined CONFIG_DCA) || (defined CONFIG_DCA_MODULE) |
3916 | static int | 3916 | static int |
3917 | myri10ge_notify_dca(struct notifier_block *nb, unsigned long event, void *p) | 3917 | myri10ge_notify_dca(struct notifier_block *nb, unsigned long event, void *p) |
3918 | { | 3918 | { |
@@ -3944,7 +3944,7 @@ static __init int myri10ge_init_module(void) | |||
3944 | myri10ge_driver.name, myri10ge_rss_hash); | 3944 | myri10ge_driver.name, myri10ge_rss_hash); |
3945 | myri10ge_rss_hash = MXGEFW_RSS_HASH_TYPE_SRC_PORT; | 3945 | myri10ge_rss_hash = MXGEFW_RSS_HASH_TYPE_SRC_PORT; |
3946 | } | 3946 | } |
3947 | #ifdef CONFIG_DCA | 3947 | #if (defined CONFIG_DCA) || (defined CONFIG_DCA_MODULE) |
3948 | dca_register_notify(&myri10ge_dca_notifier); | 3948 | dca_register_notify(&myri10ge_dca_notifier); |
3949 | #endif | 3949 | #endif |
3950 | 3950 | ||
@@ -3955,7 +3955,7 @@ module_init(myri10ge_init_module); | |||
3955 | 3955 | ||
3956 | static __exit void myri10ge_cleanup_module(void) | 3956 | static __exit void myri10ge_cleanup_module(void) |
3957 | { | 3957 | { |
3958 | #ifdef CONFIG_DCA | 3958 | #if (defined CONFIG_DCA) || (defined CONFIG_DCA_MODULE) |
3959 | dca_unregister_notify(&myri10ge_dca_notifier); | 3959 | dca_unregister_notify(&myri10ge_dca_notifier); |
3960 | #endif | 3960 | #endif |
3961 | pci_unregister_driver(&myri10ge_driver); | 3961 | pci_unregister_driver(&myri10ge_driver); |