linux-usb.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Jack Pham <jackp@codeaurora.org>
To: Subbaraman Narayanamurthy <subbaram@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
Subject: Re: [PATCH] usb: typec: ucsi: Retrieve all the PDOs instead of just the first 4
Date: Mon, 26 Apr 2021 13:42:13 -0700	[thread overview]
Message-ID: <20210426204213.GC20698@jackp-linux.qualcomm.com> (raw)
In-Reply-To: <1619468491-22053-1-git-send-email-subbaram@codeaurora.org>

On Mon, Apr 26, 2021 at 01:21:31PM -0700, Subbaraman Narayanamurthy wrote:
> > If such a source is connected it's possible the UCSI FW could have
> 
> s/UCSI FW/PPM

Right, PPM is a more apt descriptor. Waiting to see if Heikki has any
feedback first before sending a V2.

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

UBSAN FTW. Want me to copy this trace into the commit text as well?

Jack
-- 
The Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum,
a Linux Foundation Collaborative Project

  reply	other threads:[~2021-04-26 20:42 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
2021-04-26 20:42     ` Jack Pham [this message]
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=20210426204213.GC20698@jackp-linux.qualcomm.com \
    --to=jackp@codeaurora.org \
    --cc=abhilash.k.v@intel.com \
    --cc=gregkh@linuxfoundation.org \
    --cc=heikki.krogerus@linux.intel.com \
    --cc=linux-usb@vger.kernel.org \
    --cc=stable@vger.kernel.org \
    --cc=subbaram@codeaurora.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 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).