Skip to contentSkip to conversation

[PATCH 2.4.19-pre2]

PATCH In review Jean Tourrilhes 2 participants 3 messages Mar 6, 2002 Network drivers

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 [PATCH 2.4.19-pre2]

Hi Marcelo,

This patch fix a few critical bugs in the wavelan_cs driver as
included in the kernel. In fact, the driver in the kernel is not usable.
o Update to "new" network API (softnet - 2.3.43)
o Fix SMP operation
o Fix card lockup on fast processors
This patch is a backport of the wavelan_cs driver in kernel
2.5.3-pre3 (one month old), which is itself a backport of the version in Pcmcia package over one year old. I've just tested this patch with 2.4.19-pre2 SMP. I don't think it can be more tested than that ;-)
Would you mind adding that to your kernel ?

Regards,

Jean

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

drivers/net/pcmcia/wavelan.h renamed from drivers/net/pcmcia-buggy/wavelan.h +3 -0
diff -u -p -r linux/drivers/net/pcmcia-buggy/wavelan.h linux/drivers/net/pcmcia/wavelan.h
@@ -88,6 +88,7 @@ const short	channel_bands[] = { 0x30, 0x
  */
 const int	fixed_bands[] = { 915e6, 2.425e8, 2.46e8, 2.484e8, 2.4305e8 };
 
+
 /*************************** PC INTERFACE ****************************/
 
 /* WaveLAN host interface definitions */
@@ -316,6 +317,7 @@ struct mmw_t
 /* Calculate offset of a field in the above structure */
 #define	mmwoff(p,f) 	(unsigned short)((void *)(&((mmw_t *)((void *)0 + (p)))->f) - (void *)0)
 
+
 /*
  * Modem Management Controller (MMC) read structure.
  */
@@ -372,6 +374,7 @@ struct mmr_t
 
 /* Calculate offset of a field in the above structure */
 #define	mmroff(p,f) 	(unsigned short)((void *)(&((mmr_t *)((void *)0 + (p)))->f) - (void *)0)
+
 
 /* Make the two above structures one */
 typedef union mm_t
drivers/net/pcmcia/wavelan_cs.c renamed from drivers/net/pcmcia-buggy/wavelan_cs.c +367 -371

1,346 lines not on this page · raw message

drivers/net/pcmcia/wavelan_cs.h renamed from drivers/net/pcmcia-buggy/wavelan_cs.h +71 -24

201 lines not on this page · raw message

#1 lore raw

We don't need the silly spinlock wrappers in 2.4 either.....

Quoted 27 lines

+ * Wrapper for disabling interrupts.
+ * (note : inline, so optimised away)
+ */

drivers/net/pcmcia/wavelan_cs.c renamed from drivers/net/pcmcia-buggy/wavelan_cs.c +23 -0
+static inline void
+wv_splhi(net_local *           lp,
+        unsigned long *        pflags)
+{
+  spin_lock_irqsave(&lp->spinlock, *pflags);
+  /* Note : above does the cli(); itself */
+}
+
+/*------------------------------------------------------------------*/
+/*
+ * Wrapper for re-enabling interrupts.
+ */
+static inline void
+wv_splx(net_local *            lp,
+       unsigned long *         pflags)
+{
+  spin_unlock_irqrestore(&lp->spinlock, *pflags);
+
+  /* Note : enabling interrupts on the hardware is done in wv_ru_start()
+   * via : outb(OP1_INT_ENABLE, LCCR(base));
+   */
+}
+
Signature · 3 lines
Jeff Garzik      | Usenet Rule #2 (John Gilmore): "The Net interprets
Building 1024    | censorship as damage and routes around it."
MandrakeSoft     |
#2 lore raw
In reply to Jean Tourrilhes
Quoted 1 line · Jeff Garzik

We don't need the silly spinlock wrappers in 2.4 either.....

I don't have the patch to un-wrap the spinlock. I think you
have that in your archives. Just send that to Marcelo on top of my patch.
As usual, I don't really care about cosmetics ;-)

Jean