powerpc/dma: pci_set_dma_mask() shouldn't fail if mask fits in RAM
authorBenjamin Herrenschmidt <benh@kernel.crashing.org>
Mon, 10 Aug 2009 06:36:38 +0000 (16:36 +1000)
committerBenjamin Herrenschmidt <benh@kernel.crashing.org>
Mon, 10 Aug 2009 06:36:38 +0000 (16:36 +1000)
commitb2f2e8fee3d62f621e795f25b2fc0f51bbdb4af9
treeb32c0e3c4143781e81fffcdc02cdd38a1a5279d9
parentf4b9a988685da6386d7f9a72df3098bcc3270526
powerpc/dma: pci_set_dma_mask() shouldn't fail if mask fits in RAM

On an iMac G5, the b43 driver is failing to initialise because trying to
set the dma mask to 30-bit fails. Even though there's only 512MiB of RAM
in the machine anyway:
https://bugzilla.redhat.com/show_bug.cgi?id=514787

We should probably let it succeed if the available RAM in the system
doesn't exceed the requested limit.

Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
arch/powerpc/kernel/dma.c