: Wavelan Pcmcia update
PATCH 1/1 : Wavelan Pcmcia update
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----------------------------------------------------------
drivers/net/wireless/wavelan_cs.p.h renamed from drivers/net/wireless/wavelan_cs.p.25.h +6 -0
@@ -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
drivers/net/wireless/wavelan_cs.c renamed from drivers/net/wireless/wavelan_cs.25.c +13 -6
@@ -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;