Messages in this thread | | | Date | Sat, 1 Jun 2002 13:55:42 +0200 (CEST) | From | Urban Widmark <> | Subject | Re: [PATCH] fix VIA Rhine time outs (some) |
| |
On Sat, 1 Jun 2002, Roger Luethi wrote:
> reset via netdev timeout [1]. The patch addresses that by setting the Tx > ring buffer pointer to where the driver thinks the chip should continue.
You shouldn't use virt_to_bus().
On x86 it doesn't matter(?) but on other hw it does. See Documentation/DMA-mapping.txt.
The tx_ring array is allocated with pci_alloc_consistent and the addresses you are supposed to send to the hardware are the rx_ring_dma and tx_ring_dma. tx_ring and rx_ring are for the driver.
The initialisation of tx_ring_dma assumes the area allocted by pci_alloc_consistent is contiguous and that it is ok to use any address within that area (within any alignment constrinats of the hw). If that code is correct you could copy it and do:
int entry = np->dirty_tx % TX_RING_SIZE; writel(np->tx_ring_dma + entry * sizeof(struct tx_desc), dev->base_addr + TxRingPtr);
(Or something prettier ...)
/Urban
- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
| |