Commit 2ca5f2f3 authored by Tom Rini's avatar Tom Rini Committed by Linus Torvalds

[PATCH] ppc32: remove cli()/sti() in arch/ppc/8xx_io/fec.c

Replace save_flags()/resore_flags() with
spin_lock_irqsave()/spin_unlock_irqrestore() and document reasons for locking.
Signed-off-by: default avatarJames Nelson <james4765@gmail.com>
Signed-off-by: default avatarTom Rini <trini@kernel.crashing.org>
Signed-off-by: default avatarAndrew Morton <akpm@osdl.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@osdl.org>
parent c2ac130c
......@@ -389,6 +389,7 @@ fec_enet_start_xmit(struct sk_buff *skb, struct net_device *dev)
flush_dcache_range((unsigned long)skb->data,
(unsigned long)skb->data + skb->len);
/* disable interrupts while triggering transmit */
spin_lock_irq(&fep->lock);
/* Send it on its way. Tell FEC its ready, interrupt when done,
......@@ -539,6 +540,7 @@ fec_enet_tx(struct net_device *dev)
struct sk_buff *skb;
fep = dev->priv;
/* lock while transmitting */
spin_lock(&fep->lock);
bdp = fep->dirty_tx;
......@@ -799,6 +801,7 @@ fec_enet_mii(struct net_device *dev)
if ((mip = mii_head) != NULL) {
ep->fec_mii_data = mip->mii_regval;
}
}
......@@ -817,8 +820,8 @@ mii_queue(struct net_device *dev, int regval, void (*func)(uint, struct net_devi
retval = 0;
save_flags(flags);
cli();
/* lock while modifying mii_list */
spin_lock_irqsave(&fep->lock, flags);
if ((mip = mii_free) != NULL) {
mii_free = mip->mii_next;
......@@ -836,7 +839,7 @@ mii_queue(struct net_device *dev, int regval, void (*func)(uint, struct net_devi
retval = 1;
}
restore_flags(flags);
spin_unlock_irqrestore(&fep->lock, flags);
return(retval);
}
......
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