All of lore.kernel.org
 help / color / mirror / Atom feed
* Re: lan78xx: About 8000 usb interrupts per second when idle
@ 2019-04-14 21:51 Paul Zimmerman
  0 siblings, 0 replies; 9+ messages in thread
From: Paul Zimmerman @ 2019-04-14 21:51 UTC (permalink / raw)
  To: Lukas Wunner
  Cc: Jisheng Zhang, Stefan Wahren, Oliver Neukum, Minas Harutyunyan,
	linux-usb

Lukas Wunner wrote:
> On Tue, Apr 09, 2019 at 09:28:16AM +0000, Minas Harutyunyan wrote:
>> Am 09.04.19 um 08:54 schrieb Jisheng Zhang:
>>> The second one: 8000 usb interrupts per second when idle.
>>> This is abnormal. any idea? Is it due to the lan78xx?
>>
>> dwc2 in host mode enable SOF interrupts if any periodic EP are in use.
>> So, 8000 interrupts per second is expectant behavior.
>
> The dwc_otg driver patched into the Raspberry Pi Foundation's
> kernel seems to make do with much fewer interrupts and much
> lower CPU load.  How does it do that and how could dwc2 be
> made to do the same?

It connects an interrupt from the USB Phy to the FIQ (fast interrupt
request) pin on the Arm CPU. The dwc2 driver could do the same, except
I don't think the Linux kernel supports FIQ interrupts, so that would
need to be added. It would also be unique to Arm and to the SOC that
is used on the Pi.

> Would it be possible for you to provide
> me with documentation on the chip? The Synopsis website
> requires registration for downloads and registration requires
> a Synopsis customer ID.

It's highly unlikely that Minas can provide you with the databook if
you are not a customer. I used to work for Synopsys and wrote the
original dwc2 driver. The company's policy did not allow non-customers
to be given the databook. But you can find a copy on the web from a
couple of different sites, google for dwc_otg. In any case, it would
not cover the FIQ method that is used in the Pi driver, you would
probably need the Phy databook for that.

> It seems the Foundation's dwc_otg driver was forked from code
> that later begat dwc2.

Yes, I ported dwc2 from the Synopsys dwc_otg driver. But the FIQ
interrupt stuff was not part of the dwc_otg driver, it was added by
the Raspberry Pi foundation guys specifically to work around problems
on the Pi platform.

HTH,
Paul

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

end of thread, other threads:[~2019-04-15 18:15 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <20190408143443.335f7e93@xhacker.debian>
     [not found] ` <002929b7-9a0d-6d92-4e03-18a6748c6708@i2se.com>
     [not found]   ` <20190408160551.03911b27@xhacker.debian>
     [not found]     ` <20190409144655.753d3bd9@xhacker.debian>
2019-04-09  7:18       ` lan78xx: About 8000 usb interrupts per second when idle Stefan Wahren
2019-04-09  9:28         ` Minas Harutyunyan
2019-04-10  9:37           ` Jisheng Zhang
2019-04-10 10:08             ` Oliver Neukum
2019-04-14 19:46           ` Lukas Wunner
2019-04-15  0:53             ` Woojung.Huh
2019-04-15 17:35             ` Doug Anderson
2019-04-15 18:15               ` Alan Stern
2019-04-14 21:51 Paul Zimmerman

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.