netdev
[Top] [All Lists]

[PATCH] (1/10) sk98: rlmt send locking

To: Jeff Garzik <jgarzik@xxxxxxxxx>
Subject: [PATCH] (1/10) sk98: rlmt send locking
From: Stephen Hemminger <shemminger@xxxxxxxx>
Date: Thu, 18 Nov 2004 14:39:25 -0800
Cc: netdev@xxxxxxxxxxx, Mirko Lindner <demon@xxxxxxxxxxxx>
Organization: Open Source Development Lab
Sender: netdev-bounce@xxxxxxxxxxx
Earlier patch changed the locking of normal transmit frame path,
but missed the special case of the management interface.

Signed-off-by: Stephen Hemminger <shemminger@xxxxxxxx>

diff -Nru a/drivers/net/sk98lin/skge.c b/drivers/net/sk98lin/skge.c
--- a/drivers/net/sk98lin/skge.c        2004-11-17 09:22:37 -08:00
+++ b/drivers/net/sk98lin/skge.c        2004-11-17 09:22:37 -08:00
@@ -4233,12 +4233,18 @@
                SK_DBG_MSG(NULL, SK_DBGMOD_DRV, SK_DBGCAT_DRV_EVENT,
                        ("RLS "));
                pRlmtMbuf = (SK_MBUF*) Param.pParaPtr;
+               FromPort = pRlmtMbuf->PortIdx;
                pMsg = (struct sk_buff*) pRlmtMbuf->pOs;
                skb_put(pMsg, pRlmtMbuf->Length);
-               if (XmitFrame(pAC, 
&pAC->TxPort[pRlmtMbuf->PortIdx][TX_PRIO_LOW],
-                       pMsg) < 0)
 
+               
spin_lock_irqsave(&pAC->TxPort[FromPort][TX_PRIO_LOW].TxDesRingLock,
+                       Flags);
+               if (XmitFrame(pAC, &pAC->TxPort[FromPort][TX_PRIO_LOW],
+                             pMsg) < 0)
                        dev_kfree_skb_any(pMsg);
+               
spin_unlock_irqrestore(&pAC->TxPort[FromPort][TX_PRIO_LOW].TxDesRingLock,
+                       Flags);
+
                break;
        case SK_DRV_TIMER:
                if (Param.Para32[0] == SK_DRV_MODERATION_TIMER) {

<Prev in Thread] Current Thread [Next in Thread>
  • [PATCH] (1/10) sk98: rlmt send locking, Stephen Hemminger <=