lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <1472724886-28301-3-git-send-email-bharatku@xilinx.com>
Date:   Thu, 1 Sep 2016 15:44:43 +0530
From:   Bharat Kumar Gogada <bharat.kumar.gogada@...inx.com>
To:     <bhelgaas@...gle.com>, <soren.brinkmann@...inx.com>,
        <christophe.jaillet@...adoo.fr>, <grygorii.strashko@...com>,
        <yinghai@...nel.org>, <lorenzo.pieralisi@....com>,
        <fengguang.wu@...el.com>, <michal.simek@...inx.com>,
        <arnd@...db.de>
CC:     <linux-arm-kernel@...ts.infradead.org>,
        <linux-pci@...r.kernel.org>, <linux-kernel@...r.kernel.org>,
        <rgummal@...inx.com>, Bharat Kumar Gogada <bharatku@...inx.com>
Subject: [PATCH 3/6] PCI: Xilinx: Clear correct msi set bit

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@...inx.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

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ