mirror-linux/drivers
Abel Vesa f47eba045e usb: typec: ucsi: Set orientation as none when connector is unplugged
The current implementation of the ucsi glink client connector_status()
callback is only relying on the state of the gpio. This means that even
when the cable is unplugged, the orientation propagated to the switches
along the graph is "orientation normal", instead of "orientation none",
which would be the correct one in this case.

One of the Qualcomm DP-USB PHY combo drivers, which needs to be aware of
the orientation change, is relying on the "orientation none" to skip
the reinitialization of the entire PHY. Since the ucsi glink client
advertises "orientation normal" even when the cable is unplugged, the
mentioned PHY is taken down and reinitialized when in fact it should be
left as-is. This triggers a crash within the displayport controller driver
in turn, which brings the whole system down on some Qualcomm platforms.
Propagating "orientation none" from the ucsi glink client on the
connector_status() callback hides the problem of the mentioned PHY driver
away for now. But the "orientation none" is nonetheless the correct one
to be used in this case.

So propagate the "orientation none" instead when the connector status
flags says cable is disconnected.

Fixes: 76716fd5bf ("usb: typec: ucsi: glink: move GPIO reading into connector_status callback")
Cc: stable <stable@kernel.org> # 6.10
Reviewed-by: Bryan O'Donoghue <bryan.odonoghue@linaro.org>
Reviewed-by: Heikki Krogerus <heikki.krogerus@linux.intel.com>
Reviewed-by: Neil Armstrong <neil.armstrong@linaro.org>
Signed-off-by: Abel Vesa <abel.vesa@linaro.org>
Reviewed-by: Johan Hovold <johan+linaro@kernel.org>
Tested-by: Johan Hovold <johan+linaro@kernel.org>
Link: https://lore.kernel.org/r/20241212-usb-typec-ucsi-glink-add-orientation-none-v2-1-db5a50498a77@linaro.org
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2024-12-23 18:51:03 +01:00
..
accel Merge tag 'drm-misc-fixes-2024-12-19' of https://gitlab.freedesktop.org/drm/misc/kernel into drm-fixes 2024-12-20 07:13:45 +10:00
accessibility
acpi ACPI: EC: Enable EC support on LoongArch by default 2024-12-18 20:23:59 +01:00
amba
android Char/Misc/IIO/Whatever driver subsystem updates for 6.13-rc1 2024-11-29 11:58:27 -08:00
ata ata: sata_highbank: fix OF node reference leak in highbank_initialize_phys() 2024-12-09 09:06:58 +09:00
atm Get rid of 'remove_new' relic from platform driver struct 2024-12-01 15:12:43 -08:00
auxdisplay Merge tag 'drm-misc-fixes-2024-12-19' of https://gitlab.freedesktop.org/drm/misc/kernel into drm-fixes 2024-12-20 07:13:45 +10:00
base - Have the Automatic IBRS setting check on AMD does not falsely fire in 2024-12-08 11:38:56 -08:00
bcma Get rid of 'remove_new' relic from platform driver struct 2024-12-01 15:12:43 -08:00
block zram: fix uninitialized ZRAM not releasing backing device 2024-12-18 19:04:44 -08:00
bluetooth Bluetooth: btmtk: avoid UAF in btmtk_process_coredump 2024-12-12 09:25:28 -05:00
bus Char/Misc/IIO/Whatever driver subsystem updates for 6.13-rc1 2024-11-29 11:58:27 -08:00
cache cache: StarFive: Require a 64-bit system 2024-08-01 07:15:02 -07:00
cdrom Get rid of 'remove_new' relic from platform driver struct 2024-12-01 15:12:43 -08:00
cdx module: Convert default symbol namespace to string literal 2024-12-03 08:22:25 -08:00
char Get rid of 'remove_new' relic from platform driver struct 2024-12-01 15:12:43 -08:00
clk Two reverts and two EN7581 driver fixes: 2024-12-10 18:21:40 -08:00
clocksource x86/hyperv: Fix hv tsc page based sched_clock for hibernation 2024-12-09 18:42:42 +00:00
comedi
connector
counter module: Convert symbol namespace to string literal 2024-12-02 11:34:44 -08:00
cpufreq cpufreq/amd-pstate: Use boost numerator for upper bound of frequencies 2024-12-10 10:17:43 -06:00
cpuidle Get rid of 'remove_new' relic from platform driver struct 2024-12-01 15:12:43 -08:00
crypto crypto: hisilicon/debugfs - fix the struct pointer incorrectly offset problem 2024-12-10 13:40:25 +08:00
cxl cxl/region: Fix region creation for greater than x2 switches 2024-12-10 14:50:34 -07:00
dax module: Convert symbol namespace to string literal 2024-12-02 11:34:44 -08:00
dca
devfreq Get rid of 'remove_new' relic from platform driver struct 2024-12-01 15:12:43 -08:00
dio
dma module: Convert default symbol namespace to string literal 2024-12-03 08:22:25 -08:00
dma-buf Merge tag 'drm-misc-fixes-2024-12-19' of https://gitlab.freedesktop.org/drm/misc/kernel into drm-fixes 2024-12-20 07:13:45 +10:00
dpll
edac EDAC/amd64: Simplify ECC check on unified memory controllers 2024-12-11 21:47:33 +01:00
eisa
extcon Get rid of 'remove_new' relic from platform driver struct 2024-12-01 15:12:43 -08:00
firewire firewire updates for v6.13 2024-11-25 17:12:54 -08:00
firmware soc: fixes for 6.13, part 2 2024-12-21 15:45:06 -08:00
fpga module: Convert symbol namespace to string literal 2024-12-02 11:34:44 -08:00
fsi Get rid of 'remove_new' relic from platform driver struct 2024-12-01 15:12:43 -08:00
gnss
gpio gpio: idio-16: Actually make use of the GPIO_IDIO_16 symbol namespace 2024-12-10 11:38:57 +01:00
gpu amd-drm-fixes-6.13-2024-12-18: 2024-12-20 16:21:44 +10:00
greybus
hid hid-for-linus-2024120501 2024-12-05 10:06:47 -08:00
hsi Get rid of 'remove_new' relic from platform driver struct 2024-12-01 15:12:43 -08:00
hte Get rid of 'remove_new' relic from platform driver struct 2024-12-01 15:12:43 -08:00
hv Drivers: hv: util: Avoid accessing a ringbuffer not initialized yet 2024-12-09 18:44:15 +00:00
hwmon hwmon: (tmp513) Fix interpretation of values of Temperature Result and Limit Registers 2024-12-16 15:58:25 -08:00
hwspinlock Get rid of 'remove_new' relic from platform driver struct 2024-12-01 15:12:43 -08:00
hwtracing Get rid of 'remove_new' relic from platform driver struct 2024-12-01 15:12:43 -08:00
i2c i2c: riic: Always round-up when calculating bus period 2024-12-12 12:54:02 +01:00
i3c Get rid of 'remove_new' relic from platform driver struct 2024-12-01 15:12:43 -08:00
idle
iio 24 hotfixes. 17 are cc:stable. 15 are MM and 9 are non-MM. 2024-12-08 11:26:13 -08:00
infiniband module: Convert symbol namespace to string literal 2024-12-02 11:34:44 -08:00
input Input updates for v6.13-rc0 2024-11-25 10:31:39 -08:00
interconnect
iommu iommu/vt-d: Avoid draining PRQ in sva mm release path 2024-12-13 15:54:27 +01:00
ipack
irqchip irqchip/gic-v3: Work around insecure GIC integrations 2024-12-13 18:15:29 +01:00
isdn
leds module: Convert symbol namespace to string literal 2024-12-02 11:34:44 -08:00
macintosh Merge tag 'drm-misc-fixes-2024-12-19' of https://gitlab.freedesktop.org/drm/misc/kernel into drm-fixes 2024-12-20 07:13:45 +10:00
mailbox TTY / Serial driver updates for 6.13-rc1 2024-11-30 09:03:16 -08:00
mcb module: Convert symbol namespace to string literal 2024-12-02 11:34:44 -08:00
md dm: Fix dm-zoned-reclaim zone write pointer alignment 2024-12-10 09:15:33 -07:00
media [GIT PULL for 6.13-rc4] media fixes 2024-12-21 10:56:34 -08:00
memory Get rid of 'remove_new' relic from platform driver struct 2024-12-01 15:12:43 -08:00
memstick Get rid of 'remove_new' relic from platform driver struct 2024-12-01 15:12:43 -08:00
message scsi: message: fusion: Constify struct pci_device_id 2024-11-20 21:38:24 -05:00
mfd module: Convert symbol namespace to string literal 2024-12-02 11:34:44 -08:00
misc module: Convert symbol namespace to string literal 2024-12-02 11:34:44 -08:00
mmc mmc: mtk-sd: disable wakeup in .remove() and in the error path of .probe() 2024-12-10 16:02:34 +01:00
most
mtd This pull request contains updates for JFFS2, UBI and UBIFS: 2024-11-30 10:32:47 -08:00
mux
net Including fixes from can and netfilter. 2024-12-19 09:19:11 -08:00
nfc
ntb
nubus
nvdimm module: Convert symbol namespace to string literal 2024-12-02 11:34:44 -08:00
nvme nvme: use blk_validate_block_size() for max LBA check 2024-12-18 07:22:30 -07:00
nvmem Get rid of 'remove_new' relic from platform driver struct 2024-12-01 15:12:43 -08:00
of Devicetree fixes for 6.13, part 1: 2024-12-22 08:40:23 -08:00
opp Additional power management updates for 6.13-rc1 2024-11-27 14:40:33 -08:00
parisc Get rid of 'remove_new' relic from platform driver struct 2024-12-01 15:12:43 -08:00
parport Get rid of 'remove_new' relic from platform driver struct 2024-12-01 15:12:43 -08:00
pci PCI fixes for Linux 6.13 2024-12-21 10:51:04 -08:00
pcmcia Get rid of 'remove_new' relic from platform driver struct 2024-12-01 15:12:43 -08:00
peci module: Convert symbol namespace to string literal 2024-12-02 11:34:44 -08:00
perf module: Convert symbol namespace to string literal 2024-12-02 11:34:44 -08:00
phy Driver core changes for 6.13-rc1 2024-11-29 11:43:29 -08:00
pinctrl module: Convert symbol namespace to string literal 2024-12-02 11:34:44 -08:00
platform ACPI fix for 6.13-rc4 2024-12-21 10:42:35 -08:00
pmdomain pmdomain core: 2024-12-06 11:24:00 -08:00
pnp
power power supply and reset changes for the 6.13 series 2024-11-28 09:28:09 -08:00
powercap module: Convert symbol namespace to string literal 2024-12-02 11:34:44 -08:00
pps Get rid of 'remove_new' relic from platform driver struct 2024-12-01 15:12:43 -08:00
ps3
ptp ptp: kvm: x86: Return EOPNOTSUPP instead of ENODEV from kvm_arch_ptp_init() 2024-12-06 17:38:11 -08:00
pwm pwm: Fix regression in pwm-stm32 driver when converting to new waveform support 2024-12-19 08:50:05 -08:00
rapidio
ras
regulator regulator: rename regulator-uv-survival-time-ms according to DT binding 2024-12-19 11:15:24 +00:00
remoteproc
reset module: Convert symbol namespace to string literal 2024-12-02 11:34:44 -08:00
rpmsg Get rid of 'remove_new' relic from platform driver struct 2024-12-01 15:12:43 -08:00
rtc module: Convert symbol namespace to string literal 2024-12-02 11:34:44 -08:00
s390 Driver core changes for 6.13-rc1 2024-11-29 11:43:29 -08:00
sbus Get rid of 'remove_new' relic from platform driver struct 2024-12-01 15:12:43 -08:00
scsi scsi: scsi_debug: Fix hrtimer support for ndelay 2024-12-04 13:22:59 -05:00
sh sh updates for v6.13 2024-11-30 14:45:29 -08:00
siox
slimbus Get rid of 'remove_new' relic from platform driver struct 2024-12-01 15:12:43 -08:00
soc Networking changes for 6.13. 2024-11-21 08:28:08 -08:00
soundwire module: Convert symbol namespace to string literal 2024-12-02 11:34:44 -08:00
spi spi: rockchip-sfc: Fix error in remove progress 2024-12-18 16:02:08 +00:00
spmi Get rid of 'remove_new' relic from platform driver struct 2024-12-01 15:12:43 -08:00
ssb
staging staging: gpib: Fix allyesconfig build failures 2024-12-21 11:30:13 -08:00
target Merge branch '6.13/scsi-queue' into 6.13/scsi-fixes 2024-12-02 12:36:18 -05:00
tc
tee Get rid of 'remove_new' relic from platform driver struct 2024-12-01 15:12:43 -08:00
thermal thermal/thresholds: Fix boundaries and detection routine 2024-12-18 14:51:31 +01:00
thunderbolt thunderbolt: Improve redrive mode handling 2024-12-16 09:59:38 +02:00
tty Serial driver fixes for 6.13-rc3 2024-12-14 09:31:19 -08:00
ufs scsi: ufs: core: Update compl_time_stamp_local_clock after completing a cqe 2024-12-09 21:49:08 -05:00
uio Get rid of 'remove_new' relic from platform driver struct 2024-12-01 15:12:43 -08:00
usb usb: typec: ucsi: Set orientation as none when connector is unplugged 2024-12-23 18:51:03 +01:00
vdpa
vfio VFIO fixes for v6.13-rc3 2024-12-11 13:48:25 -08:00
vhost
video Merge tag 'drm-misc-fixes-2024-12-19' of https://gitlab.freedesktop.org/drm/misc/kernel into drm-fixes 2024-12-20 07:13:45 +10:00
virt arm64 fixes for 6.13-rc2: 2024-12-06 13:47:55 -08:00
virtio virtio_ring: add a func argument 'recycle_done' to virtqueue_reset() 2024-12-10 11:22:21 +01:00
w1 Get rid of 'remove_new' relic from platform driver struct 2024-12-01 15:12:43 -08:00
watchdog linux-watchdog 6.13-rc1 tag 2024-12-05 10:03:43 -08:00
xen module: Convert symbol namespace to string literal 2024-12-02 11:34:44 -08:00
zorro
Kconfig
Makefile