Message ID | 20091209.013955.262196704.davem@davemloft.net |
---|---|
State | Accepted |
Delegated to: | David Miller |
Headers | show |
On Wednesday 09 December 2009, David Miller wrote: > Please give this patch a try: > > sparc64: Fix overly strict range type matching for PCI devices. This appears to work for me. Thanks! Pat
From: Patrick Finnegan <pat@computer-refuge.org> Date: Wed, 9 Dec 2009 14:29:56 -0500 > On Wednesday 09 December 2009, David Miller wrote: >> Please give this patch a try: >> >> sparc64: Fix overly strict range type matching for PCI devices. > > This appears to work for me. > > Thanks! Thanks for your report and testing the fix. -- To unsubscribe from this list: send the line "unsubscribe sparclinux" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
diff --git a/arch/sparc/kernel/of_device_64.c b/arch/sparc/kernel/of_device_64.c index 881947e..0a6f2d1 100644 --- a/arch/sparc/kernel/of_device_64.c +++ b/arch/sparc/kernel/of_device_64.c @@ -104,9 +104,19 @@ static int of_bus_pci_map(u32 *addr, const u32 *range, int i; /* Check address type match */ - if ((addr[0] ^ range[0]) & 0x03000000) - return -EINVAL; + if (!((addr[0] ^ range[0]) & 0x03000000)) + goto type_match; + + /* Special exception, we can map a 64-bit address into + * a 32-bit range. + */ + if ((addr[0] & 0x03000000) == 0x03000000 && + (range[0] & 0x03000000) == 0x02000000) + goto type_match; + + return -EINVAL; +type_match: if (of_out_of_range(addr + 1, range + 1, range + na + pna, na - 1, ns)) return -EINVAL;