All of lore.kernel.org
 help / color / mirror / Atom feed
From: Subbaraman Narayanamurthy <subbaram@codeaurora.org>
To: jackp@codeaurora.org
Cc: abhilash.k.v@intel.com, gregkh@linuxfoundation.org,
	heikki.krogerus@linux.intel.com, linux-usb@vger.kernel.org,
	stable@vger.kernel.org, subbaram@codeaurora.org
Subject: Re: [PATCH] usb: typec: ucsi: Retrieve all the PDOs instead of just the first 4
Date: Mon, 26 Apr 2021 13:21:31 -0700	[thread overview]
Message-ID: <1619468491-22053-1-git-send-email-subbaram@codeaurora.org> (raw)
In-Reply-To: <20210426192605.GB20698@jackp-linux.qualcomm.com>

> If such a source is connected it's possible the UCSI FW could have

s/UCSI FW/PPM

> We can resolve this by instead retrieving and storing up to the
> maximum of 7 PDOs in the con->src_pdos array. This would involve
> two calls to the GET_PDOS command.
> 

This issue (see the signature below) is found by enabling UBSAN and
connecting a charger adapter that can advertise 5 PDOs and RPDO selected
by PPM is 5.

[  151.545106][   T70] Unexpected kernel BRK exception at EL1
[  151.545112][   T70] Internal error: BRK handler: f2005512 [#1] PREEMPT SMP
...
[  151.545499][   T70] pc : ucsi_psy_get_prop+0x208/0x20c
[  151.545507][   T70] lr : power_supply_show_property+0xc0/0x328
...
[  151.545542][   T70] Call trace:
[  151.545544][   T70]  ucsi_psy_get_prop+0x208/0x20c
[  151.545546][   T70]  power_supply_uevent+0x1a4/0x2f0
[  151.545550][   T70]  dev_uevent+0x200/0x384
[  151.545555][   T70]  kobject_uevent_env+0x1d4/0x7e8
[  151.545557][   T70]  power_supply_changed_work+0x174/0x31c
[  151.545562][   T70]  process_one_work+0x244/0x6f0
[  151.545564][   T70]  worker_thread+0x3e0/0xa64

> Fixes: 992a60ed0d5e ("usb: typec: ucsi: register with power_supply class")
> Fixes: 4dbc6a4ef06d ("usb: typec: ucsi: save power data objects in PD mode")

  reply	other threads:[~2021-04-26 20:22 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-04-26 19:18 [PATCH] usb: typec: ucsi: Retrieve all the PDOs instead of just the first 4 Jack Pham
2021-04-26 19:26 ` Jack Pham
2021-04-26 20:21   ` Subbaraman Narayanamurthy [this message]
2021-04-26 20:42     ` Jack Pham
2021-04-26 22:36       ` Subbaraman Narayanamurthy
2021-05-03  7:03   ` Heikki Krogerus
2021-05-03  7:29     ` Jack Pham

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=1619468491-22053-1-git-send-email-subbaram@codeaurora.org \
    --to=subbaram@codeaurora.org \
    --cc=abhilash.k.v@intel.com \
    --cc=gregkh@linuxfoundation.org \
    --cc=heikki.krogerus@linux.intel.com \
    --cc=jackp@codeaurora.org \
    --cc=linux-usb@vger.kernel.org \
    --cc=stable@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.