From: Benjamin Herrenschmidt <benh@kernel.crashing.org>
To: netdev@vger.kernel.org
Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Subject: [PATCH v2 5/9] ftgmac100: Add netpoll support
Date: Thu, 13 Apr 2017 14:39:12 +1000 [thread overview]
Message-ID: <20170413043916.7793-6-benh@kernel.crashing.org> (raw)
In-Reply-To: <20170413043916.7793-1-benh@kernel.crashing.org>
Just call the interrupt handler with interrupts locally disabled
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
---
drivers/net/ethernet/faraday/ftgmac100.c | 14 ++++++++++++++
1 file changed, 14 insertions(+)
diff --git a/drivers/net/ethernet/faraday/ftgmac100.c b/drivers/net/ethernet/faraday/ftgmac100.c
index 08fe228..b1fb729 100644
--- a/drivers/net/ethernet/faraday/ftgmac100.c
+++ b/drivers/net/ethernet/faraday/ftgmac100.c
@@ -1586,6 +1586,17 @@ static int ftgmac100_set_features(struct net_device *netdev,
return 0;
}
+#ifdef CONFIG_NET_POLL_CONTROLLER
+static void ftgmac100_poll_controller(struct net_device *netdev)
+{
+ unsigned long flags;
+
+ local_irq_save(flags);
+ ftgmac100_interrupt(netdev->irq, netdev);
+ local_irq_restore(flags);
+}
+#endif
+
static const struct net_device_ops ftgmac100_netdev_ops = {
.ndo_open = ftgmac100_open,
.ndo_stop = ftgmac100_stop,
@@ -1596,6 +1607,9 @@ static const struct net_device_ops ftgmac100_netdev_ops = {
.ndo_tx_timeout = ftgmac100_tx_timeout,
.ndo_set_rx_mode = ftgmac100_set_rx_mode,
.ndo_set_features = ftgmac100_set_features,
+#ifdef CONFIG_NET_POLL_CONTROLLER
+ .ndo_poll_controller = ftgmac100_poll_controller,
+#endif
};
static int ftgmac100_setup_mdio(struct net_device *netdev)
--
2.9.3
next prev parent reply other threads:[~2017-04-13 4:40 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-04-13 4:39 [PATCH v2 0/9] ftgmac100: Rework batch 5 - Features Benjamin Herrenschmidt
2017-04-13 4:39 ` [PATCH v2 1/9] ftgmac100: Add ethtool n-way reset call Benjamin Herrenschmidt
2017-04-13 4:39 ` [PATCH v2 2/9] ftgmac100: Add pause frames configuration and support Benjamin Herrenschmidt
2017-04-13 4:39 ` [PATCH v2 3/9] ftgmac100: Add ndo_set_rx_mode() and support for multicast & promisc Benjamin Herrenschmidt
2017-04-13 4:39 ` [PATCH v2 4/9] ftgmac100: Add vlan HW offload Benjamin Herrenschmidt
2017-04-13 4:39 ` Benjamin Herrenschmidt [this message]
2017-04-13 4:39 ` [PATCH v2 6/9] ftgmac100: Allow configuration of phy interface via device-tree Benjamin Herrenschmidt
2017-04-13 4:39 ` [PATCH v2 7/9] ftgmac100: Display the discovered PHY device info Benjamin Herrenschmidt
2017-04-13 4:39 ` [PATCH v2 8/9] ftgmac100: Fix potential ordering issue in NAPI poll Benjamin Herrenschmidt
2017-04-13 4:39 ` [PATCH v2 9/9] ftgmac100: Document device-tree binding Benjamin Herrenschmidt
2017-04-17 15:11 ` [PATCH v2 0/9] ftgmac100: Rework batch 5 - Features David Miller
2017-04-17 20:44 ` Benjamin Herrenschmidt
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=20170413043916.7793-6-benh@kernel.crashing.org \
--to=benh@kernel.crashing.org \
--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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.