Commit ae9b4e16 authored by Herbert Xu's avatar Herbert Xu Committed by Christoph Hellwig

[PATCH] Fix successive calls to spin_lock_irqsave in sk98lin

This patch fixes the few places in sk98lin where it calls
spin_lock_saveirq on the same flags variable thus causing
interrupts to be disabled upon leaving the driver.
parent 736ff88c
......@@ -2690,8 +2690,7 @@ SK_EVPARA EvPara;
SkEventDispatcher(pAC, pAC->IoBase);
for (i=0; i<pAC->GIni.GIMacsFound; i++) {
spin_lock_irqsave(
&pAC->TxPort[i][TX_PRIO_LOW].TxDesRingLock, Flags);
spin_lock(&pAC->TxPort[i][TX_PRIO_LOW].TxDesRingLock);
netif_stop_queue(pAC->dev[i]);
}
......@@ -4370,12 +4369,10 @@ SK_BOOL DualNet;
spin_lock_irqsave(
&pAC->TxPort[FromPort][TX_PRIO_LOW].TxDesRingLock,
Flags);
spin_lock_irqsave(
&pAC->TxPort[ToPort][TX_PRIO_LOW].TxDesRingLock, Flags);
spin_lock(&pAC->TxPort[ToPort][TX_PRIO_LOW].TxDesRingLock);
SkGeStopPort(pAC, IoC, FromPort, SK_STOP_ALL, SK_SOFT_RST);
SkGeStopPort(pAC, IoC, ToPort, SK_STOP_ALL, SK_SOFT_RST);
spin_unlock_irqrestore(
&pAC->TxPort[ToPort][TX_PRIO_LOW].TxDesRingLock, Flags);
spin_unlock(&pAC->TxPort[ToPort][TX_PRIO_LOW].TxDesRingLock);
spin_unlock_irqrestore(
&pAC->TxPort[FromPort][TX_PRIO_LOW].TxDesRingLock,
Flags);
......@@ -4388,8 +4385,7 @@ SK_BOOL DualNet;
spin_lock_irqsave(
&pAC->TxPort[FromPort][TX_PRIO_LOW].TxDesRingLock,
Flags);
spin_lock_irqsave(
&pAC->TxPort[ToPort][TX_PRIO_LOW].TxDesRingLock, Flags);
spin_lock(&pAC->TxPort[ToPort][TX_PRIO_LOW].TxDesRingLock);
pAC->ActivePort = ToPort;
#if 0
SetQueueSizes(pAC);
......@@ -4404,8 +4400,7 @@ SK_BOOL DualNet;
pAC,
pAC->ActivePort,
DualNet)) {
spin_unlock_irqrestore(
&pAC->TxPort[ToPort][TX_PRIO_LOW].TxDesRingLock, Flags);
spin_unlock(&pAC->TxPort[ToPort][TX_PRIO_LOW].TxDesRingLock);
spin_unlock_irqrestore(
&pAC->TxPort[FromPort][TX_PRIO_LOW].TxDesRingLock,
Flags);
......@@ -4431,8 +4426,7 @@ SK_BOOL DualNet;
SkGePollTxD(pAC, IoC, ToPort, SK_TRUE);
ClearAndStartRx(pAC, FromPort);
ClearAndStartRx(pAC, ToPort);
spin_unlock_irqrestore(
&pAC->TxPort[ToPort][TX_PRIO_LOW].TxDesRingLock, Flags);
spin_unlock(&pAC->TxPort[ToPort][TX_PRIO_LOW].TxDesRingLock);
spin_unlock_irqrestore(
&pAC->TxPort[FromPort][TX_PRIO_LOW].TxDesRingLock,
Flags);
......
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