Question regarding using Driver Component Framework (crashing kernel)

Won Chung wonchung at google.com
Tue Mar 22 19:01:15 UTC 2022


Hi,

I am not sure if this is the correct mailing list to ask about Driver
Component Framework, so if I am mistaken, I would appreciate it if
anyone can correct me to the right direction.

I have a quick question on using driver component framework and a
strange crash I am seeing when I use component framework.

There is then component framework currently being used for typec
connector, as below
https://elixir.bootlin.com/linux/latest/source/drivers/usb/typec/port-mapper.c
We add component for usb port to link it with typec connector, as below
https://elixir.bootlin.com/linux/latest/source/drivers/usb/core/port.c#L622
https://elixir.bootlin.com/linux/latest/source/drivers/usb/core/port.c#L568

We are trying to do something similar for usb4 port, add component to
link to typec connector.
I have attached a patch to this email for reference.
However, this change causes a crash in kernel for some devices.
The crash is too early in the kernel that it is not giving any logs at all.
This crash is somehow fixed when we change usb4 config from =y
(built-in) to =m (loadable module).
So, I am curious if there are some aspects in the component framework
that depends on whether the device with a component added is a
built-in or loadable module.

If anyone has seen a similar issue or have an idea on what is
happening, can you share your thoughts on what might be the issue and
how the crash can be avoided?
Thank you very much!

Won
-------------- next part --------------
A non-text attachment was scrubbed...
Name: usb4_connectors.diff
Type: application/octet-stream
Size: 4067 bytes
Desc: not available
URL: <https://lists.freedesktop.org/archives/dri-devel/attachments/20220322/8d11353c/attachment-0001.obj>


More information about the dri-devel mailing list