usb: storage: stop probe on "Invalid device"
PATCH 1/1 usb: storage: stop probe on "Invalid device"
Fixes a crash during probing of sd card readers without medium present.
--- common/usb_storage.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-)
common/usb_storage.c +1 -3
@@ -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);
Signature · 1 line
2.35.1
Hi Marek,
Quoted 8 lines · Janne Grunau
Fixes a crash during probing of sd card readers without medium present.
--- common/usb_storage.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-)
Shall I pick this one up?
Regards,
Simon
Hi Simon,
Quoted 6 lines · Simon Glass
Hi Marek,
Quoted 3 lines · Janne Grunau
Fixes a crash during probing of sd card readers without medium present.
Quoted 7 lines
Quoted 5 lines
--- common/usb_storage.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-)Reviewed-by Simon Glass <[email protected]>
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
Quoted 4 lines
Shall I pick this one up?
Regards,
Simon
Hi Takahiro,
Quoted 9 lines · AKASHI Takahiro
Hi Simon,
Quoted 5 lines · Simon Glass
Hi Marek,
Quoted 2 lines · Janne Grunau
Fixes a crash during probing of sd card readers without medium
present.
Quoted 9 lines
Quoted 8 lines
Quoted 6 lines
--- common/usb_storage.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-)Reviewed-by Simon Glass <[email protected]>
Quoted 8 lines
I made this comment on another bug report:
https://lists.denx.de/pipermail/u-boot/2022-July/489717.htmlI 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?
Quoted 4 lines
-Takahiro Akashi
Quoted 1 line
Shall I pick this one up?
Regards,
Simon