Linux-PCI Archive on lore.kernel.org
 help / Atom feed
* [PATCH v2] PCI: dwc: Print debug error message when MSI-X entry control mask bit is set
@ 2018-12-07 17:24 Gustavo Pimentel
  2019-02-08 12:25 ` Lorenzo Pieralisi
  0 siblings, 1 reply; 2+ messages in thread
From: Gustavo Pimentel @ 2018-12-07 17:24 UTC (permalink / raw)
  To: lorenzo.pieralisi
  Cc: Gustavo Pimentel, Jingoo Han, Bjorn Helgaas, Joao Pinto, linux-pci

Add debug error message when MSI-X entry control mask bit is set, to help
debug the reason why a MSI-X interrupt is not being triggered.

Cc: Jingoo Han <jingoohan1@gmail.com>
Cc: Bjorn Helgaas <bhelgaas@google.com>
Cc: Joao Pinto <joao.pinto@synopsys.com>
Cc: linux-pci@vger.kernel.org
Signed-off-by: Gustavo Pimentel <gustavo.pimentel@synopsys.com>
---
 drivers/pci/controller/dwc/pcie-designware-ep.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/drivers/pci/controller/dwc/pcie-designware-ep.c b/drivers/pci/controller/dwc/pcie-designware-ep.c
index 1e7b022..a969322 100644
--- a/drivers/pci/controller/dwc/pcie-designware-ep.c
+++ b/drivers/pci/controller/dwc/pcie-designware-ep.c
@@ -466,8 +466,10 @@ int dw_pcie_ep_raise_msix_irq(struct dw_pcie_ep *ep, u8 func_no,
 
 	iounmap(msix_tbl);
 
-	if (vec_ctrl & PCI_MSIX_ENTRY_CTRL_MASKBIT)
+	if (vec_ctrl & PCI_MSIX_ENTRY_CTRL_MASKBIT) {
+		dev_dbg(pci->dev, "MSI-X entry ctrl set\n");
 		return -EPERM;
+	}
 
 	ret = dw_pcie_ep_map_addr(epc, func_no, ep->msi_mem_phys, msg_addr,
 				  epc->mem->page_size);
-- 
2.7.4


^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [PATCH v2] PCI: dwc: Print debug error message when MSI-X entry control mask bit is set
  2018-12-07 17:24 [PATCH v2] PCI: dwc: Print debug error message when MSI-X entry control mask bit is set Gustavo Pimentel
@ 2019-02-08 12:25 ` Lorenzo Pieralisi
  0 siblings, 0 replies; 2+ messages in thread
From: Lorenzo Pieralisi @ 2019-02-08 12:25 UTC (permalink / raw)
  To: Gustavo Pimentel; +Cc: Jingoo Han, Bjorn Helgaas, Joao Pinto, linux-pci

On Fri, Dec 07, 2018 at 06:24:37PM +0100, Gustavo Pimentel wrote:
> Add debug error message when MSI-X entry control mask bit is set, to help
> debug the reason why a MSI-X interrupt is not being triggered.
> 
> Cc: Jingoo Han <jingoohan1@gmail.com>
> Cc: Bjorn Helgaas <bhelgaas@google.com>
> Cc: Joao Pinto <joao.pinto@synopsys.com>
> Cc: linux-pci@vger.kernel.org
> Signed-off-by: Gustavo Pimentel <gustavo.pimentel@synopsys.com>
> ---
>  drivers/pci/controller/dwc/pcie-designware-ep.c | 4 +++-
>  1 file changed, 3 insertions(+), 1 deletion(-)

Applied to pci/dwc for v5.1, thanks.

Lorenzo

> diff --git a/drivers/pci/controller/dwc/pcie-designware-ep.c b/drivers/pci/controller/dwc/pcie-designware-ep.c
> index 1e7b022..a969322 100644
> --- a/drivers/pci/controller/dwc/pcie-designware-ep.c
> +++ b/drivers/pci/controller/dwc/pcie-designware-ep.c
> @@ -466,8 +466,10 @@ int dw_pcie_ep_raise_msix_irq(struct dw_pcie_ep *ep, u8 func_no,
>  
>  	iounmap(msix_tbl);
>  
> -	if (vec_ctrl & PCI_MSIX_ENTRY_CTRL_MASKBIT)
> +	if (vec_ctrl & PCI_MSIX_ENTRY_CTRL_MASKBIT) {
> +		dev_dbg(pci->dev, "MSI-X entry ctrl set\n");
>  		return -EPERM;
> +	}
>  
>  	ret = dw_pcie_ep_map_addr(epc, func_no, ep->msi_mem_phys, msg_addr,
>  				  epc->mem->page_size);
> -- 
> 2.7.4
> 

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, back to index

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-12-07 17:24 [PATCH v2] PCI: dwc: Print debug error message when MSI-X entry control mask bit is set Gustavo Pimentel
2019-02-08 12:25 ` Lorenzo Pieralisi

Linux-PCI Archive on lore.kernel.org

Archives are clonable:
	git clone --mirror https://lore.kernel.org/linux-pci/0 linux-pci/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 linux-pci linux-pci/ https://lore.kernel.org/linux-pci \
		linux-pci@vger.kernel.org linux-pci@archiver.kernel.org
	public-inbox-index linux-pci


Newsgroup available over NNTP:
	nntp://nntp.lore.kernel.org/org.kernel.vger.linux-pci


AGPL code for this site: git clone https://public-inbox.org/ public-inbox