Re: [PATCH v11 3/7] PCI: dwc: Handle MSIs routed to multiple GIC interrupts

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Mon, May 23, 2022 at 06:17:19PM +0300, Dmitry Baryshkov wrote:
> On 23/05/2022 17:02, Johan Hovold wrote:
> > On Mon, May 23, 2022 at 04:39:56PM +0300, Dmitry Baryshkov wrote:
> >> On 23/05/2022 10:53, Johan Hovold wrote:
> >>> On Fri, May 20, 2022 at 09:31:10PM +0300, Dmitry Baryshkov wrote:
> > 
> >>>> +static int dw_pcie_parse_split_msi_irq(struct pcie_port *pp)
> >>>> +{
> >>>> +	struct dw_pcie *pci = to_dw_pcie_from_pp(pp);
> >>>> +	struct device *dev = pci->dev;
> >>>> +	struct platform_device *pdev = to_platform_device(dev);
> >>>> +	int irq;
> >>>> +	u32 ctrl;
> >>>> +
> >>>> +	irq = platform_get_irq_byname_optional(pdev, split_msi_names[0]);
> >>>> +	if (irq == -ENXIO)
> >>>> +		return -ENXIO;
> >>>
> >>> You still need to check for other errors and -EPROBE_DEFER here.
> >>
> >> I think even the if (irq < 0) return irq; will work here.
> > 
> > No need to print errors unless -EPROBEDEFER as you do below?
> 
> There is no separate print for the dw_pcie_parse_split_msi_irq() errors.

I don't understand what you're referring to here.

My question is: Why would you not be printing error messages for msi0 as
you are for msi1..msi7 in the loop below.

> >>>> +
> >>>> +	pp->msi_irq[0] = irq;
> >>>> +
> >>>> +	/* Parse as many IRQs as described in the DTS. */
> >>>
> >>> s/DTS/devicetree/
> >>>
> >>>> +	for (ctrl = 1; ctrl < MAX_MSI_CTRLS; ctrl++) {
> >>>> +		irq = platform_get_irq_byname_optional(pdev, split_msi_names[ctrl]);
> >>>> +		if (irq == -ENXIO)
> >>>> +			break;
> >>>> +		if (irq < 0)
> >>>> +			return dev_err_probe(dev, irq,
> >>>> +					     "Failed to parse MSI IRQ '%s'\n",
> >>>> +					     split_msi_names[ctrl]);
> >>>> +
> >>>> +		pp->msi_irq[ctrl] = irq;
> >>>> +	}
> >>>> +
> >>>> +	pp->num_vectors = ctrl * MAX_MSI_IRQS_PER_CTRL;
> >>>> +
> >>>> +	return 0;
> >>>> +}

Johan



[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [Linux for Sparc]     [IETF Annouce]     [Security]     [Bugtraq]     [Linux MIPS]     [ECOS]     [Asterisk Internet PBX]     [Linux API]

  Powered by Linux