diff options
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/net/tlan.c | 13 |
1 files changed, 9 insertions, 4 deletions
diff --git a/drivers/net/tlan.c b/drivers/net/tlan.c index cf8cdafda5af..e60498232b94 100644 --- a/drivers/net/tlan.c +++ b/drivers/net/tlan.c | |||
@@ -1433,7 +1433,9 @@ static u32 TLan_HandleTxEOF( struct net_device *dev, u16 host_int ) | |||
1433 | if ( ! bbuf ) { | 1433 | if ( ! bbuf ) { |
1434 | struct sk_buff *skb = TLan_GetSKB(head_list); | 1434 | struct sk_buff *skb = TLan_GetSKB(head_list); |
1435 | pci_unmap_single(priv->pciDev, head_list->buffer[0].address, | 1435 | pci_unmap_single(priv->pciDev, head_list->buffer[0].address, |
1436 | skb->len, PCI_DMA_TODEVICE); | 1436 | max(skb->len, |
1437 | (unsigned int)TLAN_MIN_FRAME_SIZE), | ||
1438 | PCI_DMA_TODEVICE); | ||
1437 | dev_kfree_skb_any(skb); | 1439 | dev_kfree_skb_any(skb); |
1438 | head_list->buffer[8].address = 0; | 1440 | head_list->buffer[8].address = 0; |
1439 | head_list->buffer[9].address = 0; | 1441 | head_list->buffer[9].address = 0; |
@@ -2057,9 +2059,12 @@ static void TLan_FreeLists( struct net_device *dev ) | |||
2057 | list = priv->txList + i; | 2059 | list = priv->txList + i; |
2058 | skb = TLan_GetSKB(list); | 2060 | skb = TLan_GetSKB(list); |
2059 | if ( skb ) { | 2061 | if ( skb ) { |
2060 | pci_unmap_single(priv->pciDev, | 2062 | pci_unmap_single( |
2061 | list->buffer[0].address, skb->len, | 2063 | priv->pciDev, |
2062 | PCI_DMA_TODEVICE); | 2064 | list->buffer[0].address, |
2065 | max(skb->len, | ||
2066 | (unsigned int)TLAN_MIN_FRAME_SIZE), | ||
2067 | PCI_DMA_TODEVICE); | ||
2063 | dev_kfree_skb_any( skb ); | 2068 | dev_kfree_skb_any( skb ); |
2064 | list->buffer[8].address = 0; | 2069 | list->buffer[8].address = 0; |
2065 | list->buffer[9].address = 0; | 2070 | list->buffer[9].address = 0; |