pci_map_single return value

Anton Blanchard anton at samba.org
Thu Dec 18 09:53:28 EST 2003


Hi,

> Why is it that pci_map_single returns NO_TCE on failure on PPC64 and 0
> on failure on IA64? Which one is correct? If NO_TCE is correct, then why
> is it defined in a ppc64 include? This makes it difficult for device
> drivers to actually check for it.

I brought this up with the architecture maintainers and the concensus
seems to be having a per arch pci_dma_error() function, like x86-64 does:

extern dma_addr_t bad_dma_address;
#define pci_dma_error(x) ((x) == bad_dma_address)

We also need a consistent error return value from pci_map_sg().

Anton

** Sent via the linuxppc64-dev mail list. See http://lists.linuxppc.org/





More information about the Linuxppc64-dev mailing list