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.
This commit is contained in:
cinap_lenrek 2013-03-10 04:06:42 +01:00
parent cc02f96ed9
commit 9f25f9504a

View file

@ -345,8 +345,10 @@ umsinit(void)
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.