[parisc-linux] tulip DMA mapping
Grant Grundler
grundler@cup.hp.com
Thu, 9 Nov 2000 12:12:25 -0800 (PST)
Hi all,
I see a "bug" in tulip's usage of mapping services.
It's not the bug I was looking for unfortunately.
In line 217 of drivers/net/tulip/interrupt.c:
if (tp->tx_buffers[entry].mapping)
pci_unmap_single(tp->pdev,
tp->tx_buffers[entry].mapping,
sizeof(tp->setup_frame),
PCI_DMA_TODEVICE);
0 is a valid pci_map_single() return value when the system has an IO MMU.
The system will panic before pci_map_single() will fail.
The driver needs to remember some other way if a buffer was mapped or not.
Or the Documentation/DMA-mapping.txt should be changed - ie add this
to the interface definition and I can reserve the 1st mapping
entry so no-one uses it.
Should I be mailing Jeff Garzik <jgarzik@mandrakesoft.com> directly?
Or can someone who knows Jeff point this out to him?
thanks,
grant