Hi,
forcedeth called pci_map_single() with size==0 in the rx codepath. This
might explain the crashes on x86-64.
The attached patch fixes that. Who saw data corruptions? Are they fixed
by the attached patch?
--
Manfred
--- 2.6/drivers/net/forcedeth.c 2005-12-19 01:36:54.000000000 +0100
+++ x64/drivers/net/forcedeth.c 2005-12-22 21:31:41.000000000 +0100
@@ -871,8 +871,8 @@
} else {
skb = np->rx_skbuff[nr];
}
- np->rx_dma[nr] = pci_map_single(np->pci_dev, skb->data,
skb->len,
- PCI_DMA_FROMDEVICE);
+ np->rx_dma[nr] = pci_map_single(np->pci_dev, skb->data,
+ skb->end-skb->data, PCI_DMA_FROMDEVICE);
if (np->desc_ver == DESC_VER_1 || np->desc_ver == DESC_VER_2) {
np->rx_ring.orig[nr].PacketBuffer =
cpu_to_le32(np->rx_dma[nr]);
wmb();
@@ -999,7 +999,7 @@
wmb();
if (np->rx_skbuff[i]) {
pci_unmap_single(np->pci_dev, np->rx_dma[i],
- np->rx_skbuff[i]->len,
+
np->rx_skbuff[i]->end-np->rx_skbuff[i]->data,
PCI_DMA_FROMDEVICE);
dev_kfree_skb(np->rx_skbuff[i]);
np->rx_skbuff[i] = NULL;
@@ -1334,7 +1334,7 @@
* the performance.
*/
pci_unmap_single(np->pci_dev, np->rx_dma[i],
- np->rx_skbuff[i]->len,
+ np->rx_skbuff[i]->end-np->rx_skbuff[i]->data,
PCI_DMA_FROMDEVICE);
{