diff options
author | David S. Miller <davem@davemloft.net> | 2014-10-15 00:29:08 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2014-10-15 00:29:08 -0400 |
commit | 2ef1e9efebce49ffc9ae13a6e9d93da83734494e (patch) | |
tree | c89d5539712b1ae3ebe8425d52aab10ff3d9e17d /drivers/net/ethernet | |
parent | 9b462d02d6dd671a9ebdc45caed6fe98a53c0ebe (diff) | |
parent | c5bbcb5822b25c9f738db98e6d6ad2506cab8136 (diff) |
Merge branch 'cxgb4'
Anish Bhatt says:
====================
ipv6 and related cleanup for cxgb4/cxgb4i
This patch set removes some duplicated/extraneous code from cxgb4i, guards
cxgb4 against compilation failure based on ipv6 tristate, make ipv6 related
code no longer be enabled by default irrespective of ipv6 tristate and fixes
a refcnt issue.
-Anish
v2 : Provide more detailed commit messages, make subject more concise as
recommended by Dave Miller.
====================
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/ethernet')
-rw-r--r-- | drivers/net/ethernet/chelsio/Kconfig | 2 | ||||
-rw-r--r-- | drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c | 15 |
2 files changed, 16 insertions, 1 deletions
diff --git a/drivers/net/ethernet/chelsio/Kconfig b/drivers/net/ethernet/chelsio/Kconfig index c3ce9df0041a..ac6473f75eb9 100644 --- a/drivers/net/ethernet/chelsio/Kconfig +++ b/drivers/net/ethernet/chelsio/Kconfig | |||
@@ -68,7 +68,7 @@ config CHELSIO_T3 | |||
68 | 68 | ||
69 | config CHELSIO_T4 | 69 | config CHELSIO_T4 |
70 | tristate "Chelsio Communications T4/T5 Ethernet support" | 70 | tristate "Chelsio Communications T4/T5 Ethernet support" |
71 | depends on PCI | 71 | depends on PCI && (IPV6 || IPV6=n) |
72 | select FW_LOADER | 72 | select FW_LOADER |
73 | select MDIO | 73 | select MDIO |
74 | ---help--- | 74 | ---help--- |
diff --git a/drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c b/drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c index fed8f26ee67b..3f60070f2519 100644 --- a/drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c +++ b/drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c | |||
@@ -4369,6 +4369,7 @@ EXPORT_SYMBOL(cxgb4_unregister_uld); | |||
4369 | * success (true) if it belongs otherwise failure (false). | 4369 | * success (true) if it belongs otherwise failure (false). |
4370 | * Called with rcu_read_lock() held. | 4370 | * Called with rcu_read_lock() held. |
4371 | */ | 4371 | */ |
4372 | #if IS_ENABLED(CONFIG_IPV6) | ||
4372 | static bool cxgb4_netdev(const struct net_device *netdev) | 4373 | static bool cxgb4_netdev(const struct net_device *netdev) |
4373 | { | 4374 | { |
4374 | struct adapter *adap; | 4375 | struct adapter *adap; |
@@ -4490,6 +4491,13 @@ static int update_root_dev_clip(struct net_device *dev) | |||
4490 | return ret; | 4491 | return ret; |
4491 | 4492 | ||
4492 | /* Parse all bond and vlan devices layered on top of the physical dev */ | 4493 | /* Parse all bond and vlan devices layered on top of the physical dev */ |
4494 | root_dev = netdev_master_upper_dev_get_rcu(dev); | ||
4495 | if (root_dev) { | ||
4496 | ret = update_dev_clip(root_dev, dev); | ||
4497 | if (ret) | ||
4498 | return ret; | ||
4499 | } | ||
4500 | |||
4493 | for (i = 0; i < VLAN_N_VID; i++) { | 4501 | for (i = 0; i < VLAN_N_VID; i++) { |
4494 | root_dev = __vlan_find_dev_deep_rcu(dev, htons(ETH_P_8021Q), i); | 4502 | root_dev = __vlan_find_dev_deep_rcu(dev, htons(ETH_P_8021Q), i); |
4495 | if (!root_dev) | 4503 | if (!root_dev) |
@@ -4522,6 +4530,7 @@ static void update_clip(const struct adapter *adap) | |||
4522 | } | 4530 | } |
4523 | rcu_read_unlock(); | 4531 | rcu_read_unlock(); |
4524 | } | 4532 | } |
4533 | #endif /* IS_ENABLED(CONFIG_IPV6) */ | ||
4525 | 4534 | ||
4526 | /** | 4535 | /** |
4527 | * cxgb_up - enable the adapter | 4536 | * cxgb_up - enable the adapter |
@@ -4568,7 +4577,9 @@ static int cxgb_up(struct adapter *adap) | |||
4568 | t4_intr_enable(adap); | 4577 | t4_intr_enable(adap); |
4569 | adap->flags |= FULL_INIT_DONE; | 4578 | adap->flags |= FULL_INIT_DONE; |
4570 | notify_ulds(adap, CXGB4_STATE_UP); | 4579 | notify_ulds(adap, CXGB4_STATE_UP); |
4580 | #if IS_ENABLED(CONFIG_IPV6) | ||
4571 | update_clip(adap); | 4581 | update_clip(adap); |
4582 | #endif | ||
4572 | out: | 4583 | out: |
4573 | return err; | 4584 | return err; |
4574 | irq_err: | 4585 | irq_err: |
@@ -6862,14 +6873,18 @@ static int __init cxgb4_init_module(void) | |||
6862 | if (ret < 0) | 6873 | if (ret < 0) |
6863 | debugfs_remove(cxgb4_debugfs_root); | 6874 | debugfs_remove(cxgb4_debugfs_root); |
6864 | 6875 | ||
6876 | #if IS_ENABLED(CONFIG_IPV6) | ||
6865 | register_inet6addr_notifier(&cxgb4_inet6addr_notifier); | 6877 | register_inet6addr_notifier(&cxgb4_inet6addr_notifier); |
6878 | #endif | ||
6866 | 6879 | ||
6867 | return ret; | 6880 | return ret; |
6868 | } | 6881 | } |
6869 | 6882 | ||
6870 | static void __exit cxgb4_cleanup_module(void) | 6883 | static void __exit cxgb4_cleanup_module(void) |
6871 | { | 6884 | { |
6885 | #if IS_ENABLED(CONFIG_IPV6) | ||
6872 | unregister_inet6addr_notifier(&cxgb4_inet6addr_notifier); | 6886 | unregister_inet6addr_notifier(&cxgb4_inet6addr_notifier); |
6887 | #endif | ||
6873 | pci_unregister_driver(&cxgb4_driver); | 6888 | pci_unregister_driver(&cxgb4_driver); |
6874 | debugfs_remove(cxgb4_debugfs_root); /* NULL ok */ | 6889 | debugfs_remove(cxgb4_debugfs_root); /* NULL ok */ |
6875 | } | 6890 | } |