linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Benson Leung <bleung@google.com>
To: Akihiko Odaki <akihiko.odaki@gmail.com>
Cc: Guenter Roeck <groeck@google.com>,
	Prashant Malani <pmalani@chromium.org>,
	linux-kernel <linux-kernel@vger.kernel.org>,
	chrome-platform@lists.linux.dev,
	Benson Leung <bleung@chromium.org>,
	Guenter Roeck <groeck@chromium.org>
Subject: Re: [PATCH] platform/chrome: cros_ec_typec: Check for EC driver
Date: Thu, 7 Apr 2022 10:09:10 -0700	[thread overview]
Message-ID: <Yk8atphiUdlU0gPO@google.com> (raw)
In-Reply-To: <0fdba110-8743-3b2d-cb30-3a89b7cfa592@gmail.com>

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

Hi Akihiko,

On Fri, Apr 08, 2022 at 02:03:52AM +0900, Akihiko Odaki wrote:
> If I read the code correctly, the registration itself happens synchronously
> and platform_device_register_data() always returns a non-NULL value unless
> it returns -ENOMEM. The driver, however, can be asynchronously bound and
> dev_get_drvdata(&typec->ec->ec->dev) can return NULL as the consequence. It
> would have a call trace like the following when scheduling asynchronous
> driver binding:
> platform_device_register_data()
> platform_device_register_resndata()
> platform_device_register_full()
> -  This always creates and returns platform_device.
> platform_device_add()
> - This adds the created platform_device.
> device_add()
> bus_probe_device()
> device_initial_probe()
> __device_attach()
> - This schedules asynchronous probing.
> 
> typec->ec->ec should be pointing to the correct platform_device as the
> patched driver works without Oops on my computer. It is not NULL at least.

Can you provide more information about your test computer in this case?

Is it a Chromebook running stock firmware (if so, please let us know which
model, and which firmware version it is running).
In the past, we've also gotten some reports from people running MrChromebox
custom firmware on older Chromebooks which have exposed other bugs in
this driver.

Let us know if that's the case here, and where we can get that firmware.

Thanks,
Benson

-- 
Benson Leung
Staff Software Engineer
Chrome OS Kernel
Google Inc.
bleung@google.com
Chromium OS Project
bleung@chromium.org

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 228 bytes --]

  reply	other threads:[~2022-04-07 17:09 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-04-04  4:11 [PATCH] platform/chrome: cros_ec_typec: Check for EC driver Akihiko Odaki
2022-04-05  1:57 ` Guenter Roeck
2022-04-05  5:43   ` Akihiko Odaki
2022-04-06 21:16 ` Prashant Malani
2022-04-06 21:32   ` Guenter Roeck
2022-04-07  1:16     ` Akihiko Odaki
2022-04-07 16:28       ` Guenter Roeck
2022-04-07 17:03         ` Akihiko Odaki
2022-04-07 17:09           ` Benson Leung [this message]
2022-04-07 17:23             ` Akihiko Odaki
2022-04-07 18:51             ` Guenter Roeck
2022-04-20 10:50 ` patchwork-bot+chrome-platform
2022-05-10 23:00 ` patchwork-bot+chrome-platform
2022-05-12 17:20 ` patchwork-bot+chrome-platform

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=Yk8atphiUdlU0gPO@google.com \
    --to=bleung@google.com \
    --cc=akihiko.odaki@gmail.com \
    --cc=bleung@chromium.org \
    --cc=chrome-platform@lists.linux.dev \
    --cc=groeck@chromium.org \
    --cc=groeck@google.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=pmalani@chromium.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).