PFBR_DESC_t pFbrEntry;
uint32_t iEntry;
RXDMA_PSR_NUM_DES_t psr_num_des;
- unsigned long lockflags;
+ unsigned long flags;
DBG_ENTER(et131x_dbginfo);
writel((psr_num_des.bits.psr_ndes * LO_MARK_PERCENT_FOR_PSR) / 100,
&pRxDma->psr_min_des.value);
- spin_lock_irqsave(&etdev->RcvLock, lockflags);
+ spin_lock_irqsave(&etdev->RcvLock, flags);
/* These local variables track the PSR in the adapter structure */
pRxLocal->local_psr_full.bits.psr_full = 0;
*/
writel(etdev->RegistryRxTimeInterval, &pRxDma->max_pkt_time.value);
- spin_unlock_irqrestore(&etdev->RcvLock, lockflags);
+ spin_unlock_irqrestore(&etdev->RcvLock, flags);
DBG_LEAVE(et131x_dbginfo);
}
PMP_RFD pMpRfd;
uint32_t nIndex;
uint8_t *pBufVa;
- unsigned long lockflags;
+ unsigned long flags;
struct list_head *element;
uint8_t ringIndex;
uint16_t bufferIndex;
}
/* Get and fill the RFD. */
- spin_lock_irqsave(&etdev->RcvLock, lockflags);
+ spin_lock_irqsave(&etdev->RcvLock, flags);
pMpRfd = NULL;
element = pRxLocal->RecvList.next;
DBG_RX(et131x_dbginfo,
"NULL RFD returned from RecvList via list_entry()\n");
DBG_RX_LEAVE(et131x_dbginfo);
- spin_unlock_irqrestore(&etdev->RcvLock, lockflags);
+ spin_unlock_irqrestore(&etdev->RcvLock, flags);
return NULL;
}
list_del(&pMpRfd->list_node);
pRxLocal->nReadyRecv--;
- spin_unlock_irqrestore(&etdev->RcvLock, lockflags);
+ spin_unlock_irqrestore(&etdev->RcvLock, flags);
pMpRfd->iBufferIndex = bufferIndex;
pMpRfd->iRingIndex = ringIndex;
* Besides, we don't really need (at this point) the
* pending list anyway.
*/
- /* spin_lock_irqsave( &etdev->RcvPendLock, lockflags );
+ /* spin_lock_irqsave( &etdev->RcvPendLock, flags );
* list_add_tail( &pMpRfd->list_node, &etdev->RxRing.RecvPendingList );
- * spin_unlock_irqrestore( &etdev->RcvPendLock, lockflags );
+ * spin_unlock_irqrestore( &etdev->RcvPendLock, flags );
*/
/* Update the number of outstanding Recvs */
struct _RXDMA_t __iomem *pRxDma = &etdev->CSRAddress->rxdma;
uint16_t bi = pMpRfd->iBufferIndex;
uint8_t ri = pMpRfd->iRingIndex;
- unsigned long lockflags;
+ unsigned long flags;
DBG_RX_ENTER(et131x_dbginfo);
(ri == 0 && bi < pRxLocal->Fbr0NumEntries) ||
#endif
(ri == 1 && bi < pRxLocal->Fbr1NumEntries)) {
- spin_lock_irqsave(&etdev->FbrLock, lockflags);
+ spin_lock_irqsave(&etdev->FbrLock, flags);
if (ri == 1) {
PFBR_DESC_t pNextDesc =
&pRxDma->fbr0_full_offset.value);
}
#endif
- spin_unlock_irqrestore(&etdev->FbrLock, lockflags);
+ spin_unlock_irqrestore(&etdev->FbrLock, flags);
} else {
DBG_ERROR(et131x_dbginfo,
"NICReturnRFD illegal Buffer Index returned\n");
/* The processing on this RFD is done, so put it back on the tail of
* our list
*/
- spin_lock_irqsave(&etdev->RcvLock, lockflags);
+ spin_lock_irqsave(&etdev->RcvLock, flags);
list_add_tail(&pMpRfd->list_node, &pRxLocal->RecvList);
pRxLocal->nReadyRecv++;
- spin_unlock_irqrestore(&etdev->RcvLock, lockflags);
+ spin_unlock_irqrestore(&etdev->RcvLock, flags);
DBG_ASSERT(pRxLocal->nReadyRecv <= pRxLocal->NumRfd);
DBG_RX_LEAVE(et131x_dbginfo);
int status = 0;
PMP_TCB pMpTcb = NULL;
uint16_t *pShBufVa;
- unsigned long lockflags;
+ unsigned long flags;
DBG_TX_ENTER(et131x_dbginfo);
}
/* Get a TCB for this packet */
- spin_lock_irqsave(&etdev->TCBReadyQLock, lockflags);
+ spin_lock_irqsave(&etdev->TCBReadyQLock, flags);
pMpTcb = etdev->TxRing.TCBReadyQueueHead;
if (pMpTcb == NULL) {
- spin_unlock_irqrestore(&etdev->TCBReadyQLock, lockflags);
+ spin_unlock_irqrestore(&etdev->TCBReadyQLock, flags);
DBG_WARNING(et131x_dbginfo, "Can't obtain a TCB\n");
DBG_TX_LEAVE(et131x_dbginfo);
if (etdev->TxRing.TCBReadyQueueHead == NULL)
etdev->TxRing.TCBReadyQueueTail = NULL;
- spin_unlock_irqrestore(&etdev->TCBReadyQLock, lockflags);
+ spin_unlock_irqrestore(&etdev->TCBReadyQLock, flags);
pMpTcb->PacketLength = skb->len;
pMpTcb->Packet = skb;
status = nic_send_packet(etdev, pMpTcb);
if (status != 0) {
- spin_lock_irqsave(&etdev->TCBReadyQLock, lockflags);
+ spin_lock_irqsave(&etdev->TCBReadyQLock, flags);
if (etdev->TxRing.TCBReadyQueueTail) {
etdev->TxRing.TCBReadyQueueTail->Next = pMpTcb;
etdev->TxRing.TCBReadyQueueTail = pMpTcb;
- spin_unlock_irqrestore(&etdev->TCBReadyQLock, lockflags);
+ spin_unlock_irqrestore(&etdev->TCBReadyQLock, flags);
DBG_TX_LEAVE(et131x_dbginfo);
return status;
struct sk_buff *pPacket = pMpTcb->Packet;
uint32_t FragListCount = skb_shinfo(pPacket)->nr_frags + 1;
struct skb_frag_struct *pFragList = &skb_shinfo(pPacket)->frags[0];
- unsigned long lockflags1, lockflags2;
+ unsigned long flags;
DBG_TX_ENTER(et131x_dbginfo);
pMpTcb->WrIndexStart = etdev->TxRing.txDmaReadyToSend;
pMpTcb->PacketStaleCount = 0;
- spin_lock_irqsave(&etdev->SendHWLock, lockflags1);
+ spin_lock_irqsave(&etdev->SendHWLock, flags);
iThisCopy =
NUM_DESC_PER_RING_TX - etdev->TxRing.txDmaReadyToSend.bits.val;
pMpTcb->WrIndex.value =
etdev->TxRing.txDmaReadyToSend.value - 1;
- spin_lock_irqsave(&etdev->TCBSendQLock, lockflags2);
+ spin_lock(&etdev->TCBSendQLock);
if (etdev->TxRing.CurrSendTail)
etdev->TxRing.CurrSendTail->Next = pMpTcb;
etdev->TxRing.nBusySend++;
- spin_unlock_irqrestore(&etdev->TCBSendQLock, lockflags2);
+ spin_unlock(&etdev->TCBSendQLock);
/* Write the new write pointer back to the device. */
writel(etdev->TxRing.txDmaReadyToSend.value,
&etdev->CSRAddress->global.watchdog_timer);
}
- spin_unlock_irqrestore(&etdev->SendHWLock, lockflags1);
+ spin_unlock_irqrestore(&etdev->SendHWLock, flags);
DBG_TX_LEAVE(et131x_dbginfo);
return 0;
TX_DESC_ENTRY_t *CurDescPostCopy = NULL;
uint32_t SlotsAvailable;
DMA10W_t ServiceComplete;
- unsigned int lockflags1, lockflags2;
+ unsigned int flags;
struct sk_buff *pPacket = pMpTcb->Packet;
uint32_t FragListCount = skb_shinfo(pPacket)->nr_frags + 1;
struct skb_frag_struct *pFragList = &skb_shinfo(pPacket)->frags[0];
SegmentSize = (pPacket->len - pPacket->data_len) / 2;
}
- spin_lock_irqsave(&etdev->SendHWLock, lockflags1);
+ spin_lock_irqsave(&etdev->SendHWLock, flags);
if (etdev->TxRing.txDmaReadyToSend.bits.serv_req_wrap ==
ServiceComplete.bits.serv_cpl_wrap) {
if ((FragListCount + iSplitFirstElement) > SlotsAvailable) {
DBG_WARNING(et131x_dbginfo,
"Not Enough Space in Tx Desc Ring\n");
- spin_unlock_irqrestore(&etdev->SendHWLock, lockflags1);
+ spin_unlock_irqrestore(&etdev->SendHWLock, flags);
return -ENOMEM;
}
NIC_MIN_PACKET_SIZE - pMpTcb->PacketLength);
}
- spin_lock_irqsave(&etdev->TCBSendQLock, lockflags2);
+ spin_lock(&etdev->TCBSendQLock);
if (etdev->TxRing.CurrSendTail)
etdev->TxRing.CurrSendTail->Next = pMpTcb;
etdev->TxRing.nBusySend++;
- spin_unlock_irqrestore(&etdev->TCBSendQLock, lockflags2);
+ spin_unlock(&etdev->TCBSendQLock);
/* Write the new write pointer back to the device. */
writel(etdev->TxRing.txDmaReadyToSend.value,
&etdev->CSRAddress->global.watchdog_timer);
}
- spin_unlock_irqrestore(&etdev->SendHWLock, lockflags1);
+ spin_unlock_irqrestore(&etdev->SendHWLock, flags);
DBG_TX_LEAVE(et131x_dbginfo);
return 0;
inline void et131x_free_send_packet(struct et131x_adapter *etdev,
PMP_TCB pMpTcb)
{
- unsigned long lockflags;
+ unsigned long flags;
TX_DESC_ENTRY_t *desc = NULL;
struct net_device_stats *stats = &etdev->net_stats;
memset(pMpTcb, 0, sizeof(MP_TCB));
/* Add the TCB to the Ready Q */
- spin_lock_irqsave(&etdev->TCBReadyQLock, lockflags);
+ spin_lock_irqsave(&etdev->TCBReadyQLock, flags);
etdev->Stats.opackets++;
etdev->TxRing.TCBReadyQueueTail = pMpTcb;
- spin_unlock_irqrestore(&etdev->TCBReadyQLock, lockflags);
+ spin_unlock_irqrestore(&etdev->TCBReadyQLock, flags);
DBG_ASSERT(etdev->TxRing.nBusySend >= 0);
}
{
PMP_TCB pMpTcb;
struct list_head *pEntry;
- unsigned long lockflags;
+ unsigned long flags;
uint32_t FreeCounter = 0;
DBG_ENTER(et131x_dbginfo);
while (!list_empty(&etdev->TxRing.SendWaitQueue)) {
- spin_lock_irqsave(&etdev->SendWaitLock, lockflags);
+ spin_lock_irqsave(&etdev->SendWaitLock, flags);
etdev->TxRing.nWaitSend--;
- spin_unlock_irqrestore(&etdev->SendWaitLock, lockflags);
+ spin_unlock_irqrestore(&etdev->SendWaitLock, flags);
pEntry = etdev->TxRing.SendWaitQueue.next;
}
etdev->TxRing.nWaitSend = 0;
/* Any packets being sent? Check the first TCB on the send list */
- spin_lock_irqsave(&etdev->TCBSendQLock, lockflags);
+ spin_lock_irqsave(&etdev->TCBSendQLock, flags);
pMpTcb = etdev->TxRing.CurrSendHead;
etdev->TxRing.nBusySend--;
- spin_unlock_irqrestore(&etdev->TCBSendQLock, lockflags);
+ spin_unlock_irqrestore(&etdev->TCBSendQLock, flags);
DBG_VERBOSE(et131x_dbginfo, "pMpTcb = 0x%p\n", pMpTcb);
FreeCounter++;
MP_FREE_SEND_PACKET_FUN(etdev, pMpTcb);
- spin_lock_irqsave(&etdev->TCBSendQLock, lockflags);
+ spin_lock_irqsave(&etdev->TCBSendQLock, flags);
pMpTcb = etdev->TxRing.CurrSendHead;
}
BUG();
}
- spin_unlock_irqrestore(&etdev->TCBSendQLock, lockflags);
+ spin_unlock_irqrestore(&etdev->TCBSendQLock, flags);
etdev->TxRing.nBusySend = 0;
*/
static void et131x_update_tcb_list(struct et131x_adapter *etdev)
{
- unsigned long lockflags;
+ unsigned long flags;
DMA10W_t ServiceComplete;
PMP_TCB pMpTcb;
/* Has the ring wrapped? Process any descriptors that do not have
* the same "wrap" indicator as the current completion indicator
*/
- spin_lock_irqsave(&etdev->TCBSendQLock, lockflags);
+ spin_lock_irqsave(&etdev->TCBSendQLock, flags);
pMpTcb = etdev->TxRing.CurrSendHead;
while (pMpTcb &&
if (pMpTcb->Next == NULL)
etdev->TxRing.CurrSendTail = NULL;
- spin_unlock_irqrestore(&etdev->TCBSendQLock, lockflags);
+ spin_unlock_irqrestore(&etdev->TCBSendQLock, flags);
MP_FREE_SEND_PACKET_FUN(etdev, pMpTcb);
- spin_lock_irqsave(&etdev->TCBSendQLock, lockflags);
+ spin_lock_irqsave(&etdev->TCBSendQLock, flags);
/* Goto the next packet */
pMpTcb = etdev->TxRing.CurrSendHead;
if (pMpTcb->Next == NULL)
etdev->TxRing.CurrSendTail = NULL;
- spin_unlock_irqrestore(&etdev->TCBSendQLock, lockflags);
+ spin_unlock_irqrestore(&etdev->TCBSendQLock, flags);
MP_FREE_SEND_PACKET_FUN(etdev, pMpTcb);
- spin_lock_irqsave(&etdev->TCBSendQLock, lockflags);
+ spin_lock_irqsave(&etdev->TCBSendQLock, flags);
/* Goto the next packet */
pMpTcb = etdev->TxRing.CurrSendHead;
if (etdev->TxRing.nBusySend <= (NUM_TCB / 3))
netif_wake_queue(etdev->netdev);
- spin_unlock_irqrestore(&etdev->TCBSendQLock, lockflags);
+ spin_unlock_irqrestore(&etdev->TCBSendQLock, flags);
}
/**
*/
static void et131x_check_send_wait_list(struct et131x_adapter *etdev)
{
- unsigned long lockflags;
+ unsigned long flags;
- spin_lock_irqsave(&etdev->SendWaitLock, lockflags);
+ spin_lock_irqsave(&etdev->SendWaitLock, flags);
while (!list_empty(&etdev->TxRing.SendWaitQueue) &&
MP_TCB_RESOURCES_AVAILABLE(etdev)) {
etdev->TxRing.nWaitSend);
}
- spin_unlock_irqrestore(&etdev->SendWaitLock, lockflags);
+ spin_unlock_irqrestore(&etdev->SendWaitLock, flags);
}