On Wed, 21 May 2003 18:45:53 +0100, Rask Ingemann Lambertsen wrote > All of the above assumed that you use PIO transfers. With a DMA > device, you'll need to manage the pointers yourself on the receive > side when dealing with the chunks. Something like: > > skb = dev_alloc_skb (4K + alignment); > skb_reserve (skb, alignment); > dma_pointer = pci_map_single (pdev, skb->head, 4K, PCI_DMA_FROMDEVICE); > /* await completion of DMA */ > skb_put (skb, length_of_whole_packet); > pci_unmap_single (pdev, dma_pointer, skb->head, 4K, PCI_DMA_FROMDEVICE); Second try, hopefully correct this time: skb = dev_alloc_skb (4K + alignment); skb_reserve (skb, alignment); dma_pointer = pci_map_single (pdev, skb->tail, 4K, PCI_DMA_FROMDEVICE); /* await completion of DMA */ pci_unmap_single (pdev, dma_pointer, 4K, PCI_DMA_FROMDEVICE); skb_put (skb, length_of_whole_packet); (Note: skb->tail instead of skb->head!) -- Regards, Rask Ingemann Lambertsen - : send the line "unsubscribe linux-net" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html