diff options
author | Tom Rini <trini@ti.com> | 2012-12-21 23:19:29 (GMT) |
---|---|---|
committer | Tom Rini <trini@ti.com> | 2012-12-21 23:19:29 (GMT) |
commit | ba6d4b64b33146740a15b3dd5a5f511a2bc8d6f6 (patch) | |
tree | c57eeb10d2b625a1052cb523e6dd53d067b1bb65 /common/usb_storage.c | |
parent | ba427678a419a59c091e1c816c13852fa05b24bf (diff) | |
parent | 41984e71231c7af4a5617f4f94f372714c64d987 (diff) | |
download | u-boot-fsl-qoriq-ba6d4b64b33146740a15b3dd5a5f511a2bc8d6f6.tar.xz |
Merge branch 'master' of git://git.denx.de/u-boot-usb
Diffstat (limited to 'common/usb_storage.c')
-rw-r--r-- | common/usb_storage.c | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/common/usb_storage.c b/common/usb_storage.c index 2d92ee1..fb322b4 100644 --- a/common/usb_storage.c +++ b/common/usb_storage.c @@ -970,6 +970,16 @@ static int usb_test_unit_ready(ccb *srb, struct us_data *ss) return 0; } usb_request_sense(srb, ss); + /* + * Check the Key Code Qualifier, if it matches + * "Not Ready - medium not present" + * (the sense Key equals 0x2 and the ASC is 0x3a) + * return immediately as the medium being absent won't change + * unless there is a user action. + */ + if ((srb->sense_buf[2] == 0x02) && + (srb->sense_buf[12] == 0x3a)) + return -1; mdelay(100); } while (retries--); |