From: Anish Bhatt <anish@chelsio.com>
To: netdev@vger.kernel.org
Cc: davem@davemloft.net, hariprasad@chelsio.com, leedom@chelsio.com,
kxie@chelsio.com, manojmalviya@chelsio.com,
Anish Bhatt <anish@chelsio.com>
Subject: [PATCH net 2/4] cxgb4 : Fix build failure in cxgb4 when ipv6 is disabled/not in-built
Date: Tue, 14 Oct 2014 15:13:09 -0700 [thread overview]
Message-ID: <1413324791-12104-3-git-send-email-anish@chelsio.com> (raw)
In-Reply-To: <1413324791-12104-1-git-send-email-anish@chelsio.com>
Signed-off-by: Anish Bhatt <anish@chelsio.com>
---
drivers/net/ethernet/chelsio/Kconfig | 2 +-
drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c | 8 ++++++++
2 files changed, 9 insertions(+), 1 deletion(-)
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
config CHELSIO_T4
tristate "Chelsio Communications T4/T5 Ethernet support"
- depends on PCI
+ depends on PCI && (IPV6 || IPV6=n)
select FW_LOADER
select MDIO
---help---
diff --git a/drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c b/drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c
index 6222a42f7a2a..ff9fb1629815 100644
--- a/drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c
+++ b/drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c
@@ -4359,6 +4359,7 @@ EXPORT_SYMBOL(cxgb4_unregister_uld);
* success (true) if it belongs otherwise failure (false).
* Called with rcu_read_lock() held.
*/
+#if IS_ENABLED(CONFIG_IPV6)
static bool cxgb4_netdev(const struct net_device *netdev)
{
struct adapter *adap;
@@ -4519,6 +4520,7 @@ static void update_clip(const struct adapter *adap)
}
rcu_read_unlock();
}
+#endif /* IS_ENABLED(CONFIG_IPV6) */
/**
* cxgb_up - enable the adapter
@@ -4565,7 +4567,9 @@ static int cxgb_up(struct adapter *adap)
t4_intr_enable(adap);
adap->flags |= FULL_INIT_DONE;
notify_ulds(adap, CXGB4_STATE_UP);
+#if IS_ENABLED(CONFIG_IPV6)
update_clip(adap);
+#endif
out:
return err;
irq_err:
@@ -6855,14 +6859,18 @@ static int __init cxgb4_init_module(void)
if (ret < 0)
debugfs_remove(cxgb4_debugfs_root);
+#if IS_ENABLED(CONFIG_IPV6)
register_inet6addr_notifier(&cxgb4_inet6addr_notifier);
+#endif
return ret;
}
static void __exit cxgb4_cleanup_module(void)
{
+#if IS_ENABLED(CONFIG_IPV6)
unregister_inet6addr_notifier(&cxgb4_inet6addr_notifier);
+#endif
pci_unregister_driver(&cxgb4_driver);
debugfs_remove(cxgb4_debugfs_root); /* NULL ok */
}
--
2.1.2
next prev parent reply other threads:[~2014-10-14 22:13 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-10-14 22:13 [PATCH net 0/4] ipv6 and related cleanup for cxgb4/cxgb4i Anish Bhatt
2014-10-14 22:13 ` [PATCH net 1/4] cxgb4i : Remove duplicated code from cxgb4i, fucntionality already present in cxgb4 Anish Bhatt
2014-10-14 22:13 ` Anish Bhatt [this message]
2014-10-14 22:13 ` [PATCH net 3/4] cxgb4i : All this code is only needed when IPV6 is enabled, disable when not required, also fixes -Wunused-function warning Anish Bhatt
2014-10-14 22:13 ` [PATCH net 4/4] cxgb4i: Remove duplicate call to dst_neigh_lookup() Anish Bhatt
2014-10-15 1:52 ` [PATCH net 0/4] ipv6 and related cleanup for cxgb4/cxgb4i David Miller
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1413324791-12104-3-git-send-email-anish@chelsio.com \
--to=anish@chelsio.com \
--cc=davem@davemloft.net \
--cc=hariprasad@chelsio.com \
--cc=kxie@chelsio.com \
--cc=leedom@chelsio.com \
--cc=manojmalviya@chelsio.com \
--cc=netdev@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox