mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Antonio Borneo <antonio.borneo@foss.st.com>
To: Saravana Kannan <saravanak@google.com>
Cc: Linus Walleij <linus.walleij@linaro.org>,
	<linux-kernel@vger.kernel.org>,
	Alexandre TORGUE <alexandre.torgue@foss.st.com>
Subject: async probe: boot crash with v5.10.188 on STM32MP157
Date: Mon, 18 Sep 2023 14:26:21 +0200	[thread overview]
Message-ID: <556007adcfd12f5f0bd997dba6c050aa28922ed3.camel@foss.st.com> (raw)
In-Reply-To: <AS8PR10MB4712C2960C439EF76E25DA98EEF7A@AS8PR10MB4712.EURPRD10.PROD.OUTLOOK.COM>

Hi Saravana,

while devlink and async probe looks ok in v6.6-rc1, I get randomly boot
crash on STM32MP157 with kernel v5.10.188 after the upstream commit
3108eb2e8aa7 ("mmc: mmci: Set PROBE_PREFER_ASYNCHRONOUS") got backported.

In v6.6-rc1, really_probe() checks for probe dependencies with
device_links_check_suppliers(). In older kernels this part is missing.
In the specific case of STM32MP157, the driver mmci can get async-probed
while the probe of pinctrl/stm32/pinctrl-stm32.c has already registered
the pinctrl but has not added any gpiochip yet.
This causes pinmux_ops::set_mux() to fail and thus mmci probe fails too.

Boot log contains:

[2.205476] stm32mp157-pinctrl soc:pin-controller@50002000: No gpio range defined.
[2.205515] mmci-pl18x 58005000.sdmmc: Error applying setting, reverse things back
[2.205828] mmci-pl18x: probe of 58005000.sdmmc failed with error -22
[2.210434] stm32mp157-pinctrl soc:pin-controller@50002000: GPIOA bank added

From a quick code check, also the LTS v5.15 and v6.1 looks impacted, but
I have not tested them, so far, due to the difficulties to replicate the
crash.

Is there any mandatory upstream patch that got lost in the backport process?

Or is there something incorrect to be fixed in pinctrl-stm32 driver?

What are the possible workaround I can use? Would kernel flag fw_devlink=off
work reliably for all the mentioned kernel versions?

Regards,
Antonio

           reply	other threads:[~2023-09-18 12:27 UTC|newest]

Thread overview: expand[flat|nested]  mbox.gz  Atom feed
 [parent not found: <AS8PR10MB4712C2960C439EF76E25DA98EEF7A@AS8PR10MB4712.EURPRD10.PROD.OUTLOOK.COM>]

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=556007adcfd12f5f0bd997dba6c050aa28922ed3.camel@foss.st.com \
    --to=antonio.borneo@foss.st.com \
    --cc=alexandre.torgue@foss.st.com \
    --cc=linus.walleij@linaro.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=saravanak@google.com \
    /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

all inboxes | Powered by JetHome®