Re: `pci_apply_final_quirks()` taking half a second

From: Alan Stern
Date: Mon Jan 01 2018 - 10:47:28 EST


On Mon, 1 Jan 2018, Paul Menzel wrote:

> > So they are OHCI controllers. You could add some debugging statements
> > to quirk_usb_handoff_ohci() to try and locate the part that's taking so
> > long.
>
> As you suggested debugging statements, I guess the Linux kernel doesnât
> offer other ways to instrument functions without modifying the source code.

It does. Look into ftrace, for example. However, ftrace only provides
tracing at the level of function calls (hence the name -- "ftrace" for
"function trace"), not for individual statements within a function.
There are other facilities as well, but none of them are likely to help
here.

> Is it possible to only rebuild the module somehow or is the early
> handoff stuff not a module?

It is not a module.

> > It's also worth mentioning that the same source file contains lots of
> > special-case code for AMD and ASmedia hardware. I don't know whether
> > any of it is involved in the long time delays you are seeing, however.
>
> Thank you for already looking into this. I havenât had to time to read
> the commit messages, which might shed some light into the reasoning.

Good luck!

Alan Stern