diff options
author | Erling A. Jacobsen <linuxcub@email.dk> | 2006-04-30 15:46:56 -0400 |
---|---|---|
committer | Jeff Garzik <jeff@garzik.org> | 2006-05-20 00:20:29 -0400 |
commit | bb02aacc02c6002143a1cfc313d144a413eec8d0 (patch) | |
tree | 7577b35c7756a693bfb16fea5ea6d68f0c3197db /drivers/net/tulip | |
parent | f905703a93b7014a0fd95d0edac2b734bf0d1522 (diff) |
[PATCH] winbond-840-remove-badness-in-pci_map_single
Call pci_map_single() with the actual size of the receive
buffers, not 0 (which skb->len is initialized to by dev_alloc_skb()).
Signed-off-by: Erling A. Jacobsen <linuxcub@email.dk>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
Diffstat (limited to 'drivers/net/tulip')
-rw-r--r-- | drivers/net/tulip/winbond-840.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/net/tulip/winbond-840.c b/drivers/net/tulip/winbond-840.c index ba05dedf29d3..136a70c4d5e4 100644 --- a/drivers/net/tulip/winbond-840.c +++ b/drivers/net/tulip/winbond-840.c | |||
@@ -850,7 +850,7 @@ static void init_rxtx_rings(struct net_device *dev) | |||
850 | break; | 850 | break; |
851 | skb->dev = dev; /* Mark as being used by this device. */ | 851 | skb->dev = dev; /* Mark as being used by this device. */ |
852 | np->rx_addr[i] = pci_map_single(np->pci_dev,skb->data, | 852 | np->rx_addr[i] = pci_map_single(np->pci_dev,skb->data, |
853 | skb->len,PCI_DMA_FROMDEVICE); | 853 | np->rx_buf_sz,PCI_DMA_FROMDEVICE); |
854 | 854 | ||
855 | np->rx_ring[i].buffer1 = np->rx_addr[i]; | 855 | np->rx_ring[i].buffer1 = np->rx_addr[i]; |
856 | np->rx_ring[i].status = DescOwn; | 856 | np->rx_ring[i].status = DescOwn; |
@@ -1316,7 +1316,7 @@ static int netdev_rx(struct net_device *dev) | |||
1316 | skb->dev = dev; /* Mark as being used by this device. */ | 1316 | skb->dev = dev; /* Mark as being used by this device. */ |
1317 | np->rx_addr[entry] = pci_map_single(np->pci_dev, | 1317 | np->rx_addr[entry] = pci_map_single(np->pci_dev, |
1318 | skb->data, | 1318 | skb->data, |
1319 | skb->len, PCI_DMA_FROMDEVICE); | 1319 | np->rx_buf_sz, PCI_DMA_FROMDEVICE); |
1320 | np->rx_ring[entry].buffer1 = np->rx_addr[entry]; | 1320 | np->rx_ring[entry].buffer1 = np->rx_addr[entry]; |
1321 | } | 1321 | } |
1322 | wmb(); | 1322 | wmb(); |