Commit 6842c6e1 authored by François Romieu's avatar François Romieu Committed by Jeff Garzik

[PATCH] r8169: always clean Tx desc

rtl8169_unmap_tx_skb() can not assume that a Tx ring descriptor belongs
to the host as it can be issued during rtl8169_tx_clear() as a part of
a recovery process (during Tx timeout for instance).

Simple fix: always clean the relevant descriptor entry.
Acked-by: default avatarFrancois Romieu <romieu@fr.zoreil.com>
Signed-off-by: default avatarJon Mason <jdmason@us.ibm.com>
parent d541de95
......@@ -1681,6 +1681,7 @@ static void rtl8169_unmap_tx_skb(struct pci_dev *pdev, struct ring_info *tx_skb,
unsigned int len = tx_skb->len;
pci_unmap_single(pdev, le64_to_cpu(desc->addr), len, PCI_DMA_TODEVICE);
desc->opts1 = 0x00;
desc->opts2 = 0x00;
desc->addr = 0x00;
tx_skb->len = 0;
......
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