mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Bharat Kumar Gogada <bharat.kumar.gogada@xilinx.com>
To: <bhelgaas@google.com>, <soren.brinkmann@xilinx.com>,
	<christophe.jaillet@wanadoo.fr>, <grygorii.strashko@ti.com>,
	<yinghai@kernel.org>, <lorenzo.pieralisi@arm.com>,
	<fengguang.wu@intel.com>, <michal.simek@xilinx.com>,
	<arnd@arndb.de>
Cc: <linux-arm-kernel@lists.infradead.org>,
	<linux-pci@vger.kernel.org>, <linux-kernel@vger.kernel.org>,
	<rgummal@xilinx.com>, Bharat Kumar Gogada <bharatku@xilinx.com>
Subject: [PATCH 3/6] PCI: Xilinx: Clear correct msi set bit
Date: Thu, 1 Sep 2016 15:44:43 +0530	[thread overview]
Message-ID: <1472724886-28301-3-git-send-email-bharatku@xilinx.com> (raw)
In-Reply-To: <1472724886-28301-1-git-send-email-bharatku@xilinx.com>

Kernel provides virtual irq number at teardown.
Get hwirq number from virtual irq and clear correct
MSI set bit.

Signed-off-by: Bharat Kumar Gogada <bharatku@xilinx.com>
---
 drivers/pci/host/pcie-xilinx.c | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/drivers/pci/host/pcie-xilinx.c b/drivers/pci/host/pcie-xilinx.c
index de1c758..ec2844a 100644
--- a/drivers/pci/host/pcie-xilinx.c
+++ b/drivers/pci/host/pcie-xilinx.c
@@ -221,13 +221,15 @@ static void xilinx_pcie_destroy_msi(unsigned int irq)
 {
 	struct msi_desc *msi;
 	struct xilinx_pcie_port *port;
+	struct irq_data *d = irq_get_irq_data(irq);
+	irq_hw_number_t hwirq = irqd_to_hwirq(d);
 
-	if (!test_bit(irq, msi_irq_in_use)) {
+	if (!test_bit(hwirq, msi_irq_in_use)) {
 		msi = irq_get_msi_desc(irq);
 		port = msi_desc_to_pci_sysdata(msi);
 		dev_err(port->dev, "Trying to free unused MSI#%d\n", irq);
 	} else {
-		clear_bit(irq, msi_irq_in_use);
+		clear_bit(hwirq, msi_irq_in_use);
 	}
 }
 
-- 
2.1.1

  parent reply	other threads:[~2016-09-01 10:15 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-09-01 10:14 [PATCH 1/6] PCI: xilinx: Keep both legacy and MSI interrupt references Bharat Kumar Gogada
2016-09-01 10:14 ` [PATCH 2/6] PCI: Xilinx : Clear interrupt register for invalid interrupt Bharat Kumar Gogada
2016-09-01 10:14 ` Bharat Kumar Gogada [this message]
2016-09-01 10:14 ` [PATCH 4/6] PCI: Xilinx: Dispose MSI virtual irq Bharat Kumar Gogada
2016-09-01 10:14 ` [PATCH 5/6] PCI: Xilinx: Read more than one function per device Bharat Kumar Gogada
2016-09-01 10:14 ` [PATCH 6/6] Microblaze: Modify microblaze pci specific code to support multidomain Bharat Kumar Gogada
2016-09-12 22:21 ` [PATCH 1/6] PCI: xilinx: Keep both legacy and MSI interrupt references Bjorn Helgaas
2016-09-13 15:56 ` Bjorn Helgaas
2016-09-14 15:32   ` Bharat Kumar Gogada
2016-09-14 19:17     ` Bjorn Helgaas
2016-09-15  5:09       ` Bharat Kumar Gogada

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=1472724886-28301-3-git-send-email-bharatku@xilinx.com \
    --to=bharat.kumar.gogada@xilinx.com \
    --cc=arnd@arndb.de \
    --cc=bharatku@xilinx.com \
    --cc=bhelgaas@google.com \
    --cc=christophe.jaillet@wanadoo.fr \
    --cc=fengguang.wu@intel.com \
    --cc=grygorii.strashko@ti.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-pci@vger.kernel.org \
    --cc=lorenzo.pieralisi@arm.com \
    --cc=michal.simek@xilinx.com \
    --cc=rgummal@xilinx.com \
    --cc=soren.brinkmann@xilinx.com \
    --cc=yinghai@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®