* [U-Boot] [PATCH] usb_storage: blacklist Enclosure Service Devices
2014-11-06 12:51 [U-Boot] [PATCH] usb_storage: skip all unknown devices when probing Soeren Moch
@ 2014-11-08 6:02 ` Soeren Moch
2014-11-08 6:28 ` Nikolay Dimitrov
2014-11-08 11:04 ` Marek Vasut
0 siblings, 2 replies; 4+ messages in thread
From: Soeren Moch @ 2014-11-08 6:02 UTC (permalink / raw)
To: u-boot
Skip enclosure service devices when probing for usb storage devices.
This avoids long timeouts when probing for external usb harddisks
which provide "Enclosure Services".
Signed-off-by: Soeren Moch <smoch@web.de>
--
This is a new version of the patch
"usb_storage: skip all unknown devices when probing"
http://http://lists.denx.de/pipermail/u-boot/2014-November/194622.html
Cc: Marek Vasut <marex@denx.de>
Cc: Tom Rini <trini@ti.com>
---
common/usb_storage.c | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/common/usb_storage.c b/common/usb_storage.c
index eb7706c..9198f73 100644
--- a/common/usb_storage.c
+++ b/common/usb_storage.c
@@ -1351,8 +1351,9 @@ int usb_stor_get_info(struct usb_device *dev, struct us_data *ss,
perq = usb_stor_buf[0];
modi = usb_stor_buf[1];
- if ((perq & 0x1f) == 0x1f) {
- /* skip unknown devices */
+ if (((perq & 0x1f) == 0x1f) || ((perq & 0x1f) == 0x0d)) {
+ /* skip unknown devices and enclosure service devices, */
+ /* they would not respond to test_unit_ready */
return 0;
}
if ((modi&0x80) == 0x80) {
--
1.9.1
^ permalink raw reply related [flat|nested] 4+ messages in thread
* [U-Boot] [PATCH] usb_storage: blacklist Enclosure Service Devices
2014-11-08 6:02 ` [U-Boot] [PATCH] usb_storage: blacklist Enclosure Service Devices Soeren Moch
@ 2014-11-08 6:28 ` Nikolay Dimitrov
2014-11-08 11:04 ` Marek Vasut
1 sibling, 0 replies; 4+ messages in thread
From: Nikolay Dimitrov @ 2014-11-08 6:28 UTC (permalink / raw)
To: u-boot
Hi Soeren,
On 11/08/2014 08:02 AM, Soeren Moch wrote:
> Skip enclosure service devices when probing for usb storage devices.
>
> This avoids long timeouts when probing for external usb harddisks
> which provide "Enclosure Services".
>
> Signed-off-by: Soeren Moch <smoch@web.de>
> --
>
> This is a new version of the patch
> "usb_storage: skip all unknown devices when probing"
> http://http://lists.denx.de/pipermail/u-boot/2014-November/194622.html
>
> Cc: Marek Vasut <marex@denx.de>
> Cc: Tom Rini <trini@ti.com>
> ---
> common/usb_storage.c | 5 +++--
> 1 file changed, 3 insertions(+), 2 deletions(-)
>
> diff --git a/common/usb_storage.c b/common/usb_storage.c
> index eb7706c..9198f73 100644
> --- a/common/usb_storage.c
> +++ b/common/usb_storage.c
> @@ -1351,8 +1351,9 @@ int usb_stor_get_info(struct usb_device *dev, struct us_data *ss,
> perq = usb_stor_buf[0];
> modi = usb_stor_buf[1];
>
> - if ((perq & 0x1f) == 0x1f) {
> - /* skip unknown devices */
> + if (((perq & 0x1f) == 0x1f) || ((perq & 0x1f) == 0x0d)) {
> + /* skip unknown devices and enclosure service devices, */
> + /* they would not respond to test_unit_ready */
> return 0;
> }
> if ((modi&0x80) == 0x80) {
>
Is it possible to provide a configuration option and some default
behavior, instead of just disabling it?
Regards,
Nikolay
^ permalink raw reply [flat|nested] 4+ messages in thread
* [U-Boot] [PATCH] usb_storage: blacklist Enclosure Service Devices
2014-11-08 6:02 ` [U-Boot] [PATCH] usb_storage: blacklist Enclosure Service Devices Soeren Moch
2014-11-08 6:28 ` Nikolay Dimitrov
@ 2014-11-08 11:04 ` Marek Vasut
1 sibling, 0 replies; 4+ messages in thread
From: Marek Vasut @ 2014-11-08 11:04 UTC (permalink / raw)
To: u-boot
On Saturday, November 08, 2014 at 07:02:14 AM, Soeren Moch wrote:
> Skip enclosure service devices when probing for usb storage devices.
>
> This avoids long timeouts when probing for external usb harddisks
> which provide "Enclosure Services".
>
> Signed-off-by: Soeren Moch <smoch@web.de>
I tweaked the comment so it matches the patch guidelines [1] and applied.
Thanks!
[1] http://www.denx.de/wiki/U-Boot/Patches
Best regards,
Marek Vasut
^ permalink raw reply [flat|nested] 4+ messages in thread
* [U-Boot] [PATCH] usb_storage: blacklist Enclosure Service Devices
[not found] <mailman.3.1415444402.20423.u-boot@lists.denx.de>
@ 2014-11-08 12:49 ` Soeren Moch
0 siblings, 0 replies; 4+ messages in thread
From: Soeren Moch @ 2014-11-08 12:49 UTC (permalink / raw)
To: u-boot
>> > Skip enclosure service devices when probing for usb storage devices.
>> >
>> > This avoids long timeouts when probing for external usb harddisks
>> > which provide "Enclosure Services".
>> >
>> > Signed-off-by: Soeren Moch <smoch@web.de>
> Is it possible to provide a configuration option and some default
> behavior, instead of just disabling it?
>
Nikolay,
I don't understand your concern, why do you need some other default
behavior? Since the "block device" part of the harddisk keeps active,
why not skipping the "enclosure service" part? Is there any command to
access enclosure services from u-boot?
Please keep me (and maintainers) on cc when answering the mail. But
since the patch is already applied (thanks Marek!), it may be to late
for discussions anyway...
Regards,
Soeren
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2014-11-08 12:49 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
[not found] <mailman.3.1415444402.20423.u-boot@lists.denx.de>
2014-11-08 12:49 ` [U-Boot] [PATCH] usb_storage: blacklist Enclosure Service Devices Soeren Moch
2014-11-06 12:51 [U-Boot] [PATCH] usb_storage: skip all unknown devices when probing Soeren Moch
2014-11-08 6:02 ` [U-Boot] [PATCH] usb_storage: blacklist Enclosure Service Devices Soeren Moch
2014-11-08 6:28 ` Nikolay Dimitrov
2014-11-08 11:04 ` Marek Vasut
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox