Commit 22ef997f authored by Jean Tourrilhes's avatar Jean Tourrilhes Committed by Jeff Garzik

Cleanups for the wavelan pcmcia wireless driver:

- Set dev->trans_start to avoid filling the logs
	(and generating useless abort commands)
- Avoid deadlocks in mmc_out()/mmc_in()
parent 9da6d375
...@@ -282,9 +282,11 @@ mmc_out(u_long base, ...@@ -282,9 +282,11 @@ mmc_out(u_long base,
u_short o, u_short o,
u_char d) u_char d)
{ {
int count = 0;
/* Wait for MMC to go idle */ /* 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((u_char)((o << 1) | MMR_MMI_WR), MMR(base));
outb(d, MMD(base)); outb(d, MMD(base));
...@@ -317,14 +319,16 @@ static inline u_char ...@@ -317,14 +319,16 @@ static inline u_char
mmc_in(u_long base, mmc_in(u_long base,
u_short o) 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(o << 1, MMR(base)); /* Set the read address */
outb(0, MMD(base)); /* Required dummy write */ 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 */ return (u_char) (inb(MMD(base))); /* Now do the actual read */
} }
...@@ -3582,6 +3586,9 @@ wv_packet_write(device * dev, ...@@ -3582,6 +3586,9 @@ wv_packet_write(device * dev,
wv_82593_cmd(dev, "wv_packet_write(): transmit", wv_82593_cmd(dev, "wv_packet_write(): transmit",
OP0_TRANSMIT, SR0_NO_RESULT); OP0_TRANSMIT, SR0_NO_RESULT);
/* Make sure the watchdog will keep quiet for a while */
dev->trans_start = jiffies;
/* Keep stats up to date */ /* Keep stats up to date */
lp->stats.tx_bytes += length; lp->stats.tx_bytes += length;
......
...@@ -400,6 +400,12 @@ ...@@ -400,6 +400,12 @@
* o got rid of wavelan_ioctl() * o got rid of wavelan_ioctl()
* o use a bunch of iw_handler instead * 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: * Wishes & dreams:
* ---------------- * ----------------
* - Cleanup and integrate the roaming code * - Cleanup and integrate the roaming code
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment