All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 0/2] thunderbolt: Link USB4 ports to their USB Type-C connectors
@ 2022-04-18 17:59 Won Chung
  2022-04-18 17:59 ` [PATCH 1/2] misc/mei: Add NULL check to component match callback functions Won Chung
                   ` (2 more replies)
  0 siblings, 3 replies; 12+ messages in thread
From: Won Chung @ 2022-04-18 17:59 UTC (permalink / raw)
  To: Heikki Krogerus, Alexander Usyskin, Mika Westerberg,
	Benson Leung, Prashant Malani, Daniele Ceraolo Spurio,
	linux-kernel
  Cc: Won Chung

Currently, USB port is linked to Type C connector, using the component
framework, if they share the same _PLD fields from ACPI table. Type C
port-mapper searches for devices with the same _PLD values, and
aggregate them as components.

When there is another device that share the same _PLD but does not
registers a component, Type C connector (component master) would never
be bound due to a component match entry device without a component
registered. There exists some cases where USB4 port also shares the same
_PLD with USB port and Type C connector, so we need to register a
component for USB4 ports too, linking USB4 port with Type C connector.
Otherwise, link between USB port and Type C connector would not
work either.

Due to the nature of the component framework, all registered components
are shared by all component match despite the relevance. MEI subsystems
also use the component framework to bind to i915 driver, which try to
match components registered by USB ports and USB4 ports. This can be
problematic since MEI assumes that there is a driver bound to the
component device, while USB4 port does not bind to any drivers. MEI's
component match callback functions should handle such case to avoid NULL
pointer dereference when USB4 port registers a component.

In summary this patch series
1. Fixes MEI subsystem's component match callbacks to handle a component
device without any driver bound
2. Registers a component for USB4 ports to link them to Type C
connectors, similar to USB ports.

Heikki Krogerus (1):
  thunderbolt: Link USB4 ports to their USB Type-C connectors

Won Chung (1):
  misc/mei: Add NULL check to component match callback functions

 .../ABI/testing/sysfs-bus-thunderbolt         | 10 +++++
 drivers/misc/mei/hdcp/mei_hdcp.c              |  2 +-
 drivers/misc/mei/pxp/mei_pxp.c                |  2 +-
 drivers/thunderbolt/usb4_port.c               | 38 +++++++++++++++++++
 4 files changed, 50 insertions(+), 2 deletions(-)

-- 
2.36.0.rc0.470.gd361397f0d-goog


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

end of thread, other threads:[~2022-04-29  9:32 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-04-18 17:59 [PATCH 0/2] thunderbolt: Link USB4 ports to their USB Type-C connectors Won Chung
2022-04-18 17:59 ` [PATCH 1/2] misc/mei: Add NULL check to component match callback functions Won Chung
2022-04-25 16:56   ` Won Chung
2022-04-28 18:11     ` Winkler, Tomas
2022-04-18 17:59 ` [PATCH 2/2] thunderbolt: Link USB4 ports to their USB Type-C connectors Won Chung
2022-04-20 10:52 ` [PATCH 0/2] " Mika Westerberg
2022-04-20 16:39   ` Won Chung
2022-04-21  6:00     ` Mika Westerberg
2022-04-24  5:12       ` Usyskin, Alexander
2022-04-25 16:51         ` Won Chung
2022-04-28 18:34           ` Won Chung
2022-04-29  9:28             ` Mika Westerberg

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.