diff options
-rw-r--r-- | drivers/net/ethernet/chelsio/Kconfig | 2 | ||||
-rw-r--r-- | drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c | 8 |
2 files changed, 9 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 411acf0268fb..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; |
@@ -4529,6 +4530,7 @@ static void update_clip(const struct adapter *adap) | |||
4529 | } | 4530 | } |
4530 | rcu_read_unlock(); | 4531 | rcu_read_unlock(); |
4531 | } | 4532 | } |
4533 | #endif /* IS_ENABLED(CONFIG_IPV6) */ | ||
4532 | 4534 | ||
4533 | /** | 4535 | /** |
4534 | * cxgb_up - enable the adapter | 4536 | * cxgb_up - enable the adapter |
@@ -4575,7 +4577,9 @@ static int cxgb_up(struct adapter *adap) | |||
4575 | t4_intr_enable(adap); | 4577 | t4_intr_enable(adap); |
4576 | adap->flags |= FULL_INIT_DONE; | 4578 | adap->flags |= FULL_INIT_DONE; |
4577 | notify_ulds(adap, CXGB4_STATE_UP); | 4579 | notify_ulds(adap, CXGB4_STATE_UP); |
4580 | #if IS_ENABLED(CONFIG_IPV6) | ||
4578 | update_clip(adap); | 4581 | update_clip(adap); |
4582 | #endif | ||
4579 | out: | 4583 | out: |
4580 | return err; | 4584 | return err; |
4581 | irq_err: | 4585 | irq_err: |
@@ -6869,14 +6873,18 @@ static int __init cxgb4_init_module(void) | |||
6869 | if (ret < 0) | 6873 | if (ret < 0) |
6870 | debugfs_remove(cxgb4_debugfs_root); | 6874 | debugfs_remove(cxgb4_debugfs_root); |
6871 | 6875 | ||
6876 | #if IS_ENABLED(CONFIG_IPV6) | ||
6872 | register_inet6addr_notifier(&cxgb4_inet6addr_notifier); | 6877 | register_inet6addr_notifier(&cxgb4_inet6addr_notifier); |
6878 | #endif | ||
6873 | 6879 | ||
6874 | return ret; | 6880 | return ret; |
6875 | } | 6881 | } |
6876 | 6882 | ||
6877 | static void __exit cxgb4_cleanup_module(void) | 6883 | static void __exit cxgb4_cleanup_module(void) |
6878 | { | 6884 | { |
6885 | #if IS_ENABLED(CONFIG_IPV6) | ||
6879 | unregister_inet6addr_notifier(&cxgb4_inet6addr_notifier); | 6886 | unregister_inet6addr_notifier(&cxgb4_inet6addr_notifier); |
6887 | #endif | ||
6880 | pci_unregister_driver(&cxgb4_driver); | 6888 | pci_unregister_driver(&cxgb4_driver); |
6881 | debugfs_remove(cxgb4_debugfs_root); /* NULL ok */ | 6889 | debugfs_remove(cxgb4_debugfs_root); /* NULL ok */ |
6882 | } | 6890 | } |