Commit ca962557 authored by Dan Williams's avatar Dan Williams Committed by John W. Linville

libertas: fix 8686 firmware loading regression

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: default avatarDan Williams <dcbw@redhat.com>
Signed-off-by: default avatarJohn W. Linville <linville@tuxdriver.com>
parent 446cfaa4
...@@ -323,7 +323,9 @@ static int if_sdio_wait_status(struct if_sdio_card *card, const u8 condition) ...@@ -323,7 +323,9 @@ static int if_sdio_wait_status(struct if_sdio_card *card, const u8 condition)
timeout = jiffies + HZ; timeout = jiffies + HZ;
while (1) { while (1) {
status = sdio_readb(card->func, IF_SDIO_STATUS, &ret); status = sdio_readb(card->func, IF_SDIO_STATUS, &ret);
if (ret || (status & condition)) if (ret)
return ret;
if ((status & condition) == condition)
break; break;
if (time_after(jiffies, timeout)) if (time_after(jiffies, timeout))
return -ETIMEDOUT; return -ETIMEDOUT;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment