Messages in this thread Patch in this message |  | | Date | Wed, 4 Sep 2002 16:28:40 -0700 | Subject | [PATCH 2.5] : Wavelan Pcmcia update | From | Jean Tourrilhes <> |
| |
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; - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
|  |