* [PATCH 1/1] usb: storage: stop probe on "Invalid device"
@ 2022-07-21 17:29 Janne Grunau
2022-08-07 15:47 ` Simon Glass
0 siblings, 1 reply; 4+ messages in thread
From: Janne Grunau @ 2022-07-21 17:29 UTC (permalink / raw)
To: Lukasz Majewski, u-boot
Fixes a crash during probing of sd card readers without medium present.
Link: https://github.com/AsahiLinux/linux/issues/44
Signed-off-by: Janne Grunau <j@jannau.net>
---
common/usb_storage.c | 4 +---
1 file changed, 1 insertion(+), 3 deletions(-)
diff --git a/common/usb_storage.c b/common/usb_storage.c
index eaa31374ef73..5a62d61f4382 100644
--- a/common/usb_storage.c
+++ b/common/usb_storage.c
@@ -236,9 +236,7 @@ static int usb_stor_probe_device(struct usb_device *udev)
debug("%s: Found device %p\n", __func__, udev);
} else {
debug("usb_stor_get_info: Invalid device\n");
- ret = device_unbind(dev);
- if (ret)
- return ret;
+ return device_unbind(dev);
}
ret = blk_probe_or_unbind(dev);
--
2.35.1
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH 1/1] usb: storage: stop probe on "Invalid device"
2022-07-21 17:29 [PATCH 1/1] usb: storage: stop probe on "Invalid device" Janne Grunau
@ 2022-08-07 15:47 ` Simon Glass
2022-08-08 2:18 ` AKASHI Takahiro
0 siblings, 1 reply; 4+ messages in thread
From: Simon Glass @ 2022-08-07 15:47 UTC (permalink / raw)
To: Janne Grunau; +Cc: Lukasz Majewski, U-Boot Mailing List
Hi Marek,
On Thu, 21 Jul 2022 at 11:29, Janne Grunau <j@jannau.net> wrote:
>
> Fixes a crash during probing of sd card readers without medium present.
>
> Link: https://github.com/AsahiLinux/linux/issues/44
> Signed-off-by: Janne Grunau <j@jannau.net>
> ---
> common/usb_storage.c | 4 +---
> 1 file changed, 1 insertion(+), 3 deletions(-)
Reviewed-by: Simon Glass <sjg@chromium.org>
Shall I pick this one up?
Regards,
Simon
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH 1/1] usb: storage: stop probe on "Invalid device"
2022-08-07 15:47 ` Simon Glass
@ 2022-08-08 2:18 ` AKASHI Takahiro
2022-08-08 8:45 ` Simon Glass
0 siblings, 1 reply; 4+ messages in thread
From: AKASHI Takahiro @ 2022-08-08 2:18 UTC (permalink / raw)
To: Simon Glass; +Cc: Janne Grunau, Lukasz Majewski, U-Boot Mailing List
Hi Simon,
On Sun, Aug 07, 2022 at 09:47:56AM -0600, Simon Glass wrote:
> Hi Marek,
>
> On Thu, 21 Jul 2022 at 11:29, Janne Grunau <j@jannau.net> wrote:
> >
> > Fixes a crash during probing of sd card readers without medium present.
> >
> > Link: https://github.com/AsahiLinux/linux/issues/44
> > Signed-off-by: Janne Grunau <j@jannau.net>
> > ---
> > common/usb_storage.c | 4 +---
> > 1 file changed, 1 insertion(+), 3 deletions(-)
>
> Reviewed-by: Simon Glass <sjg@chromium.org>
I made this comment on another bug report:
https://lists.denx.de/pipermail/u-boot/2022-July/489717.html
I think we should continue to scan the *bus* even if detecting/activating
a specific device fails.
Moreover, we would better do full recovery from blk_create_device(f)()
as it has some side-effects, including an increased "devnum".
-Takahiro Akashi
> Shall I pick this one up?
>
> Regards,
> Simon
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH 1/1] usb: storage: stop probe on "Invalid device"
2022-08-08 2:18 ` AKASHI Takahiro
@ 2022-08-08 8:45 ` Simon Glass
0 siblings, 0 replies; 4+ messages in thread
From: Simon Glass @ 2022-08-08 8:45 UTC (permalink / raw)
To: AKASHI Takahiro, Simon Glass, Janne Grunau, Lukasz Majewski,
U-Boot Mailing List
Hi Takahiro,
On Sun, 7 Aug 2022 at 20:18, AKASHI Takahiro <takahiro.akashi@linaro.org>
wrote:
>
> Hi Simon,
>
> On Sun, Aug 07, 2022 at 09:47:56AM -0600, Simon Glass wrote:
> > Hi Marek,
> >
> > On Thu, 21 Jul 2022 at 11:29, Janne Grunau <j@jannau.net> wrote:
> > >
> > > Fixes a crash during probing of sd card readers without medium
present.
> > >
> > > Link: https://github.com/AsahiLinux/linux/issues/44
> > > Signed-off-by: Janne Grunau <j@jannau.net>
> > > ---
> > > common/usb_storage.c | 4 +---
> > > 1 file changed, 1 insertion(+), 3 deletions(-)
> >
> > Reviewed-by: Simon Glass <sjg@chromium.org>
>
> I made this comment on another bug report:
> https://lists.denx.de/pipermail/u-boot/2022-July/489717.html
>
> I think we should continue to scan the *bus* even if detecting/activating
> a specific device fails.
>
> Moreover, we would better do full recovery from blk_create_device(f)()
> as it has some side-effects, including an increased "devnum".
OK I didn't see that. Can you please send an alternative patch?
>
> -Takahiro Akashi
>
> > Shall I pick this one up?
Regards,
Simon
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2022-08-08 8:45 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-07-21 17:29 [PATCH 1/1] usb: storage: stop probe on "Invalid device" Janne Grunau
2022-08-07 15:47 ` Simon Glass
2022-08-08 2:18 ` AKASHI Takahiro
2022-08-08 8:45 ` Simon Glass
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.