summaryrefslogtreecommitdiffstats
path: root/drivers/staging/vt6655/rxtx.c
diff options
context:
space:
mode:
authorMalcolm Priestley <tvboxspy@gmail.com>2014-12-21 12:56:34 +0000
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2015-01-12 19:49:47 -0800
commitb5745290af06a621aaddfd636bab4f08432d0492 (patch)
treecc99212cedea7b790504c2d9c9605082d5265fdf /drivers/staging/vt6655/rxtx.c
parent84c00afef41a2172b7290f3d75e082e6dd609a58 (diff)
downloadop-kernel-dev-b5745290af06a621aaddfd636bab4f08432d0492.zip
op-kernel-dev-b5745290af06a621aaddfd636bab4f08432d0492.tar.gz
staging: vt6655: vnt_tx_packet Fix corrupted tx packets.
Move PSTxDesc->m_td1TD1 to inside spin locks. if m_td1TD1.byTCR has TCR_EDP and TCR_STP are set, the interrupt handler will try and complete the buffer before it is completed. Usually on the tail of a burst of tx packets. This results in a partially completed packet being transmitted or worse sitll dead lock when skb is freed by the interrupt handler. Set head_td->m_td1TD1.byTCR to 0 in first lock of vnt_tx_packet to stop interrupt handler completing the buffer. Move Set TSR1 & ReqCount in s_cbFillTxBufHead to the second lock. cbReqCount is carried to the second lock in pTDInfo->dwReqCount without the padding removed. Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/staging/vt6655/rxtx.c')
-rw-r--r--drivers/staging/vt6655/rxtx.c5
1 files changed, 1 insertions, 4 deletions
diff --git a/drivers/staging/vt6655/rxtx.c b/drivers/staging/vt6655/rxtx.c
index 61c39dd..b5b0155 100644
--- a/drivers/staging/vt6655/rxtx.c
+++ b/drivers/staging/vt6655/rxtx.c
@@ -1204,13 +1204,10 @@ s_cbFillTxBufHead(struct vnt_private *pDevice, unsigned char byPktType,
ptdCurr = (PSTxDesc)pHeadTD;
- ptdCurr->pTDInfo->dwReqCount = cbReqCount - uPadding;
+ ptdCurr->pTDInfo->dwReqCount = cbReqCount;
ptdCurr->pTDInfo->dwHeaderLength = cbHeaderLength;
ptdCurr->pTDInfo->skb_dma = ptdCurr->pTDInfo->buf_dma;
ptdCurr->buff_addr = cpu_to_le32(ptdCurr->pTDInfo->skb_dma);
- /* Set TSR1 & ReqCount in TxDescHead */
- ptdCurr->m_td1TD1.byTCR |= (TCR_STP | TCR_EDP | EDMSDU);
- ptdCurr->m_td1TD1.wReqCount = cpu_to_le16((unsigned short)(cbReqCount));
return cbHeaderLength;
}
OpenPOWER on IntegriCloud