The 'ready' condition was incorrectly evaluated which sometimes lead to
failures loading the second-stage firmware on 8686 devices.
(This was introduced in "libertas: consolidate SDIO firmware wait code".
-- JWL)
Signed-off-by: Dan Williams <dcbw@redhat.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
timeout = jiffies + HZ;
while (1) {
status = sdio_readb(card->func, IF_SDIO_STATUS, &ret);
- if (ret || (status & condition))
+ if (ret)
+ return ret;
+ if ((status & condition) == condition)
break;
if (time_after(jiffies, timeout))
return -ETIMEDOUT;