linux/drivers/usb
Amit Sunil Dhamne afb92ad873 usb: typec: tcpm: restrict SNK_WAIT_CAPABILITIES_TIMEOUT transitions to non self-powered devices
PD3.1 spec ("8.3.3.3.3 PE_SNK_Wait_for_Capabilities State") mandates
that the policy engine perform a hard reset when SinkWaitCapTimer
expires. Instead the code explicitly does a GET_SOURCE_CAP when the
timer expires as part of SNK_WAIT_CAPABILITIES_TIMEOUT. Due to this the
following compliance test failures are reported by the compliance tester
(added excerpts from the PD Test Spec):

* COMMON.PROC.PD.2#1:
  The Tester receives a Get_Source_Cap Message from the UUT. This
  message is valid except the following conditions: [COMMON.PROC.PD.2#1]
    a. The check fails if the UUT sends this message before the Tester
       has established an Explicit Contract
    ...

* TEST.PD.PROT.SNK.4:
  ...
  4. The check fails if the UUT does not send a Hard Reset between
    tTypeCSinkWaitCap min and max. [TEST.PD.PROT.SNK.4#1] The delay is
    between the VBUS present vSafe5V min and the time of the first bit
    of Preamble of the Hard Reset sent by the UUT.

For the purpose of interoperability, restrict the quirk introduced in
https://lore.kernel.org/all/20240523171806.223727-1-sebastian.reichel@collabora.com/
to only non self-powered devices as battery powered devices will not
have the issue mentioned in that commit.

Cc: stable@vger.kernel.org
Fixes: 122968f8dd ("usb: typec: tcpm: avoid resets for missing source capability messages")
Reported-by: Badhri Jagan Sridharan <badhri@google.com>
Closes: https://lore.kernel.org/all/CAPTae5LAwsVugb0dxuKLHFqncjeZeJ785nkY4Jfd+M-tCjHSnQ@mail.gmail.com/
Signed-off-by: Amit Sunil Dhamne <amitsd@google.com>
Reviewed-by: Badhri Jagan Sridharan <badhri@google.com>
Reviewed-by: Heikki Krogerus <heikki.krogerus@linux.intel.com>
Tested-by: Xu Yang <xu.yang_2@nxp.com>
Reviewed-by: Sebastian Reichel <sebastian.reichel@collabora.com>
Link: https://lore.kernel.org/r/20241024022233.3276995-1-amitsd@google.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2024-10-29 04:38:00 +01:00
..
atm move asm/unaligned.h to linux/unaligned.h 2024-10-02 17:23:23 -04:00
c67x00
cdns3
chipidea
class move asm/unaligned.h to linux/unaligned.h 2024-10-02 17:23:23 -04:00
common
core usb: acpi: fix boot hang due to early incorrect 'tunneled' USB3 device links 2024-10-29 04:26:26 +01:00
dwc2 Revert "usb: dwc2: Skip clock gating on Broadcom SoCs" 2024-10-29 04:24:54 +01:00
dwc3 usb: dwc3: core: Fix system suspend on TI AM62 platforms 2024-10-16 10:25:48 +02:00
early
fotg210 move asm/unaligned.h to linux/unaligned.h 2024-10-02 17:23:23 -04:00
gadget USB: gadget: dummy-hcd: Fix "task hung" problem 2024-10-17 08:45:10 +02:00
host xhci: Fix Link TRB DMA in command ring stopped completion event 2024-10-29 04:23:59 +01:00
image
isp1760 move asm/unaligned.h to linux/unaligned.h 2024-10-02 17:23:23 -04:00
misc USB fixes for 6.12-rc3 2024-10-13 09:21:36 -07:00
mon
mtu3
musb move asm/unaligned.h to linux/unaligned.h 2024-10-02 17:23:23 -04:00
phy usb: phy: Fix API devm_usb_put_phy() can not release the phy 2024-10-29 04:37:48 +01:00
renesas_usbhs
roles
serial USB: serial: option: add Telit FN920C04 MBIM compositions 2024-10-17 16:38:02 +02:00
storage usb: storage: ignore bogus device raised by JieLi BR21 USB sound chip 2024-10-04 15:32:25 +02:00
typec usb: typec: tcpm: restrict SNK_WAIT_CAPABILITIES_TIMEOUT transitions to non self-powered devices 2024-10-29 04:38:00 +01:00
usbip
Kconfig
Makefile
usb-skeleton.c