mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Xander Huff <xander.huff@ni.com>
To: f.fainelli@gmail.com, sergei.shtylyov@cogentembedded.com
Cc: netdev@vger.kernel.org, brad.mouring@ni.com,
	Xander Huff <xander.huff@ni.com>,
	linux-kernel@vger.kernel.org,
	Nathan Sullivan <nathan.sullivan@ni.com>
Subject: [PATCH v2] Revert "phy: IRQ cannot be shared"
Date: Wed, 24 Aug 2016 16:47:53 -0500	[thread overview]
Message-ID: <1472075273-16257-1-git-send-email-xander.huff@ni.com> (raw)
In-Reply-To: <e2248086-6087-0fcd-1338-8f6463943c62@cogentembedded.com>

This reverts:
  commit 33c133cc7598 ("phy: IRQ cannot be shared")

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

Sergei Shtylyov says:
  "I'm not sure now what was the reason I concluded that the IRQ sharing
  was impossible... most probably I thought that the kernel IRQ handling
  code exited the loop over the IRQ actions once IRQ_HANDLED was returned
  -- which is obviously not so in reality..."

Signed-off-by: Xander Huff <xander.huff@ni.com>
Signed-off-by: Nathan Sullivan <nathan.sullivan@ni.com>
---
Note: this reverted code fails "CHECK: Alignment should match open
parentesis"
---
 drivers/net/phy/phy.c | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/drivers/net/phy/phy.c b/drivers/net/phy/phy.c
index c5dc2c36..c6f6683 100644
--- a/drivers/net/phy/phy.c
+++ b/drivers/net/phy/phy.c
@@ -722,8 +722,10 @@ 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

  parent reply	other threads:[~2016-08-24 22:02 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-08-24 17:53 [PATCH] phy: request shared IRQ Xander Huff
2016-08-24 18:41 ` Sergei Shtylyov
2016-08-24 21:15   ` Xander Huff
2016-08-24 21:47   ` Xander Huff [this message]
2016-08-25 23:54     ` [PATCH v2] Revert "phy: IRQ cannot be shared" 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=1472075273-16257-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 \
    --cc=sergei.shtylyov@cogentembedded.com \
    /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®