diff options
author | Dan Williams <dcbw@redhat.com> | 2009-01-23 19:55:33 +0300 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2009-01-30 00:01:27 +0300 |
commit | 1fac36ee7d5a0611e1216b02b485b154c8aa6dad (patch) | |
tree | c253126f16feeb038d906ab98e1695108788d71e | |
parent | 0712612741e1dccf10353c70ebe90ba8cc60d5fb (diff) | |
download | linux-1fac36ee7d5a0611e1216b02b485b154c8aa6dad.tar.xz |
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: Dan Williams <dcbw@redhat.com>
Tested-by: Ryan Mallon <ryan@bluewatersys.com>
Acked-by: Ryan Mallon <ryan@bluewatersys.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
-rw-r--r-- | drivers/net/wireless/libertas/if_cs.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/net/wireless/libertas/if_cs.c b/drivers/net/wireless/libertas/if_cs.c index 842a08d1f106..8f8934a5ba3a 100644 --- a/drivers/net/wireless/libertas/if_cs.c +++ b/drivers/net/wireless/libertas/if_cs.c @@ -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++) { u8 val = if_cs_read8(card, addr); if (val == reg) - return i; + return 0; udelay(5); } return -ETIME; |