]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
usb: typec: ucsi: Fix connector check on init
authorChristian A. Ehrhardt <lk@c--e.de>
Mon, 1 Apr 2024 21:05:15 +0000 (23:05 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 17 May 2024 10:02:27 +0000 (12:02 +0200)
commitd5f0c5ea3fc385c3c3c46bf0bc825b0b5e214f16
tree9aba5ff058a64549bfcd9f3af8a71dfcb35cd473
parent4184b7d85422f0a5d407ce728204d635aa0497e9
usb: typec: ucsi: Fix connector check on init

commit ce4c8d21054ae9396cd759fe6e8157b525616dc4 upstream.

Fix issues when initially checking for a connector change:
- Use the correct connector number not the entire CCI.
- Call ->read under the PPM lock.
- Remove a bogus READ_ONCE.

Fixes: 808a8b9e0b87 ("usb: typec: ucsi: Check for notifications after init")
Cc: stable@kernel.org
Signed-off-by: Christian A. Ehrhardt <lk@c--e.de>
Reviewed-by: Heikki Krogerus <heikki.krogerus@linux.intel.com>
Link: https://lore.kernel.org/r/20240401210515.1902048-1-lk@c--e.de
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/usb/typec/ucsi/ucsi.c