From: Nikolay Dimitrov <picmaster@mail.bg>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH] usb_storage: blacklist Enclosure Service Devices
Date: Sat, 08 Nov 2014 08:28:47 +0200 [thread overview]
Message-ID: <545DB81F.7000205@mail.bg> (raw)
In-Reply-To: <1415426534-10331-1-git-send-email-smoch@web.de>
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
next prev parent reply other threads:[~2014-11-08 6:28 UTC|newest]
Thread overview: 8+ 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
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 [this message]
2014-11-08 11:04 ` Marek Vasut
[not found] <mailman.3.1415444402.20423.u-boot@lists.denx.de>
2014-11-08 12:49 ` Soeren Moch
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=545DB81F.7000205@mail.bg \
--to=picmaster@mail.bg \
--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.