03_i386_and_x86_64_add-broken-dac-check-to-x86_64.patch
check for broken_dac in x86-64 dma_supported() routine. This
disables 64-bit DMA for devices hanging off broken bridges.
Signed-off-by: Tejun Heo <[email protected]>
arch/x86_64/kernel/pci-gart.c | 5 +++++
arch/x86_64/kernel/pci-nommu.c | 7 +++++++
include/asm-x86_64/proto.h | 3 +++
3 files changed, 15 insertions(+)
Index: linux-work/arch/x86_64/kernel/pci-gart.c
===================================================================
--- linux-work.orig/arch/x86_64/kernel/pci-gart.c 2005-09-28 21:41:46.000000000 +0900
+++ linux-work/arch/x86_64/kernel/pci-gart.c 2005-09-28 21:41:46.000000000 +0900
@@ -645,6 +645,11 @@ int dma_supported(struct device *dev, u6
return 0;
}
+ /* Check if there is any bridge with broken DAC support
+ between the device and memory. Declared in asm/proto.h */
+ if (mask > 0xffffffff && dma_broken_dac(dev))
+ return 0;
+
return 1;
}
Index: linux-work/arch/x86_64/kernel/pci-nommu.c
===================================================================
--- linux-work.orig/arch/x86_64/kernel/pci-nommu.c 2005-09-28 21:41:46.000000000 +0900
+++ linux-work/arch/x86_64/kernel/pci-nommu.c 2005-09-28 21:41:46.000000000 +0900
@@ -71,6 +71,13 @@ int dma_supported(struct device *hwdev,
if (mask < 0x00ffffff)
return 0;
+ /*
+ * Check if there is any bridge with broken DAC support
+ * between the device and memory. Declared in asm/proto.h
+ */
+ if (mask > 0xffffffff && dma_broken_dac(hwdev))
+ return 0;
+
return 1;
}
EXPORT_SYMBOL(dma_supported);
Index: linux-work/include/asm-x86_64/proto.h
===================================================================
--- linux-work.orig/include/asm-x86_64/proto.h 2005-09-28 21:41:46.000000000 +0900
+++ linux-work/include/asm-x86_64/proto.h 2005-09-28 21:41:46.000000000 +0900
@@ -116,6 +116,9 @@ extern void smp_local_timer_interrupt(st
long do_arch_prctl(struct task_struct *task, int code, unsigned long addr);
+struct device;
+extern int dma_broken_dac(struct device *dev); /* arch/i386/kernel/quirks.c */
+
#define round_up(x,y) (((x) + (y) - 1) & ~((y)-1))
#define round_down(x,y) ((x) & ~((y)-1))
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
[Index of Archives]
[Kernel Newbies]
[Netfilter]
[Bugtraq]
[Photo]
[Gimp]
[Yosemite News]
[MIPS Linux]
[ARM Linux]
[Linux Security]
[Linux RAID]
[Video 4 Linux]
[Linux for the blind]
|
|