linux-usb.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* Problem with "driver core: platform: Add an error message to platform_get_irq*()" commit
@ 2019-10-03 20:20 Hans de Goede
  2019-10-03 20:25 ` Stephen Boyd
  0 siblings, 1 reply; 3+ messages in thread
From: Hans de Goede @ 2019-10-03 20:20 UTC (permalink / raw)
  To: Stephen Boyd, Greg Kroah-Hartman
  Cc: Andy Shevchenko, linux-usb, linux-kernel, youling 257

Hi all,

I've been debugging a new error printed with 5.4-rc1:

[   25.570893] dwc3 dwc3.0.auto: IRQ peripheral not found

This is caused by the "driver core: platform: Add an error message to platform_get_irq*()"
commit.

The dwc3 driver first tries to get the IRQ by 2 different names before falling
back to the IRQ at index 0:

         irq = platform_get_irq_byname(dwc3_pdev, "peripheral");
         if (irq > 0)
                 goto out;

         if (irq == -EPROBE_DEFER)
                 goto out;

         irq = platform_get_irq_byname(dwc3_pdev, "dwc_usb3");
         if (irq > 0)
                 goto out;

         if (irq == -EPROBE_DEFER)
                 goto out;

         irq = platform_get_irq(dwc3_pdev, 0);

Together with the mentioned commit, this is causing this new (harmless)
error message. We also have had a bug report for this:

https://bugzilla.kernel.org/show_bug.cgi?id=205037

Which I will close after this mail since the error is harmless,
still it is sorta scary looking and we should probable silence it.

The best solution I can come up with is adding a new
platform_get_irq_byname_optional mirroring platform_get_irq_optional
and using that in drivers such as the dwc3 driver.

Does anyone have a better suggestion?

Regards,

Hans


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

* Re: Problem with "driver core: platform: Add an error message to platform_get_irq*()" commit
  2019-10-03 20:20 Problem with "driver core: platform: Add an error message to platform_get_irq*()" commit Hans de Goede
@ 2019-10-03 20:25 ` Stephen Boyd
  2019-10-04 12:17   ` Greg Kroah-Hartman
  0 siblings, 1 reply; 3+ messages in thread
From: Stephen Boyd @ 2019-10-03 20:25 UTC (permalink / raw)
  To: Greg Kroah-Hartman, Hans de Goede
  Cc: Andy Shevchenko, linux-usb, linux-kernel, youling 257

Quoting Hans de Goede (2019-10-03 13:20:24)
> 
> The best solution I can come up with is adding a new
> platform_get_irq_byname_optional mirroring platform_get_irq_optional
> and using that in drivers such as the dwc3 driver.
> 
> Does anyone have a better suggestion?
> 

A byname_optional API sounds good to me.


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

* Re: Problem with "driver core: platform: Add an error message to platform_get_irq*()" commit
  2019-10-03 20:25 ` Stephen Boyd
@ 2019-10-04 12:17   ` Greg Kroah-Hartman
  0 siblings, 0 replies; 3+ messages in thread
From: Greg Kroah-Hartman @ 2019-10-04 12:17 UTC (permalink / raw)
  To: Stephen Boyd
  Cc: Hans de Goede, Andy Shevchenko, linux-usb, linux-kernel, youling 257

On Thu, Oct 03, 2019 at 01:25:09PM -0700, Stephen Boyd wrote:
> Quoting Hans de Goede (2019-10-03 13:20:24)
> > 
> > The best solution I can come up with is adding a new
> > platform_get_irq_byname_optional mirroring platform_get_irq_optional
> > and using that in drivers such as the dwc3 driver.
> > 
> > Does anyone have a better suggestion?
> > 
> 
> A byname_optional API sounds good to me.
> 

Sounds fine to me as well.

greg k-h

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

end of thread, other threads:[~2019-10-04 12:17 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-10-03 20:20 Problem with "driver core: platform: Add an error message to platform_get_irq*()" commit Hans de Goede
2019-10-03 20:25 ` Stephen Boyd
2019-10-04 12:17   ` Greg Kroah-Hartman

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).