mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Xander Huff <xander.huff@ni.com>
To: f.fainelli@gmail.com
Cc: netdev@vger.kernel.org, linux-kernel@vger.kernel.org,
	brad.mouring@ni.com, Nathan Sullivan <nathan.sullivan@ni.com>,
	xander.huff@ni.com
Subject: [PATCH] phy: request shared IRQ
Date: Wed, 24 Aug 2016 12:53:36 -0500	[thread overview]
Message-ID: <1472061216-11111-1-git-send-email-xander.huff@ni.com> (raw)

From: Nathan Sullivan <nathan.sullivan@ni.com>

On hardware with multiple PHY devices hooked up to the same IRQ line, allow
them to share it.

Signed-off-by: Nathan Sullivan <nathan.sullivan@ni.com>
Signed-off-by: Xander Huff <xander.huff@ni.com>
Acked-by: Ben Shelton <ben.shelton@ni.com>
Acked-by: Jaeden Amero <jaeden.amero@ni.com>
---
 drivers/net/phy/phy.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/net/phy/phy.c b/drivers/net/phy/phy.c
index c5dc2c36..0050531 100644
--- a/drivers/net/phy/phy.c
+++ b/drivers/net/phy/phy.c
@@ -722,8 +722,8 @@ phy_err:
 int phy_start_interrupts(struct phy_device *phydev)
 {
 	atomic_set(&phydev->irq_disable, 0);
-	if (request_irq(phydev->irq, phy_interrupt, 0, "phy_interrupt",
-			phydev) < 0) {
+	if (request_irq(phydev->irq, phy_interrupt, IRQF_SHARED,
+			"phy_interrupt", phydev) < 0) {
 		pr_warn("%s: Can't get IRQ %d (PHY)\n",
 			phydev->mdio.bus->name, phydev->irq);
 		phydev->irq = PHY_POLL;
-- 
1.9.1

             reply	other threads:[~2016-08-24 17:54 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-08-24 17:53 Xander Huff [this message]
2016-08-24 18:41 ` Sergei Shtylyov
2016-08-24 21:15   ` Xander Huff
2016-08-24 21:47   ` [PATCH v2] Revert "phy: IRQ cannot be shared" Xander Huff
2016-08-25 23:54     ` 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=1472061216-11111-1-git-send-email-xander.huff@ni.com \
    --to=xander.huff@ni.com \
    --cc=brad.mouring@ni.com \
    --cc=f.fainelli@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=nathan.sullivan@ni.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

all inboxes | Powered by JetHome®