linux-wireless.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] libertas: fixes for slow hardware
@ 2007-10-08  9:18 Holger Schurig
  2007-10-08 13:15 ` Dan Williams
  0 siblings, 1 reply; 6+ messages in thread
From: Holger Schurig @ 2007-10-08  9:18 UTC (permalink / raw)
  To: linux-wireless, libertas-dev, Dan Williams

This fixes issues where either the CF module is slow (and needs 
more time while downloading the firmware) or where the host 
computer is slow, so that some card interrupts arrive while
the system was still downloading the firmware.

Signed-off-by: Vitaly V. Bursov <vitalyvb@ukr.net>
Signed-off-by: Holger Schurig <hs4233@mail.mn-solutions.de>

-- 

Index: libertas-2.6/drivers/net/wireless/libertas/if_cs.c
===================================================================
--- libertas-2.6.orig/drivers/net/wireless/libertas/if_cs.c	
2007-10-01 14:05:53.000000000 +0200
+++ libertas-2.6/drivers/net/wireless/libertas/if_cs.c	2007-10-01 
14:06:43.000000000 +0200
@@ -148,11 +148,11 @@ static int if_cs_poll_while_fw_download(
 {
 	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;
 }
@@ -405,6 +405,7 @@ static struct sk_buff *if_cs_receive_dat
 	skb = dev_alloc_skb(MRVDRV_ETH_RX_PACKET_BUFFER_SIZE + 2);
 	if (!skb)
 		goto out;
+	skb->dev = priv->dev;
 	skb_put(skb, len);
 	skb_reserve(skb, 2);/* 16 byte align */
 	data = skb->data;
@@ -878,6 +879,9 @@ static int if_cs_probe(struct pcmcia_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 */

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2007-10-10  7:24 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-10-08  9:18 [PATCH] libertas: fixes for slow hardware Holger Schurig
2007-10-08 13:15 ` Dan Williams
2007-10-09  8:41   ` [PATCH, take 2] " Holger Schurig
2007-10-09 11:18     ` Dan Williams
2007-10-09 21:18     ` John W. Linville
2007-10-10  7:24       ` Holger Schurig

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).