devicetree.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Olof Johansson <olof@lixom.net>
To: Rafa?? Mi??ecki <zajec5@gmail.com>
Cc: Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
	Saravana Kannan <saravanak@google.com>,
	Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
	"Rafael J. Wysocki" <rafael@kernel.org>,
	"devicetree@vger.kernel.org" <devicetree@vger.kernel.org>,
	Ansuel Smith <ansuelsmth@gmail.com>
Subject: Re: fw_devlink=on breaks probing devices when of_platform_populate() is used
Date: Mon, 19 Sep 2022 16:31:12 -0700	[thread overview]
Message-ID: <Yyj7wJlqJkCwObRn@lx2k> (raw)
In-Reply-To: <7be3df2e-2250-8542-1707-121373213fe1@gmail.com>

On Sun, Aug 28, 2022 at 04:39:52PM +0200, Rafa?? Mi??ecki wrote:
> On 30.07.2022 09:36, Rafa?? Mi??ecki wrote:
> > On 16.07.2022 22:50, Rafa?? Mi??ecki wrote:
> > > I added of_platform_populate() calls in mtd subsystem in the commit
> > > bcdf0315a61a2 ("mtd: call of_platform_populate() for MTD partitions"):
> > > https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=bcdf0315a61a29eb753a607d3a85a4032de72d94
> > > 
> > > I recently backported that commit in OpenWrt to kernels 5.10 and 5.15.
> > > We started receiving reports that probing Ethernet devices stopped
> > > working in kernel 5.15. I bisected it down to the kernel 5.13 change:
> > > 
> > > commit ea718c699055c8566eb64432388a04974c43b2ea (refs/bisect/bad)
> > > Author: Saravana Kannan <saravanak@google.com>
> > > Date:???? Tue Mar 2 13:11:32 2021 -0800
> > > 
> > > ???????? Revert "Revert "driver core: Set fw_devlink=on by default""
> > > 
> > > ???????? This reverts commit 3e4c982f1ce75faf5314477b8da296d2d00919df.
> > > 
> > > ???????? Since all reported issues due to fw_devlink=on should be addressed by
> > > ???????? this series, revert the revert. fw_devlink=on Take II.
> > > 
> > > ???????? Signed-off-by: Saravana Kannan <saravanak@google.com>
> > > ???????? Link: https://lore.kernel.org/r/20210302211133.2244281-4-saravanak@google.com
> > > ???????? Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
> > > 
> > > For me with above commit kernel just never calls bcm4908_enet_probe().
> > > Reverting it from the top of 5.13.19 and 5.15.50 fixes it. I believe the
> > > same issue happens with other drivers.
> > > 
> > > Critical detail is that in DT Ethernet block node references NVMEM cell
> > > of MTD partition (see below).
> > > 
> > > Could you help me dealing with this issue, please? Can you see something
> > > obvious breaking fw_devlink=on + of_platform_populate() case? Can I
> > > provide some extra information to help fixing it?
> > 
> > Any ideas about this problem / solution?
> 
> I didn't get any reponse for this bug for 6 weeks now. Is that OK if I
> send a revert patch then?

I'm pretty sure this is the same root cause as I had for PCIe with a reference
to iommu with fw_devlink.strict=1:

https://lore.kernel.org/lkml/CAOesGMgpJQjMvo6m7on+27F8REiHaVSRL6HBjiRPVDM9Jscnrg@mail.gmail.com/

There's the dependency on the nvmem-cells propery, so the driver core doesn't
call probe until it's fulfilled. Meanwhile, the platform_driver() code
unregisters the driver if it (thinks) it as called probe and there are no
devices linked to it -- since it's not a needed driver. Thus, probe will never
be called. That code is in drivers/base/platform.c:__platform_driver_probe().

I don't know what the proper fix is here, this seems like a design issue with
the fw_devlink code.


-Olof

  parent reply	other threads:[~2022-09-19 23:31 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-07-16 20:50 fw_devlink=on breaks probing devices when of_platform_populate() is used Rafał Miłecki
2022-07-30  7:36 ` Rafał Miłecki
2022-08-28 14:39   ` Rafał Miłecki
2022-08-30  7:18     ` Saravana Kannan
2022-09-19 23:31     ` Olof Johansson [this message]
2022-12-11  8:46       ` Maksim Kiselev
2022-12-14 21:55         ` Saravana Kannan

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=Yyj7wJlqJkCwObRn@lx2k \
    --to=olof@lixom.net \
    --cc=ansuelsmth@gmail.com \
    --cc=devicetree@vger.kernel.org \
    --cc=gregkh@linuxfoundation.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=rafael@kernel.org \
    --cc=saravanak@google.com \
    --cc=zajec5@gmail.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;
as well as URLs for NNTP newsgroup(s).