Commit ccaaf4f1 authored by Angelo Dell\'Aera's avatar Angelo Dell\'Aera Committed by Jeff Garzik

[PATCH] sk_mca

parent 4c4efea8
...@@ -254,8 +254,7 @@ static void SetLANCE(struct SKMCA_NETDEV *dev, u16 addr, u16 value) ...@@ -254,8 +254,7 @@ static void SetLANCE(struct SKMCA_NETDEV *dev, u16 addr, u16 value)
/* disable interrupts */ /* disable interrupts */
save_flags(flags); spin_lock_irqsave(&priv->lock, flags);
cli();
/* wait until no transfer is pending */ /* wait until no transfer is pending */
...@@ -281,7 +280,7 @@ static void SetLANCE(struct SKMCA_NETDEV *dev, u16 addr, u16 value) ...@@ -281,7 +280,7 @@ static void SetLANCE(struct SKMCA_NETDEV *dev, u16 addr, u16 value)
/* reenable interrupts */ /* reenable interrupts */
restore_flags(flags); spin_lock_irqrestore(&priv->lock, flags);
} }
/* get LANCE register */ /* get LANCE register */
...@@ -294,8 +293,7 @@ static u16 GetLANCE(struct SKMCA_NETDEV *dev, u16 addr) ...@@ -294,8 +293,7 @@ static u16 GetLANCE(struct SKMCA_NETDEV *dev, u16 addr)
/* disable interrupts */ /* disable interrupts */
save_flags(flags); spin_lock_irqsave(&priv->lock, flags);
cli();
/* wait until no transfer is pending */ /* wait until no transfer is pending */
...@@ -321,7 +319,7 @@ static u16 GetLANCE(struct SKMCA_NETDEV *dev, u16 addr) ...@@ -321,7 +319,7 @@ static u16 GetLANCE(struct SKMCA_NETDEV *dev, u16 addr)
/* reenable interrupts */ /* reenable interrupts */
restore_flags(flags); spin_lock_irqrestore(&priv->lock, flags);
return res; return res;
} }
...@@ -968,8 +966,9 @@ static int skmca_tx(struct sk_buff *skb, struct SKMCA_NETDEV *dev) ...@@ -968,8 +966,9 @@ static int skmca_tx(struct sk_buff *skb, struct SKMCA_NETDEV *dev)
#endif #endif
/* one more descriptor busy */ /* one more descriptor busy */
save_flags(flags);
cli(); spin_lock_irqsave(&priv->lock, flags);
priv->nexttxput++; priv->nexttxput++;
if (priv->nexttxput >= TXCOUNT) if (priv->nexttxput >= TXCOUNT)
priv->nexttxput = 0; priv->nexttxput = 0;
...@@ -994,7 +993,7 @@ static int skmca_tx(struct sk_buff *skb, struct SKMCA_NETDEV *dev) ...@@ -994,7 +993,7 @@ static int skmca_tx(struct sk_buff *skb, struct SKMCA_NETDEV *dev)
if (priv->txbusy == 0) if (priv->txbusy == 0)
SetLANCE(dev, LANCE_CSR0, CSR0_INEA | CSR0_TDMD); SetLANCE(dev, LANCE_CSR0, CSR0_INEA | CSR0_TDMD);
restore_flags(flags); spin_lock_irqrestore(&priv->lock, flags);
tx_done: tx_done:
......
...@@ -53,6 +53,7 @@ typedef struct { ...@@ -53,6 +53,7 @@ typedef struct {
int realirq; /* memorizes actual IRQ, even when int realirq; /* memorizes actual IRQ, even when
currently not allocated */ currently not allocated */
skmca_medium medium; /* physical cannector */ skmca_medium medium; /* physical cannector */
spinlock_t lock;
} skmca_priv; } skmca_priv;
/* card registers: control/status register bits */ /* card registers: control/status register bits */
......
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