提交 1fac36ee 编写于 作者: D Dan Williams 提交者: John W. Linville

libertas: fix CF firmware loading for some cards

if_cs_poll_while_fw_download() returned the number of iterations
remaining on success, which in turn got returned as the value from
if_cs_prog_real() and if_cs_prog_helper().  But since if_cs_probe()
interprets non-zero return values from firmware load functions as an
error, this sometimes caused spurious firmware load failures.
Signed-off-by: NDan Williams <dcbw@redhat.com>
Tested-by: NRyan Mallon <ryan@bluewatersys.com>
Acked-by: NRyan Mallon <ryan@bluewatersys.com>
Signed-off-by: NJohn W. Linville <linville@tuxdriver.com>
上级 07126127
...@@ -151,7 +151,7 @@ static int if_cs_poll_while_fw_download(struct if_cs_card *card, uint addr, u8 r ...@@ -151,7 +151,7 @@ static int if_cs_poll_while_fw_download(struct if_cs_card *card, uint addr, u8 r
for (i = 0; i < 100000; i++) { for (i = 0; i < 100000; i++) {
u8 val = if_cs_read8(card, addr); u8 val = if_cs_read8(card, addr);
if (val == reg) if (val == reg)
return i; return 0;
udelay(5); udelay(5);
} }
return -ETIME; return -ETIME;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册