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; ...@@ -2690,8 +2690,7 @@ SK_EVPARA EvPara;
SkEventDispatcher(pAC, pAC->IoBase); SkEventDispatcher(pAC, pAC->IoBase);
for (i=0; i<pAC->GIni.GIMacsFound; i++) { for (i=0; i<pAC->GIni.GIMacsFound; i++) {
spin_lock_irqsave( spin_lock(&pAC->TxPort[i][TX_PRIO_LOW].TxDesRingLock);
&pAC->TxPort[i][TX_PRIO_LOW].TxDesRingLock, Flags);
netif_stop_queue(pAC->dev[i]); netif_stop_queue(pAC->dev[i]);
} }
...@@ -4370,12 +4369,10 @@ SK_BOOL DualNet; ...@@ -4370,12 +4369,10 @@ SK_BOOL DualNet;
spin_lock_irqsave( spin_lock_irqsave(
&pAC->TxPort[FromPort][TX_PRIO_LOW].TxDesRingLock, &pAC->TxPort[FromPort][TX_PRIO_LOW].TxDesRingLock,
Flags); Flags);
spin_lock_irqsave( spin_lock(&pAC->TxPort[ToPort][TX_PRIO_LOW].TxDesRingLock);
&pAC->TxPort[ToPort][TX_PRIO_LOW].TxDesRingLock, Flags);
SkGeStopPort(pAC, IoC, FromPort, SK_STOP_ALL, SK_SOFT_RST); SkGeStopPort(pAC, IoC, FromPort, SK_STOP_ALL, SK_SOFT_RST);
SkGeStopPort(pAC, IoC, ToPort, SK_STOP_ALL, SK_SOFT_RST); SkGeStopPort(pAC, IoC, ToPort, SK_STOP_ALL, SK_SOFT_RST);
spin_unlock_irqrestore( spin_unlock(&pAC->TxPort[ToPort][TX_PRIO_LOW].TxDesRingLock);
&pAC->TxPort[ToPort][TX_PRIO_LOW].TxDesRingLock, Flags);
spin_unlock_irqrestore( spin_unlock_irqrestore(
&pAC->TxPort[FromPort][TX_PRIO_LOW].TxDesRingLock, &pAC->TxPort[FromPort][TX_PRIO_LOW].TxDesRingLock,
Flags); Flags);
...@@ -4388,8 +4385,7 @@ SK_BOOL DualNet; ...@@ -4388,8 +4385,7 @@ SK_BOOL DualNet;
spin_lock_irqsave( spin_lock_irqsave(
&pAC->TxPort[FromPort][TX_PRIO_LOW].TxDesRingLock, &pAC->TxPort[FromPort][TX_PRIO_LOW].TxDesRingLock,
Flags); Flags);
spin_lock_irqsave( spin_lock(&pAC->TxPort[ToPort][TX_PRIO_LOW].TxDesRingLock);
&pAC->TxPort[ToPort][TX_PRIO_LOW].TxDesRingLock, Flags);
pAC->ActivePort = ToPort; pAC->ActivePort = ToPort;
#if 0 #if 0
SetQueueSizes(pAC); SetQueueSizes(pAC);
...@@ -4404,8 +4400,7 @@ SK_BOOL DualNet; ...@@ -4404,8 +4400,7 @@ SK_BOOL DualNet;
pAC, pAC,
pAC->ActivePort, pAC->ActivePort,
DualNet)) { DualNet)) {
spin_unlock_irqrestore( spin_unlock(&pAC->TxPort[ToPort][TX_PRIO_LOW].TxDesRingLock);
&pAC->TxPort[ToPort][TX_PRIO_LOW].TxDesRingLock, Flags);
spin_unlock_irqrestore( spin_unlock_irqrestore(
&pAC->TxPort[FromPort][TX_PRIO_LOW].TxDesRingLock, &pAC->TxPort[FromPort][TX_PRIO_LOW].TxDesRingLock,
Flags); Flags);
...@@ -4431,8 +4426,7 @@ SK_BOOL DualNet; ...@@ -4431,8 +4426,7 @@ SK_BOOL DualNet;
SkGePollTxD(pAC, IoC, ToPort, SK_TRUE); SkGePollTxD(pAC, IoC, ToPort, SK_TRUE);
ClearAndStartRx(pAC, FromPort); ClearAndStartRx(pAC, FromPort);
ClearAndStartRx(pAC, ToPort); ClearAndStartRx(pAC, ToPort);
spin_unlock_irqrestore( spin_unlock(&pAC->TxPort[ToPort][TX_PRIO_LOW].TxDesRingLock);
&pAC->TxPort[ToPort][TX_PRIO_LOW].TxDesRingLock, Flags);
spin_unlock_irqrestore( spin_unlock_irqrestore(
&pAC->TxPort[FromPort][TX_PRIO_LOW].TxDesRingLock, &pAC->TxPort[FromPort][TX_PRIO_LOW].TxDesRingLock,
Flags); 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