[PATCH][2.5] cli/sti cleanup for fmvj18x

From: Zwane Mwaikambo (zwane@linuxpower.ca)
Date: Sat May 31 2003 - 22:44:48 EST


This one should be safe as we're protected by the xmit_lock in all instances

Zwane

Index: linux-2.5.70-mm3/drivers/net/pcmcia/fmvj18x_cs.c
===================================================================
RCS file: /build/cvsroot/linux-2.5.70/drivers/net/pcmcia/fmvj18x_cs.c,v
retrieving revision 1.1.1.1
diff -u -p -B -r1.1.1.1 fmvj18x_cs.c
--- linux-2.5.70-mm3/drivers/net/pcmcia/fmvj18x_cs.c 27 May 2003 02:19:20 -0000 1.1.1.1
+++ linux-2.5.70-mm3/drivers/net/pcmcia/fmvj18x_cs.c 31 May 2003 10:50:47 -0000
@@ -923,8 +923,7 @@ static void fjn_tx_timeout(struct net_de
htons(inw(ioaddr +14)));
lp->stats.tx_errors++;
/* ToDo: We should try to restart the adaptor... */
- cli();
-
+ local_irq_disable();
fjn_reset(dev);

lp->tx_started = 0;
@@ -932,7 +931,7 @@ static void fjn_tx_timeout(struct net_de
lp->tx_queue_len = 0;
lp->sent = 0;
lp->open_time = jiffies;
- sti();
+ local_irq_enable();
netif_wake_queue(dev);
}

@@ -1361,9 +1360,8 @@ static void set_rx_mode(struct net_devic
mc_filter[bit >> 3] |= (1 << bit);
}
}
-
- save_flags(flags);
- cli();
+
+ local_irq_save(flags);
if (memcmp(mc_filter, lp->mc_filter, sizeof(mc_filter))) {
int saved_bank = inb(ioaddr + CONFIG_1);
/* Switch to bank 1 and set the multicast table. */
@@ -1373,5 +1371,5 @@ static void set_rx_mode(struct net_devic
memcpy(lp->mc_filter, mc_filter, sizeof(mc_filter));
outb(saved_bank, ioaddr + CONFIG_1);
}
- restore_flags(flags);
+ local_irq_restore(flags);
}
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/