Skip to content

UCSI race condition resulting in wrong port state

Benjamin Berg linux-usb lkml 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest2 patches 12 repliesIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/2usb: typec: ucsi: acpi: Always decode connector change informationdrivers/usb/typec/ucsi/ucsi_acpi.c+3 -20 replies
2/2usb: typec: ucsi: Work around PPM losing change informationdrivers/usb/typec/ucsi/ucsi.c drivers/usb/typec/ucsi/ucsi.h+107 -200 replies

Reviews trailers per patch

None of the 2 patches has a Reviewed-by or Acked-by of their own; the series has one for all of them.

PatchHeikki Krogerus
SeriesA-b
1/2
2/2

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v1 thread

Cover letter [PATCH 0/2] UCSI race condition resulting in wrong port state

From: Benjamin Berg <[email protected]>

Hi all,

so, I kept running in an issue where the UCSI port information was saying that power was being delivered (online: 1), while no cable was attached.

The core of the problem is that there are scenarios where UCSI change notifications are lost. This happens because querying the changes that happened is done using the GET_CONNECTOR_STATUS command while clearing the bitfield happens from the separate ACK command. Any change in between will be lost.

Note that the problem may be almost invisible in the UI as e.g. GNOME will still show the battery as discharging. But some policies like automatic suspend may be applied incorrectly.

Cc Hans de Goede <[email protected]>
Cc Heikki Krogerus <[email protected]>

Benjamin Berg (2):
usb: typec: ucsi: acpi: Always decode connector change information
usb: typec: ucsi: Work around PPM losing change information

 drivers/usb/typec/ucsi/ucsi.c      | 125 ++++++++++++++++++++++++-----
 drivers/usb/typec/ucsi/ucsi.h      |   2 +
 drivers/usb/typec/ucsi/ucsi_acpi.c |   5 +-
 3 files changed, 110 insertions(+), 22 deletions(-)
Signature · 1 line
2.26.2