Commit 6a559bbe2f60ab64e28662f7ab52551a2eaa7163

Authored by Soeren Moch
Committed by Marek Vasut
1 parent 3908f16f85

usb_storage: blacklist Enclosure Service Devices

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>

Showing 1 changed file with 5 additions and 2 deletions Side-by-side Diff

common/usb_storage.c
... ... @@ -1351,8 +1351,11 @@
1351 1351 perq = usb_stor_buf[0];
1352 1352 modi = usb_stor_buf[1];
1353 1353  
1354   - if ((perq & 0x1f) == 0x1f) {
1355   - /* skip unknown devices */
  1354 + /*
  1355 + * Skip unknown devices (0x1f) and enclosure service devices (0x0d),
  1356 + * they would not respond to test_unit_ready .
  1357 + */
  1358 + if (((perq & 0x1f) == 0x1f) || ((perq & 0x1f) == 0x0d)) {
1356 1359 return 0;
1357 1360 }
1358 1361 if ((modi&0x80) == 0x80) {