linux-gpio.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Maxim Kiselev <bigunclemax@gmail.com>
To: Miquel Raynal <miquel.raynal@bootlin.com>
Cc: Saravana Kannan <saravanak@google.com>,
	Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
	"Rafael J. Wysocki" <rafael@kernel.org>,
	Sudeep Holla <sudeep.holla@arm.com>,
	Cristian Marussi <cristian.marussi@arm.com>,
	Linus Walleij <linus.walleij@linaro.org>,
	Bartosz Golaszewski <brgl@bgdev.pl>,
	Thomas Gleixner <tglx@linutronix.de>,
	Marc Zyngier <maz@kernel.org>, Shawn Guo <shawnguo@kernel.org>,
	Sascha Hauer <s.hauer@pengutronix.de>,
	Pengutronix Kernel Team <kernel@pengutronix.de>,
	Fabio Estevam <festevam@gmail.com>,
	NXP Linux Team <linux-imx@nxp.com>,
	Rob Herring <robh+dt@kernel.org>,
	Frank Rowand <frowand.list@gmail.com>,
	Geert Uytterhoeven <geert+renesas@glider.be>,
	Magnus Damm <magnus.damm@gmail.com>, Len Brown <lenb@kernel.org>,
	Andy Shevchenko <andriy.shevchenko@linux.intel.com>,
	Daniel Scally <djrscally@gmail.com>,
	Heikki Krogerus <heikki.krogerus@linux.intel.com>,
	Sakari Ailus <sakari.ailus@linux.intel.com>,
	Tony Lindgren <tony@atomide.com>,
	Linux Kernel Functional Testing <lkft@linaro.org>,
	Naresh Kamboju <naresh.kamboju@linaro.org>,
	Abel Vesa <abel.vesa@linaro.org>,
	Alexander Stein <alexander.stein@ew.tq-group.com>,
	Geert Uytterhoeven <geert@linux-m68k.org>,
	John Stultz <jstultz@google.com>,
	Doug Anderson <dianders@chromium.org>,
	Guenter Roeck <linux@roeck-us.net>,
	Dmitry Baryshkov <dmitry.baryshkov@linaro.org>,
	Maxim Kochetkov <fido_max@inbox.ru>,
	Luca Weiss <luca.weiss@fairphone.com>,
	Colin Foster <colin.foster@in-advantage.com>,
	Martin Kepplinger <martin.kepplinger@puri.sm>,
	Jean-Philippe Brucker <jpb@kernel.org>,
	kernel-team@android.com, linux-kernel@vger.kernel.org,
	linux-arm-kernel@lists.infradead.org, linux-gpio@vger.kernel.org,
	devicetree@vger.kernel.org, linux-renesas-soc@vger.kernel.org,
	linux-acpi@vger.kernel.org
Subject: Re: [PATCH v2 00/11] fw_devlink improvements
Date: Mon, 30 Jan 2023 15:08:46 +0300	[thread overview]
Message-ID: <CALHCpMimX63NC2P=mYdqOv339P06B4iAd10L2NpC5ALy_207vA@mail.gmail.com> (raw)
In-Reply-To: <20230130114839.379f08bd@xps-13>

Hi Saravana & Miquel.

Sorry for the long response. I finally got access to my test device
and tried this patch series.

And unfortunately it didn't solve my issue. I'm still getting a
hanging f1070000.ethernet dependency
from the nvmem-cell mac@6 subnode.

Here are related parts of my kernel log and device tree:


    [    2.713302] device: 'mtd-0': device_add
    [    2.719528] device: 'spi0': device_add
    [    2.724180] device: 'spi0.0': device_add
    [    2.728957] spi-nor spi0.0: mx66l51235f (65536 Kbytes)
    [    2.735338] 7 fixed-partitions partitions found on MTD device spi0.0
    [    2.741978] device:
'f1010600.spi:m25p80@0:partitions:partition@1': device_add
    [    2.749636] Creating 7 MTD partitions on "spi0.0":
    [    2.754564] 0x000000000000-0x000000080000 : "SPI.U_BOOT"
    [    2.759981] device: 'mtd0': device_add
    [    2.764323] device: 'mtd0': device_add
    [    2.768280] device: 'mtd0ro': device_add
    [    2.772624] 0x0000000a0000-0x0000000c0000 : "SPI.INV_INFO"
    [    2.778218] device: 'mtd1': device_add
    [    2.782549] device: 'mtd1': device_add
    [    2.786582] device: 'mtd1ro': device_add
    ...
    [    5.426625] mvneta_bm f10c0000.bm: Buffer Manager for network
controller enabled
    [    5.492867] platform f1070000.ethernet: error -EPROBE_DEFER:
wait for supplier mac@6
    [    5.528636] device: 'Fixed MDIO bus.0': device_add
    [    5.533726] device: 'fixed-0': device_add
    [    5.547564] device: 'f1072004.mdio-eth-mii': device_add
    [    5.616368] device: 'f1072004.mdio-eth-mii:00': device_add
    [    5.645127] device: 'f1072004.mdio-eth-mii:1e': device_add
    [    5.651530] devices_kset: Moving f1070000.ethernet to end of list
    [    5.657948] platform f1070000.ethernet: error -EPROBE_DEFER:
wait for supplier mac@6

    spi@10600 {
        m25p80@0 {
            compatible = "mx66l51235l";

            partitions {
                compatible = "fixed-partitions";

                partition@0 {
                    label = "SPI.U_BOOT";
                };
                partition@1 {
                    compatible = "nvmem-cells";
                    label = "SPI.INV_INFO";
                    macaddr: mac@6 {
                        reg = <0x6 0x6>;
                    };
                };
                ...
            };
        };
    };

    enet1: ethernet@70000 {
        nvmem-cells = <&macaddr>;
        nvmem-cell-names = "mac-address";
        phy-mode = "rgmii";
        phy = <&phy0>;
    };


Maybe I should provide some additional debug info?

пн, 30 янв. 2023 г. в 13:48, Miquel Raynal <miquel.raynal@bootlin.com>:
>
> Hi Maxim & Maxim,
>
> saravanak@google.com wrote on Thu, 26 Jan 2023 16:11:27 -0800:
>
> > This patch series improves fw_devlink in the following ways:
> >
> > 1. It no longer cares about a fwnode having a "compatible" property. It
> >    figures this our more dynamically. The only expectation is that
> >    fwnode that are converted to devices actually get probed by a driver
> >    for the dependencies to be enforced correctly.
> >
> > 2. Finer grained dependency tracking. fw_devlink will now create device
> >    links from the consumer to the actual resource's device (if it has one,
> >    Eg: gpio_device) instead of the parent supplier device. This improves
> >    things like async suspend/resume ordering, potentially remove the need
> >    for frameworks to create device links, more parallelized async probing,
> >    and better sync_state() tracking.
> >
> > 3. Handle hardware/software quirks where a child firmware node gets
> >    populated as a device before its parent firmware node AND actually
> >    supplies a non-optional resource to the parent firmware node's
> >    device.
> >
> > 4. Way more robust at cycle handling (see patch for the insane cases).
> >
> > 5. Stops depending on OF_POPULATED to figure out some corner cases.
> >
> > 6. Simplifies the work that needs to be done by the firmware specific
> >    code.
> >
> > Sorry it took a while to roll in the fixes I gave in the v1 series
> > thread[1] into a v2 series.
> >
> > Since I didn't make any additional changes on top of what I already gave
> > in the v1 thread and Dmitry is very eager to get this series going, I'm
> > sending it out without testing locally. I already tested these patches a
> > few months ago as part of the v1 series. So I don't expect any major
> > issues. I'll test them again on my end in the next few days and will
> > report here if I actually find anything wrong.
> >
> > Tony, Naresh, Abel, Sudeep, Geert,
> >
> > I got the following reviewed by's and tested by's a few months back, but
> > it's been 5 months since I sent out v1. So I wasn't sure if it was okay
> > to include them in the v2 commits. Let me know if you are okay with this
> > being included in the commits and/or if you want to test this series
> > again.
> >
> > Reviewed-by: Tony Lindgren <tony@atomide.com>
> > Tested-by: Tony Lindgren <tony@atomide.com>
> > Tested-by: Linux Kernel Functional Testing <lkft@linaro.org>
> > Tested-by: Naresh Kamboju <naresh.kamboju@linaro.org>
> > Tested-by: Abel Vesa <abel.vesa@linaro.org>
> > Tested-by: Sudeep Holla <sudeep.holla@arm.com>
> > Tested-by: Geert Uytterhoeven <geert+renesas@glider.be>
> >
> > Dmitry, Maxim(s), Miquel, Luca, Doug, Colin, Martin, Jean-Philippe,
> >
> > I've Cc-ed you because I had pointed you to v1 of this series + the
> > patches in that thread at one point or another as a fix to some issue
> > you were facing. It'd appreciate it if you can test this series and
> > report any issues, or things it fixed and give Tested-bys.
>
> Maxim & Maxim I would really appreciate if you could validate that the
> original issue you had is solved with this version? I don't have any
> hardware suffering from this issue.
>
> > In addition, if you can also apply a revert of this series[2] and delete
> > driver_deferred_probe_check_state() from your tree and see if you hit
> > any issues and report them, that'd be great too! I'm pretty sure some of
> > you will hit issues with that. I want to fix those next and then
> > revert[2].
> >
> > Thanks,
> > Saravana
> >
> > [1] - https://lore.kernel.org/lkml/20220810060040.321697-1-saravanak@google.com/
> > [2] - https://lore.kernel.org/lkml/20220819221616.2107893-1-saravanak@google.com/
> > [3] - https://lore.kernel.org/lkml/CAGETcx-JUV1nj8wBJrTPfyvM7=Mre5j_vkVmZojeiumUGG6QZQ@mail.gmail.com/
> >
> > v1 -> v2:
> > - Fixed Patch 1 to handle a corner case discussed in [3].
> > - New patch 10 to handle "fsl,imx8mq-gpc" being initialized by 2 drivers.
> > - New patch 11 to add fw_devlink support for SCMI devices.
> >
> > Cc: Abel Vesa <abel.vesa@linaro.org>
> > Cc: Alexander Stein <alexander.stein@ew.tq-group.com>
> > Cc: Tony Lindgren <tony@atomide.com>
> > Cc: Sudeep Holla <sudeep.holla@arm.com>
> > Cc: Geert Uytterhoeven <geert@linux-m68k.org>
> > Cc: John Stultz <jstultz@google.com>
> > Cc: Doug Anderson <dianders@chromium.org>
> > Cc: Guenter Roeck <linux@roeck-us.net>
> > Cc: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
> > Cc: Maxim Kiselev <bigunclemax@gmail.com>
> > Cc: Maxim Kochetkov <fido_max@inbox.ru>
> > Cc: Miquel Raynal <miquel.raynal@bootlin.com>
> > Cc: Luca Weiss <luca.weiss@fairphone.com>
> > Cc: Colin Foster <colin.foster@in-advantage.com>
> > Cc: Martin Kepplinger <martin.kepplinger@puri.sm>
> > Cc: Jean-Philippe Brucker <jpb@kernel.org>
> >
> > Saravana Kannan (11):
> >   driver core: fw_devlink: Don't purge child fwnode's consumer links
> >   driver core: fw_devlink: Improve check for fwnode with no
> >     device/driver
> >   soc: renesas: Move away from using OF_POPULATED for fw_devlink
> >   gpiolib: Clear the gpio_device's fwnode initialized flag before adding
> >   driver core: fw_devlink: Add DL_FLAG_CYCLE support to device links
> >   driver core: fw_devlink: Allow marking a fwnode link as being part of
> >     a cycle
> >   driver core: fw_devlink: Consolidate device link flag computation
> >   driver core: fw_devlink: Make cycle detection more robust
> >   of: property: Simplify of_link_to_phandle()
> >   irqchip/irq-imx-gpcv2: Mark fwnode device as not initialized
> >   firmware: arm_scmi: Set fwnode for the scmi_device
> >
> >  drivers/base/core.c             | 443 +++++++++++++++++++++-----------
> >  drivers/firmware/arm_scmi/bus.c |   2 +
> >  drivers/gpio/gpiolib.c          |   6 +
> >  drivers/irqchip/irq-imx-gpcv2.c |   1 +
> >  drivers/of/property.c           |  84 +-----
> >  drivers/soc/imx/gpcv2.c         |   1 +
> >  drivers/soc/renesas/rcar-sysc.c |   2 +-
> >  include/linux/device.h          |   1 +
> >  include/linux/fwnode.h          |  12 +-
> >  9 files changed, 332 insertions(+), 220 deletions(-)
> >
>
>
> Thanks,
> Miquèl

  reply	other threads:[~2023-01-30 12:10 UTC|newest]

Thread overview: 73+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-01-27  0:11 [PATCH v2 00/11] fw_devlink improvements Saravana Kannan
2023-01-27  0:11 ` [PATCH v2 01/11] driver core: fw_devlink: Don't purge child fwnode's consumer links Saravana Kannan
2023-01-27  9:21   ` Andy Shevchenko
2023-01-28  7:33     ` Saravana Kannan
2023-01-30 12:04       ` Andy Shevchenko
2023-01-27  0:11 ` [PATCH v2 02/11] driver core: fw_devlink: Improve check for fwnode with no device/driver Saravana Kannan
2023-01-27  0:11 ` [PATCH v2 03/11] soc: renesas: Move away from using OF_POPULATED for fw_devlink Saravana Kannan
2023-01-27  8:11   ` Geert Uytterhoeven
2023-01-28  7:18     ` Saravana Kannan
2023-01-30  8:42       ` Geert Uytterhoeven
2023-01-30 20:00         ` Saravana Kannan
2023-01-31  8:14           ` Geert Uytterhoeven
2023-02-04 22:30             ` Saravana Kannan
2023-01-27  9:25   ` Andy Shevchenko
2023-01-27  9:30     ` Geert Uytterhoeven
2023-01-27  9:44       ` Andy Shevchenko
2023-01-27  0:11 ` [PATCH v2 04/11] gpiolib: Clear the gpio_device's fwnode initialized flag before adding Saravana Kannan
2023-01-27  9:27   ` Andy Shevchenko
2023-01-28  7:33     ` Saravana Kannan
2023-01-30 12:05       ` Andy Shevchenko
2023-01-30 14:31   ` Sudeep Holla
2023-01-30 15:14     ` Andy Shevchenko
2023-01-31  4:01       ` Saravana Kannan
2023-01-31 10:13         ` Sudeep Holla
2023-02-04 22:32           ` Saravana Kannan
2023-01-27  0:11 ` [PATCH v2 05/11] driver core: fw_devlink: Add DL_FLAG_CYCLE support to device links Saravana Kannan
2023-01-27  9:29   ` Andy Shevchenko
2023-01-27  9:30     ` Andy Shevchenko
2023-01-27  9:55     ` Geert Uytterhoeven
2023-01-28  7:34     ` Saravana Kannan
2023-01-30 12:08       ` Andy Shevchenko
2023-01-27  0:11 ` [PATCH v2 06/11] driver core: fw_devlink: Allow marking a fwnode link as being part of a cycle Saravana Kannan
2023-01-27  9:33   ` Andy Shevchenko
2023-01-28  7:34     ` Saravana Kannan
2023-01-30 12:09       ` Andy Shevchenko
2023-01-27  0:11 ` [PATCH v2 07/11] driver core: fw_devlink: Consolidate device link flag computation Saravana Kannan
2023-01-27  0:11 ` [PATCH v2 08/11] driver core: fw_devlink: Make cycle detection more robust Saravana Kannan
2023-01-27  9:43   ` Andy Shevchenko
2023-01-27  9:52     ` Geert Uytterhoeven
2023-01-27 10:10       ` Andy Shevchenko
2023-01-27 10:29         ` Geert Uytterhoeven
2023-01-28  7:34     ` Saravana Kannan
2023-01-30 12:15       ` Andy Shevchenko
2023-01-30 14:36         ` Geert Uytterhoeven
2023-01-30 15:16           ` Andy Shevchenko
2023-01-27  0:11 ` [PATCH v2 09/11] of: property: Simplify of_link_to_phandle() Saravana Kannan
2023-01-30 14:39   ` Sakari Ailus
2023-01-31  3:51     ` Saravana Kannan
2023-01-27  0:11 ` [PATCH v2 10/11] irqchip/irq-imx-gpcv2: Mark fwnode device as not initialized Saravana Kannan
2023-01-27  9:51   ` Andy Shevchenko
2023-01-28  7:34     ` Saravana Kannan
2023-01-27  0:11 ` [PATCH v2 11/11] firmware: arm_scmi: Set fwnode for the scmi_device Saravana Kannan
2023-01-27  9:52   ` Andy Shevchenko
2023-01-27 10:48   ` Sudeep Holla
2023-01-27 20:30 ` [PATCH v2 00/11] fw_devlink improvements Colin Foster
2023-01-27 21:35   ` Saravana Kannan
2023-01-30  8:55 ` Naresh Kamboju
2023-01-30 10:49   ` Marc Zyngier
2023-01-30 23:03   ` Saravana Kannan
2023-01-31 10:18     ` Sudeep Holla
2023-02-02 17:36       ` Maxim Kiselev
2023-02-03  6:07         ` Saravana Kannan
2023-02-03  9:39           ` Maxim Kiselev
2023-02-06  1:32             ` Saravana Kannan
2023-02-06  2:17               ` Saravana Kannan
2023-02-06  9:39               ` Miquel Raynal
2023-02-06 20:08                 ` Saravana Kannan
2023-02-24 14:46                   ` Miquel Raynal
2023-02-06 15:18               ` Rob Herring
2023-02-06 19:59                 ` Saravana Kannan
2023-01-30 10:48 ` Miquel Raynal
2023-01-30 12:08   ` Maxim Kiselev [this message]
2023-01-31  1:20     ` 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='CALHCpMimX63NC2P=mYdqOv339P06B4iAd10L2NpC5ALy_207vA@mail.gmail.com' \
    --to=bigunclemax@gmail.com \
    --cc=abel.vesa@linaro.org \
    --cc=alexander.stein@ew.tq-group.com \
    --cc=andriy.shevchenko@linux.intel.com \
    --cc=brgl@bgdev.pl \
    --cc=colin.foster@in-advantage.com \
    --cc=cristian.marussi@arm.com \
    --cc=devicetree@vger.kernel.org \
    --cc=dianders@chromium.org \
    --cc=djrscally@gmail.com \
    --cc=dmitry.baryshkov@linaro.org \
    --cc=festevam@gmail.com \
    --cc=fido_max@inbox.ru \
    --cc=frowand.list@gmail.com \
    --cc=geert+renesas@glider.be \
    --cc=geert@linux-m68k.org \
    --cc=gregkh@linuxfoundation.org \
    --cc=heikki.krogerus@linux.intel.com \
    --cc=jpb@kernel.org \
    --cc=jstultz@google.com \
    --cc=kernel-team@android.com \
    --cc=kernel@pengutronix.de \
    --cc=lenb@kernel.org \
    --cc=linus.walleij@linaro.org \
    --cc=linux-acpi@vger.kernel.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-gpio@vger.kernel.org \
    --cc=linux-imx@nxp.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-renesas-soc@vger.kernel.org \
    --cc=linux@roeck-us.net \
    --cc=lkft@linaro.org \
    --cc=luca.weiss@fairphone.com \
    --cc=magnus.damm@gmail.com \
    --cc=martin.kepplinger@puri.sm \
    --cc=maz@kernel.org \
    --cc=miquel.raynal@bootlin.com \
    --cc=naresh.kamboju@linaro.org \
    --cc=rafael@kernel.org \
    --cc=robh+dt@kernel.org \
    --cc=s.hauer@pengutronix.de \
    --cc=sakari.ailus@linux.intel.com \
    --cc=saravanak@google.com \
    --cc=shawnguo@kernel.org \
    --cc=sudeep.holla@arm.com \
    --cc=tglx@linutronix.de \
    --cc=tony@atomide.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).