From 8f2ea1fd3f97ab7a809e939b5b9005a16f862439 Mon Sep 17 00:00:00 2001 From: Benjamin Herrenschmidt Date: Tue, 7 Aug 2007 08:05:10 +1000 Subject: [POWERPC] Fix initialization and usage of dma_mask powerpc has a couple of bugs in the usage of dma_masks that tend to break when drivers explicitly try to set a 32-bit mask for example. First, the code that generates the pci devices from the OF device-tree doesn't initialize the mask properly, then our implementation of set_dma_mask() was trying to validate the -previous- mask value, not the one passed in as an argument. This fixes these problems. Signed-off-by: Benjamin Herrenschmidt Signed-off-by: Paul Mackerras --- arch/powerpc/kernel/pci_64.c | 1 + 1 file changed, 1 insertion(+) (limited to 'arch/powerpc') diff --git a/arch/powerpc/kernel/pci_64.c b/arch/powerpc/kernel/pci_64.c index a97e23ac197..291ffbc360c 100644 --- a/arch/powerpc/kernel/pci_64.c +++ b/arch/powerpc/kernel/pci_64.c @@ -313,6 +313,7 @@ struct pci_dev *of_create_pci_dev(struct device_node *node, dev->current_state = 4; /* unknown power state */ dev->error_state = pci_channel_io_normal; + dev->dma_mask = 0xffffffff; if (!strcmp(type, "pci") || !strcmp(type, "pciex")) { /* a PCI-PCI bridge */ -- cgit v1.2.3