All of lore.kernel.org
 help / color / mirror / Atom feed
From: Benjamin Berg <bberg@redhat.com>
To: Heikki Krogerus <heikki.krogerus@linux.intel.com>
Cc: linux-usb@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [RFC PATCH 0/7] usb: typec: ucsi: Polling the alt modes and PDOs
Date: Tue, 08 Jun 2021 21:32:01 +0200	[thread overview]
Message-ID: <f9e1640d4d1a2acbaacf83dee021cd4aa55f233f.camel@redhat.com> (raw)
In-Reply-To: <YL8UD+nlBSSQGIMO@kuha.fi.intel.com>

[-- Attachment #1: Type: text/plain, Size: 2465 bytes --]

On Tue, 2021-06-08 at 09:54 +0300, Heikki Krogerus wrote:
> On Tue, Jun 08, 2021 at 09:42:09AM +0300, Heikki Krogerus wrote:
> > Please check does the partner device get removed. What do you have
> > under /sys/class/typec after that happens?
> 
> Oh yes. Could you also share the trace output when that happens?
> 
>         cd /sys/kernel/debug/tracing
>         echo 1 > events/ucsi/enable
>         # now reproduce the issue
>         cat trace > ucsi.trace

So, the partner device is still there when this happens (see below). I
also only see a single event in the trace for the fast plug/unplug
case:
   kworker/u16:8-1771    [003] .... 18848.872145: ucsi_connector_change: port1 status: change=4a04, opmode=5, connected=1, sourcing=0, partner_flags=1, partner_type=1, request_data_obj=1304b12c, BC status=1

The typec port/partner states is:

port1-partner/accessory_mode:none
port1-partner/supports_usb_power_delivery:no
port1-partner/uevent:DEVTYPE=typec_partner
port1-partner/usb_power_delivery_revision:0.0

and

port0/data_role:host [device]
port0/power_operation_mode:default
port0/power_role:source [sink]
port0/supported_accessory_modes:none
port0/uevent:DEVTYPE=typec_port
port0/uevent:TYPEC_PORT=port0
port0/usb_power_delivery_revision:2.0
port0/usb_typec_revision:1.0
port0/vconn_source:no
port1/data_role:host [device]
port1/power_operation_mode:3.0A
port1/power_role:source [sink]
port1/supported_accessory_modes:none
port1/uevent:DEVTYPE=typec_port
port1/uevent:TYPEC_PORT=port1
port1/usb_power_delivery_revision:2.0
port1/usb_typec_revision:1.0
port1/vconn_source:no

Note that for a normal plug I am usually getting a second event. This
second event is occasionally missing though:
  kworker/u16:38-1800    [001] .... 19522.325885: ucsi_connector_change: port1 status: change=4a04, opmode=5, connected=1, sourcing=0, partner_flags=1, partner_type=1, request_data_obj=1304b12c, BC status=1
  kworker/u16:38-1800    [004] .... 19522.552613: ucsi_connector_change: port1 status: change=0044, opmode=3, connected=1, sourcing=0, partner_flags=1, partner_type=1, request_data_obj=1304b12c, BC status=1

and a working unplug consistently looks like:
   kworker/u16:8-1771    [003] .... 19670.020085: ucsi_connector_change: port1 status: change=4804, opmode=0, connected=0, sourcing=0, partner_flags=1, partner_type=1, request_data_obj=1304b12c, BC status=0

Benjamin

[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 833 bytes --]

  reply	other threads:[~2021-06-08 19:34 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-06-07 13:14 [RFC PATCH 0/7] usb: typec: ucsi: Polling the alt modes and PDOs Heikki Krogerus
2021-06-07 13:14 ` [RFC PATCH 1/7] usb: typec: ucsi: Always cancel the command if PPM reports BUSY condition Heikki Krogerus
2021-06-07 13:14 ` [RFC PATCH 2/7] usb: typec: ucsi: Don't stop alt mode registration on busy condition Heikki Krogerus
2021-06-08  9:31   ` Sergei Shtylyov
2021-06-08 13:18     ` Heikki Krogerus
2021-06-07 13:14 ` [RFC PATCH 3/7] usb: typec: ucsi: Add poll worker for alternate modes Heikki Krogerus
2021-06-07 13:14 ` [RFC PATCH 4/7] usb: typec: ucsi: acpi: Reduce the command completion timeout Heikki Krogerus
2021-06-07 13:14 ` [RFC PATCH 5/7] usb: typec: ucsi: Process every connector change as unique connector state Heikki Krogerus
2021-06-07 13:14 ` [RFC PATCH 6/7] usb: typec: ucsi: Filter out spurious events Heikki Krogerus
2021-06-07 13:14 ` [RFC PATCH 7/7] usb: typec: ucsi: Read the PDOs in separate work Heikki Krogerus
2021-06-07 20:09 ` [RFC PATCH 0/7] usb: typec: ucsi: Polling the alt modes and PDOs Benjamin Berg
2021-06-08  6:42   ` Heikki Krogerus
2021-06-08  6:54     ` Heikki Krogerus
2021-06-08 19:32       ` Benjamin Berg [this message]
2021-06-09 11:25         ` Heikki Krogerus
2021-06-09 12:18           ` Heikki Krogerus
2021-06-09 12:56             ` Heikki Krogerus
2021-06-09 17:39               ` Benjamin Berg
2021-06-10 12:07                 ` Heikki Krogerus

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=f9e1640d4d1a2acbaacf83dee021cd4aa55f233f.camel@redhat.com \
    --to=bberg@redhat.com \
    --cc=heikki.krogerus@linux.intel.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-usb@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.