mirror of
https://github.com/rd-stuffs/msm-4.14.git
synced 2025-02-20 11:45:48 +08:00
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>
This commit is contained in:
parent
004f23b9d3
commit
ead7b9406c
@ -2464,6 +2464,7 @@ config MYRI10GE
|
|||||||
select FW_LOADER
|
select FW_LOADER
|
||||||
select CRC32
|
select CRC32
|
||||||
select INET_LRO
|
select INET_LRO
|
||||||
|
select INTEL_IOATDMA
|
||||||
---help---
|
---help---
|
||||||
This driver supports Myricom Myri-10G Dual Protocol interface in
|
This driver supports Myricom Myri-10G Dual Protocol interface in
|
||||||
Ethernet mode. If the eeprom on your board is not recent enough,
|
Ethernet mode. If the eeprom on your board is not recent enough,
|
||||||
|
@ -183,7 +183,7 @@ struct myri10ge_slice_state {
|
|||||||
dma_addr_t fw_stats_bus;
|
dma_addr_t fw_stats_bus;
|
||||||
int watchdog_tx_done;
|
int watchdog_tx_done;
|
||||||
int watchdog_tx_req;
|
int watchdog_tx_req;
|
||||||
#ifdef CONFIG_DCA
|
#if (defined CONFIG_DCA) || (defined CONFIG_DCA_MODULE)
|
||||||
int cached_dca_tag;
|
int cached_dca_tag;
|
||||||
int cpu;
|
int cpu;
|
||||||
__be32 __iomem *dca_tag;
|
__be32 __iomem *dca_tag;
|
||||||
@ -215,7 +215,7 @@ struct myri10ge_priv {
|
|||||||
int msi_enabled;
|
int msi_enabled;
|
||||||
int msix_enabled;
|
int msix_enabled;
|
||||||
struct msix_entry *msix_vectors;
|
struct msix_entry *msix_vectors;
|
||||||
#ifdef CONFIG_DCA
|
#if (defined CONFIG_DCA) || (defined CONFIG_DCA_MODULE)
|
||||||
int dca_enabled;
|
int dca_enabled;
|
||||||
#endif
|
#endif
|
||||||
u32 link_state;
|
u32 link_state;
|
||||||
@ -891,7 +891,7 @@ static int myri10ge_reset(struct myri10ge_priv *mgp)
|
|||||||
struct myri10ge_slice_state *ss;
|
struct myri10ge_slice_state *ss;
|
||||||
int i, status;
|
int i, status;
|
||||||
size_t bytes;
|
size_t bytes;
|
||||||
#ifdef CONFIG_DCA
|
#if (defined CONFIG_DCA) || (defined CONFIG_DCA_MODULE)
|
||||||
unsigned long dca_tag_off;
|
unsigned long dca_tag_off;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
@ -986,7 +986,7 @@ static int myri10ge_reset(struct myri10ge_priv *mgp)
|
|||||||
}
|
}
|
||||||
put_be32(htonl(mgp->intr_coal_delay), mgp->intr_coal_delay_ptr);
|
put_be32(htonl(mgp->intr_coal_delay), mgp->intr_coal_delay_ptr);
|
||||||
|
|
||||||
#ifdef CONFIG_DCA
|
#if (defined CONFIG_DCA) || (defined CONFIG_DCA_MODULE)
|
||||||
status = myri10ge_send_cmd(mgp, MXGEFW_CMD_GET_DCA_OFFSET, &cmd, 0);
|
status = myri10ge_send_cmd(mgp, MXGEFW_CMD_GET_DCA_OFFSET, &cmd, 0);
|
||||||
dca_tag_off = cmd.data0;
|
dca_tag_off = cmd.data0;
|
||||||
for (i = 0; i < mgp->num_slices; i++) {
|
for (i = 0; i < mgp->num_slices; i++) {
|
||||||
@ -1025,7 +1025,7 @@ static int myri10ge_reset(struct myri10ge_priv *mgp)
|
|||||||
return status;
|
return status;
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef CONFIG_DCA
|
#if (defined CONFIG_DCA) || (defined CONFIG_DCA_MODULE)
|
||||||
static void
|
static void
|
||||||
myri10ge_write_dca(struct myri10ge_slice_state *ss, int cpu, int tag)
|
myri10ge_write_dca(struct myri10ge_slice_state *ss, int cpu, int tag)
|
||||||
{
|
{
|
||||||
@ -1458,7 +1458,7 @@ static int myri10ge_poll(struct napi_struct *napi, int budget)
|
|||||||
struct net_device *netdev = ss->mgp->dev;
|
struct net_device *netdev = ss->mgp->dev;
|
||||||
int work_done;
|
int work_done;
|
||||||
|
|
||||||
#ifdef CONFIG_DCA
|
#if (defined CONFIG_DCA) || (defined CONFIG_DCA_MODULE)
|
||||||
if (ss->mgp->dca_enabled)
|
if (ss->mgp->dca_enabled)
|
||||||
myri10ge_update_dca(ss);
|
myri10ge_update_dca(ss);
|
||||||
#endif
|
#endif
|
||||||
@ -1687,7 +1687,7 @@ static const char myri10ge_gstrings_main_stats[][ETH_GSTRING_LEN] = {
|
|||||||
"tx_boundary", "WC", "irq", "MSI", "MSIX",
|
"tx_boundary", "WC", "irq", "MSI", "MSIX",
|
||||||
"read_dma_bw_MBs", "write_dma_bw_MBs", "read_write_dma_bw_MBs",
|
"read_dma_bw_MBs", "write_dma_bw_MBs", "read_write_dma_bw_MBs",
|
||||||
"serial_number", "watchdog_resets",
|
"serial_number", "watchdog_resets",
|
||||||
#ifdef CONFIG_DCA
|
#if (defined CONFIG_DCA) || (defined CONFIG_DCA_MODULE)
|
||||||
"dca_capable_firmware", "dca_device_present",
|
"dca_capable_firmware", "dca_device_present",
|
||||||
#endif
|
#endif
|
||||||
"link_changes", "link_up", "dropped_link_overflow",
|
"link_changes", "link_up", "dropped_link_overflow",
|
||||||
@ -1766,7 +1766,7 @@ myri10ge_get_ethtool_stats(struct net_device *netdev,
|
|||||||
data[i++] = (unsigned int)mgp->read_write_dma;
|
data[i++] = (unsigned int)mgp->read_write_dma;
|
||||||
data[i++] = (unsigned int)mgp->serial_number;
|
data[i++] = (unsigned int)mgp->serial_number;
|
||||||
data[i++] = (unsigned int)mgp->watchdog_resets;
|
data[i++] = (unsigned int)mgp->watchdog_resets;
|
||||||
#ifdef CONFIG_DCA
|
#if (defined CONFIG_DCA) || (defined CONFIG_DCA_MODULE)
|
||||||
data[i++] = (unsigned int)(mgp->ss[0].dca_tag != NULL);
|
data[i++] = (unsigned int)(mgp->ss[0].dca_tag != NULL);
|
||||||
data[i++] = (unsigned int)(mgp->dca_enabled);
|
data[i++] = (unsigned int)(mgp->dca_enabled);
|
||||||
#endif
|
#endif
|
||||||
@ -3764,7 +3764,7 @@ static int myri10ge_probe(struct pci_dev *pdev, const struct pci_device_id *ent)
|
|||||||
dev_err(&pdev->dev, "failed reset\n");
|
dev_err(&pdev->dev, "failed reset\n");
|
||||||
goto abort_with_slices;
|
goto abort_with_slices;
|
||||||
}
|
}
|
||||||
#ifdef CONFIG_DCA
|
#if (defined CONFIG_DCA) || (defined CONFIG_DCA_MODULE)
|
||||||
myri10ge_setup_dca(mgp);
|
myri10ge_setup_dca(mgp);
|
||||||
#endif
|
#endif
|
||||||
pci_set_drvdata(pdev, mgp);
|
pci_set_drvdata(pdev, mgp);
|
||||||
@ -3867,7 +3867,7 @@ static void myri10ge_remove(struct pci_dev *pdev)
|
|||||||
netdev = mgp->dev;
|
netdev = mgp->dev;
|
||||||
unregister_netdev(netdev);
|
unregister_netdev(netdev);
|
||||||
|
|
||||||
#ifdef CONFIG_DCA
|
#if (defined CONFIG_DCA) || (defined CONFIG_DCA_MODULE)
|
||||||
myri10ge_teardown_dca(mgp);
|
myri10ge_teardown_dca(mgp);
|
||||||
#endif
|
#endif
|
||||||
myri10ge_dummy_rdma(mgp, 0);
|
myri10ge_dummy_rdma(mgp, 0);
|
||||||
@ -3912,7 +3912,7 @@ static struct pci_driver myri10ge_driver = {
|
|||||||
#endif
|
#endif
|
||||||
};
|
};
|
||||||
|
|
||||||
#ifdef CONFIG_DCA
|
#if (defined CONFIG_DCA) || (defined CONFIG_DCA_MODULE)
|
||||||
static int
|
static int
|
||||||
myri10ge_notify_dca(struct notifier_block *nb, unsigned long event, void *p)
|
myri10ge_notify_dca(struct notifier_block *nb, unsigned long event, void *p)
|
||||||
{
|
{
|
||||||
@ -3944,7 +3944,7 @@ static __init int myri10ge_init_module(void)
|
|||||||
myri10ge_driver.name, myri10ge_rss_hash);
|
myri10ge_driver.name, myri10ge_rss_hash);
|
||||||
myri10ge_rss_hash = MXGEFW_RSS_HASH_TYPE_SRC_PORT;
|
myri10ge_rss_hash = MXGEFW_RSS_HASH_TYPE_SRC_PORT;
|
||||||
}
|
}
|
||||||
#ifdef CONFIG_DCA
|
#if (defined CONFIG_DCA) || (defined CONFIG_DCA_MODULE)
|
||||||
dca_register_notify(&myri10ge_dca_notifier);
|
dca_register_notify(&myri10ge_dca_notifier);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
@ -3955,7 +3955,7 @@ module_init(myri10ge_init_module);
|
|||||||
|
|
||||||
static __exit void myri10ge_cleanup_module(void)
|
static __exit void myri10ge_cleanup_module(void)
|
||||||
{
|
{
|
||||||
#ifdef CONFIG_DCA
|
#if (defined CONFIG_DCA) || (defined CONFIG_DCA_MODULE)
|
||||||
dca_unregister_notify(&myri10ge_dca_notifier);
|
dca_unregister_notify(&myri10ge_dca_notifier);
|
||||||
#endif
|
#endif
|
||||||
pci_unregister_driver(&myri10ge_driver);
|
pci_unregister_driver(&myri10ge_driver);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user