From: Isaac Manjarres <isaacmanjarres@google.com>
To: Guenter Roeck <linux@roeck-us.net>
Cc: Saravana Kannan <saravanak@google.com>,
Russell King <linux@armlinux.org.uk>,
Philipp Zabel <p.zabel@pengutronix.de>,
Rob Herring <robh@kernel.org>,
Ulf Hansson <ulf.hansson@linaro.org>,
Linus Walleij <linus.walleij@linaro.org>,
Sudeep Holla <sudeep.holla@arm.com>,
Nicolas Saenz Julienne <nsaenz@kernel.org>,
Geert Uytterhoeven <geert+renesas@glider.be>,
Marek Szyprowski <m.szyprowski@samsung.com>,
Kefeng Wang <wangkefeng.wang@huawei.com>,
Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
patches@armlinux.org.uk, kernel-team@android.com,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH v6] amba: Remove deferred device addition
Date: Wed, 10 Aug 2022 14:47:26 -0700 [thread overview]
Message-ID: <YvQnbq2RhMOElQE3@google.com> (raw)
In-Reply-To: <1196e002-c07d-44fd-b07a-aa5ae446ea0b@roeck-us.net>
On Wed, Aug 10, 2022 at 05:58:58AM -0700, Guenter Roeck wrote:
> On 8/9/22 20:33, Saravana Kannan wrote:
> [ ... ]
>
> >
> > Can you give me more details on the qemu configuration so I could try
> > to reproduce it?
>
> qemu-system-arm -M vexpress-a9 -kernel arch/arm/boot/zImage -no-reboot \
> -initrd rootfs-armv5.cpio -m 128 \
> --append "rdinit=/sbin/init console=ttyAMA0,115200" \
> -dtb arch/arm/boot/dts/vexpress-v2p-ca9.dtb \
> -nographic -monitor null -serial stdio
>
> using multi_v7_defconfig will hang nicely with your patch applied,
> and boot as expected without. This was with qemu v7.0, but I am
> sure older qemu versions will show the same behavior. The initrd
> used should not matter, but you'll find it at
> https://github.com/groeck/linux-build-test/blob/master/rootfs/arm-v7/rootfs-armv5.cpio.gz
>
> Guenter
>
Hi Guenter,
Thanks for the information; I was able to reproduce this on my end as
well. The following changes fixed the problem for me. Can you please try
them out?
diff --git a/drivers/base/dd.c b/drivers/base/dd.c
index 70f79fc71539..b377f18d8acc 100644
--- a/drivers/base/dd.c
+++ b/drivers/base/dd.c
@@ -881,6 +881,11 @@ static int __device_attach_driver(struct device_driver *drv, void *_data)
dev_dbg(dev, "Device match requests probe deferral\n");
dev->can_match = true;
driver_deferred_probe_add(dev);
+ /*
+ * Device can't match with the bus right now, so don't attempt
+ * to match or bind with other drivers on the bus.
+ */
+ return ret;
} else if (ret < 0) {
dev_dbg(dev, "Bus failed to match device: %d\n", ret);
return ret;
@@ -1120,6 +1125,11 @@ static int __driver_attach(struct device *dev, void *data)
dev_dbg(dev, "Device match requests probe deferral\n");
dev->can_match = true;
driver_deferred_probe_add(dev);
+ /*
+ * Driver could not match with device, but may match with
+ * another device on the bus.
+ */
+ return 0;
} else if (ret < 0) {
dev_dbg(dev, "Bus failed to match device: %d\n", ret);
return ret;
Thanks,
Isaac
next prev parent reply other threads:[~2022-08-10 21:47 UTC|newest]
Thread overview: 21+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-07-27 18:19 [PATCH v6] amba: Remove deferred device addition Saravana Kannan
2022-07-27 22:16 ` Russell King (Oracle)
2022-07-28 0:10 ` Saravana Kannan
2022-07-28 14:16 ` Russell King (Oracle)
2022-07-28 18:29 ` Saravana Kannan
2022-08-09 10:30 ` Guenter Roeck
2022-08-10 0:42 ` Saravana Kannan
2022-08-10 1:34 ` Guenter Roeck
2022-08-10 3:33 ` Saravana Kannan
2022-08-10 12:58 ` Guenter Roeck
2022-08-10 21:47 ` Isaac Manjarres [this message]
2022-08-11 2:03 ` Guenter Roeck
2022-08-11 2:28 ` Saravana Kannan
2022-08-11 4:09 ` Guenter Roeck
2022-08-11 16:51 ` Isaac Manjarres
2022-08-11 19:18 ` Isaac Manjarres
2022-08-11 19:55 ` Guenter Roeck
2022-08-12 5:12 ` Isaac Manjarres
2022-08-12 15:19 ` Guenter Roeck
2022-08-12 15:30 ` Guenter Roeck
2022-08-15 18:43 ` Isaac Manjarres
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=YvQnbq2RhMOElQE3@google.com \
--to=isaacmanjarres@google.com \
--cc=geert+renesas@glider.be \
--cc=gregkh@linuxfoundation.org \
--cc=kernel-team@android.com \
--cc=linus.walleij@linaro.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux@armlinux.org.uk \
--cc=linux@roeck-us.net \
--cc=m.szyprowski@samsung.com \
--cc=nsaenz@kernel.org \
--cc=p.zabel@pengutronix.de \
--cc=patches@armlinux.org.uk \
--cc=robh@kernel.org \
--cc=saravanak@google.com \
--cc=sudeep.holla@arm.com \
--cc=ulf.hansson@linaro.org \
--cc=wangkefeng.wang@huawei.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).