mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Jean Tourrilhes <jt@bougret.hpl.hp.com>
To: Jeff Garzik <jgarzik@mandrakesoft.com>,
	Linux kernel mailing list <linux-kernel@vger.kernel.org>
Subject: [PATCH 2.5] : Wavelan Pcmcia update
Date: Wed, 4 Sep 2002 16:28:40 -0700	[thread overview]
Message-ID: <20020904232840.GD21592@bougret.hpl.hp.com> (raw)

        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;

                 reply	other threads:[~2002-09-04 23:24 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20020904232840.GD21592@bougret.hpl.hp.com \
    --to=jt@bougret.hpl.hp.com \
    --cc=jgarzik@mandrakesoft.com \
    --cc=jt@hpl.hp.com \
    --cc=linux-kernel@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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®