Linux-USB Archive on lore.kernel.org
 help / color / 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, back to index

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

Linux-USB Archive on lore.kernel.org

Archives are clonable:
	git clone --mirror https://lore.kernel.org/linux-usb/0 linux-usb/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-usb linux-usb/ https://lore.kernel.org/linux-usb \
		linux-usb@vger.kernel.org
	public-inbox-index linux-usb

Example config snippet for mirrors

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


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