]> git.proxmox.com Git - mirror_ubuntu-bionic-kernel.git/commit
usb: typec: ucsi: Fix for incorrect status data issue
authorHeikki Krogerus <heikki.krogerus@linux.intel.com>
Thu, 21 Jun 2018 13:43:19 +0000 (16:43 +0300)
committerKleber Sacilotto de Souza <kleber.souza@canonical.com>
Mon, 14 Jan 2019 09:28:55 +0000 (09:28 +0000)
commit9fa9981743d5f7045e8092782b44007e25fc9ad0
tree44930a8e40cc1c97592ac25d37a8cdf484f96311
parentc57bff5fd79f61f0c5284f902e57390b5fa5490f
usb: typec: ucsi: Fix for incorrect status data issue

BugLink: http://bugs.launchpad.net/bugs/1808185
commit 68816e16b4789f2d05e77b6dcb77564cf5d6a8d8 upstream.

According to UCSI Specification, Connector Change Event only
means a change in the Connector Status and Operation Mode
fields of the STATUS data structure. So any other change
should create another event.

Unfortunately on some platforms the firmware acting as PPM
(platform policy manager - usually embedded controller
firmware) still does not report any other status changes if
there is a connector change event. So if the connector power
or data role was changed when a device was plugged to the
connector, the driver does not get any indication about
that. The port will show wrong roles if that happens.

To fix the issue, always checking the data and power role
together with a connector change event.

Fixes: c1b0bc2dabfa ("usb: typec: Add support for UCSI interface")
Signed-off-by: Heikki Krogerus <heikki.krogerus@linux.intel.com>
Cc: stable <stable@vger.kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Kamal Mostafa <kamal@canonical.com>
Signed-off-by: Khalid Elmously <khalid.elmously@canonical.com>
drivers/usb/typec/ucsi/ucsi.c