linux-usb.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 0/2] UCSI race condition resulting in wrong port state
@ 2020-10-09 14:40 Benjamin Berg
  2020-10-09 14:40 ` [PATCH 1/2] usb: typec: ucsi: acpi: Always decode connector change information Benjamin Berg
                   ` (3 more replies)
  0 siblings, 4 replies; 15+ messages in thread
From: Benjamin Berg @ 2020-10-09 14:40 UTC (permalink / raw)
  To: linux-usb
  Cc: Greg Kroah-Hartman, Guenter Roeck, linux-kernel, Benjamin Berg,
	Hans de Goede, Heikki Krogerus

From: Benjamin Berg <bberg@redhat.com>

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 <hdegoede@redhat.com>
Cc: Heikki Krogerus <heikki.krogerus@linux.intel.com>

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(-)

-- 
2.26.2


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

end of thread, other threads:[~2021-09-01  9:26 UTC | newest]

Thread overview: 15+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-10-09 14:40 [PATCH 0/2] UCSI race condition resulting in wrong port state Benjamin Berg
2020-10-09 14:40 ` [PATCH 1/2] usb: typec: ucsi: acpi: Always decode connector change information Benjamin Berg
2020-10-09 14:40 ` [PATCH 2/2] usb: typec: ucsi: Work around PPM losing " Benjamin Berg
2020-10-23 14:20 ` [PATCH 0/2] UCSI race condition resulting in wrong port state Heikki Krogerus
2020-10-28  9:10 ` Greg Kroah-Hartman
2020-11-06 10:47   ` Greg Kroah-Hartman
2020-11-06 10:50     ` Benjamin Berg
2021-08-20 13:01     ` Salvatore Bonaccorso
2021-08-20 13:29       ` Benjamin Berg
2021-08-20 23:08         ` Ian Turner
2021-08-21  6:31           ` Salvatore Bonaccorso
2021-08-27  2:12             ` Ian Turner
2021-08-21 12:09       ` Greg Kroah-Hartman
2021-08-21 13:01         ` Salvatore Bonaccorso
2021-09-01  9:26           ` Greg Kroah-Hartman

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).