From: Marek Vasut <marex@denx.de>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH] usb_storage: skip all unknown devices when probing
Date: Thu, 6 Nov 2014 21:41:41 +0100 [thread overview]
Message-ID: <201411062141.41448.marex@denx.de> (raw)
In-Reply-To: <1415278311-3090-1-git-send-email-smoch@web.de>
On Thursday, November 06, 2014 at 01:51:51 PM, Soeren Moch wrote:
> Not only skip storage devices with DEV_TYPE_UNKNOWN, but also all devices
> which are unknown to u-boot (e.g., are not HARDDISK, TAPE, CDROM, OPDISK).
>
> This especially avoids long timeouts when probing for external usb
> harddisks which provide "Enclosure Services".
>
> Signed-off-by: Soeren Moch <smoch@web.de>
> --
> Cc: Marek Vasut <marex@denx.de>
> Cc: Tom Rini <trini@ti.com>
> ---
> common/usb_storage.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/common/usb_storage.c b/common/usb_storage.c
> index eb7706c..0ac7b48 100644
> --- a/common/usb_storage.c
> +++ b/common/usb_storage.c
> @@ -1351,7 +1351,7 @@ 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) {
> + if ((perq & 0x1f) > DEV_TYPE_OPDISK) {
Why can't you just blacklist 0xd instead ? I mean, this patch would do a bulk
blacklisting of all the obscure devices with peripheral ID above 0x7, but might
still work with this layer (like 0xc ... the RAID controller ; or 0xe ... the
reduced block device).
Won't it make sense to just selectively blacklist the 0xd ?
> /* skip unknown devices */
> return 0;
> }
Best regards,
Marek Vasut
next prev parent reply other threads:[~2014-11-06 20:41 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-11-06 12:51 [U-Boot] [PATCH] usb_storage: skip all unknown devices when probing Soeren Moch
2014-11-06 20:41 ` Marek Vasut [this message]
2014-11-07 9:28 ` Soeren Moch
2014-11-07 9:29 ` Marek Vasut
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
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=201411062141.41448.marex@denx.de \
--to=marex@denx.de \
--cc=u-boot@lists.denx.de \
/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 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.