tlan: Fix pci memory unmapping
Fix pci unmapping problem introduced by commit id
8953f12827
"tlan: Fix small (< 64 bytes)
datagram transmissions".
Signed-off-by: Sakari Ailus <sakari.ailus@iki.fi>
Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
committed by
David S. Miller
parent
2c413a6434
commit
bb5f133dbc
@@ -1433,7 +1433,9 @@ static u32 TLan_HandleTxEOF( struct net_device *dev, u16 host_int )
|
|||||||
if ( ! bbuf ) {
|
if ( ! bbuf ) {
|
||||||
struct sk_buff *skb = TLan_GetSKB(head_list);
|
struct sk_buff *skb = TLan_GetSKB(head_list);
|
||||||
pci_unmap_single(priv->pciDev, head_list->buffer[0].address,
|
pci_unmap_single(priv->pciDev, head_list->buffer[0].address,
|
||||||
skb->len, PCI_DMA_TODEVICE);
|
max(skb->len,
|
||||||
|
(unsigned int)TLAN_MIN_FRAME_SIZE),
|
||||||
|
PCI_DMA_TODEVICE);
|
||||||
dev_kfree_skb_any(skb);
|
dev_kfree_skb_any(skb);
|
||||||
head_list->buffer[8].address = 0;
|
head_list->buffer[8].address = 0;
|
||||||
head_list->buffer[9].address = 0;
|
head_list->buffer[9].address = 0;
|
||||||
@@ -2057,9 +2059,12 @@ static void TLan_FreeLists( struct net_device *dev )
|
|||||||
list = priv->txList + i;
|
list = priv->txList + i;
|
||||||
skb = TLan_GetSKB(list);
|
skb = TLan_GetSKB(list);
|
||||||
if ( skb ) {
|
if ( skb ) {
|
||||||
pci_unmap_single(priv->pciDev,
|
pci_unmap_single(
|
||||||
list->buffer[0].address, skb->len,
|
priv->pciDev,
|
||||||
PCI_DMA_TODEVICE);
|
list->buffer[0].address,
|
||||||
|
max(skb->len,
|
||||||
|
(unsigned int)TLAN_MIN_FRAME_SIZE),
|
||||||
|
PCI_DMA_TODEVICE);
|
||||||
dev_kfree_skb_any( skb );
|
dev_kfree_skb_any( skb );
|
||||||
list->buffer[8].address = 0;
|
list->buffer[8].address = 0;
|
||||||
list->buffer[9].address = 0;
|
list->buffer[9].address = 0;
|
||||||
|
Reference in New Issue
Block a user