]> err.no Git - linux-2.6/commitdiff
libertas: fixes for slow hardware
authorHolger Schurig <hs4233@mail.mn-solutions.de>
Tue, 9 Oct 2007 08:41:57 +0000 (10:41 +0200)
committerJeff Garzik <jeff@garzik.org>
Sat, 10 Nov 2007 09:25:10 +0000 (04:25 -0500)
Fixes for slow hardware.

Signed-off-by: Vitaly V. Bursov <vitalyvb@ukr.net>
Signed-off-by: Holger Schurig <hs4233@mail.mn-solutions.de>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
drivers/net/wireless/libertas/if_cs.c

index 0360cad363a8dacd314be2fb57272daed142c1af..ec89dabc412c6560a290ac1f833f339e1da5445d 100644 (file)
@@ -148,11 +148,11 @@ static int if_cs_poll_while_fw_download(struct if_cs_card *card, uint addr, u8 r
 {
        int i;
 
-       for (i = 0; i < 500; i++) {
+       for (i = 0; i < 1000; i++) {
                u8 val = if_cs_read8(card, addr);
                if (val == reg)
                        return i;
-               udelay(100);
+               udelay(500);
        }
        return -ETIME;
 }
@@ -878,6 +878,9 @@ static int if_cs_probe(struct pcmcia_device *p_dev)
                goto out3;
        }
 
+       /* Clear any interrupt cause that happend while sending
+        * firmware/initializing card */
+       if_cs_write16(card, IF_CS_C_INT_CAUSE, IF_CS_C_IC_MASK);
        if_cs_enable_ints(card);
 
        /* And finally bring the card up */