x86: Calgary: fix disable busnum for CalIOC2
authorMuli Ben-Yehuda <muli@il.ibm.com>
Wed, 17 Oct 2007 16:04:35 +0000 (18:04 +0200)
committerThomas Gleixner <tglx@inhelltoy.tec.linutronix.de>
Wed, 17 Oct 2007 18:15:45 +0000 (20:15 +0200)
commitd588ba8c09aa2516a06512d8ba065a05f9620ee0
tree7a9f5f1435540e86577a26b6649a185ce0e3e6f5
parent84e0fdb1754d066dd0a8b257de7299f392d1e727
x86: Calgary: fix disable busnum for CalIOC2

The old check we used based on dev->bus->number is wrong for devices on
CalIOC2.  Instead look whether we have an IOMMU table for that bus - if
not, translation is disabled.

Thanks to Murillo Fernandes Bernardes <bernarde@br.ibm.com> for
spotting, suggesting a fix and testing.

Signed-off-by: Muli Ben-Yehuda <muli@il.ibm.com>
Acked-by: Murillo Fernandes Bernardes <bernarde@br.ibm.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
arch/x86/kernel/pci-calgary_64.c