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