mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH 2.5] : Wavelan Pcmcia update
@ 2002-09-04 23:28 Jean Tourrilhes
  0 siblings, 0 replies; only message in thread
From: Jean Tourrilhes @ 2002-09-04 23:28 UTC (permalink / raw)
  To: Jeff Garzik, Linux kernel mailing list

        Hi Jeff,

        Could you please push the following patch upstream ?
        A few cleanups for the good old Wavelan Pcmcia driver. Tested
on 2.5.32 SMP.

        Have fun...

        Jean

----------------------------------------------------------

diff -u -p linux/drivers/net/wireless/wavelan_cs.p.25.h linux/drivers/net/wireless/wavelan_cs.p.h
--- linux/drivers/net/wireless/wavelan_cs.p.25.h	Tue Sep  3 14:40:15 2002
+++ linux/drivers/net/wireless/wavelan_cs.p.h	Wed Sep  4 15:28:34 2002
@@ -400,6 +400,12 @@
  *		o got rid of wavelan_ioctl()
  *		o use a bunch of iw_handler instead
  *
+ * Changes made for release in 3.2.1 :
+ * ---------------------------------
+ *	- Set dev->trans_start to avoid filling the logs
+ *		(and generating useless abort commands)
+ *	- Avoid deadlocks in mmc_out()/mmc_in()
+ *
  * Wishes & dreams:
  * ----------------
  *	- Cleanup and integrate the roaming code
diff -u -p linux/drivers/net/wireless/wavelan_cs.25.c linux/drivers/net/wireless/wavelan_cs.c
--- linux/drivers/net/wireless/wavelan_cs.25.c	Tue Sep  3 14:40:05 2002
+++ linux/drivers/net/wireless/wavelan_cs.c	Wed Sep  4 15:26:11 2002
@@ -282,9 +282,11 @@ mmc_out(u_long		base,
 	u_short		o,
 	u_char		d)
 {
+  int count = 0;
+
   /* Wait for MMC to go idle */
-  while(inb(HASR(base)) & HASR_MMI_BUSY)
-    ;
+  while((count++ < 100) && (inb(HASR(base)) & HASR_MMI_BUSY))
+    udelay(10);
 
   outb((u_char)((o << 1) | MMR_MMI_WR), MMR(base));
   outb(d, MMD(base));
@@ -317,14 +319,16 @@ static inline u_char
 mmc_in(u_long	base,
        u_short	o)
 {
-  while(inb(HASR(base)) & HASR_MMI_BUSY)
-    ;
+  int count = 0;
+
+  while((count++ < 100) && (inb(HASR(base)) & HASR_MMI_BUSY))
+    udelay(10);
   outb(o << 1, MMR(base));		/* Set the read address */
 
   outb(0, MMD(base));			/* Required dummy write */
 
-  while(inb(HASR(base)) & HASR_MMI_BUSY)
-    ;
+  while((count++ < 100) && (inb(HASR(base)) & HASR_MMI_BUSY))
+    udelay(10);
   return (u_char) (inb(MMD(base)));	/* Now do the actual read */
 }
 
@@ -3581,6 +3585,9 @@ wv_packet_write(device *	dev,
   /* Send the transmit command */
   wv_82593_cmd(dev, "wv_packet_write(): transmit",
 	       OP0_TRANSMIT, SR0_NO_RESULT);
+
+  /* Make sure the watchdog will keep quiet for a while */
+  dev->trans_start = jiffies;
 
   /* Keep stats up to date */
   lp->stats.tx_bytes += length;

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2002-09-04 23:24 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2002-09-04 23:28 [PATCH 2.5] : Wavelan Pcmcia update Jean Tourrilhes

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®