ref: 9f25f9504af4f42cbcd9b3047b338c95c69c4ea5
parent: cc02f96ed9efe941aed56e71b2fc42c6f98936ed
author: cinap_lenrek <cinap_lenrek@gmx.de>
date: Sat Mar 9 23:06:42 EST 2013
nusb/disk: add small delay after unit start command (for thinkpad sdcard reader) diskparts fails on thinkpad x200 sdcard reader if we dont give the unit some time to startup. the device took about 100ms to become ready so status poll loop with a long timeout would be overkill.
--- a/sys/src/cmd/nusb/disk/disk.c
+++ b/sys/src/cmd/nusb/disk/disk.c
@@ -345,8 +345,10 @@
if(SRready(lun) < 0 && SRready(lun) < 0 && SRready(lun) < 0)
dprint(2, "disk: lun %d not ready\n", i);
- if((lun->inquiry[0] & 0x1F) == 0)
+ if((lun->inquiry[0] & 0x1F) == 0){SRstart(lun, 1);
+ sleep(250);
+ }
/*
* we ignore the device type reported by inquiry.
--
⑨