[PATCH] (1/10) sk98: rlmt send locking
From: Stephen Hemminger <hidden>
Date: 2004-11-18 22:39:25
Earlier patch changed the locking of normal transmit frame path, but missed the special case of the management interface. Signed-off-by: Stephen Hemminger <redacted> 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) {