mirror of
https://github.com/AuxXxilium/linux_dsm_epyc7002.git
synced 2024-12-02 15:46:43 +07:00
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: Dan Williams <dcbw@redhat.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
This commit is contained in:
parent
446cfaa412
commit
ca962557c2
@ -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;
|
||||||
|
Loading…
Reference in New Issue
Block a user