From 445bb802adb5b1a55a0e65639f8c26d312fd0a13 Mon Sep 17 00:00:00 2001 From: Samuel Thibault Date: Wed, 6 Feb 2008 11:31:38 +0000 Subject: * linux/src/drivers/block/triton.c (ide_init_triton): Enable Bus Mastering if not enabled by BIOS. --- linux/src/drivers/block/triton.c | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) (limited to 'linux/src/drivers') diff --git a/linux/src/drivers/block/triton.c b/linux/src/drivers/block/triton.c index 739b1b9..0017069 100644 --- a/linux/src/drivers/block/triton.c +++ b/linux/src/drivers/block/triton.c @@ -409,7 +409,17 @@ void ide_init_triton (byte bus, byte fn) goto quit; } if ((pcicmd & 4) == 0) { - printk("ide: BM-DMA feature is not enabled (BIOS)\n"); + printk("ide: BM-DMA feature is not enabled (BIOS), enabling\n"); + pcicmd |= 4; + pcibios_write_config_word(bus, fn, 0x04, pcicmd); + if ((rc = pcibios_read_config_word(bus, fn, 0x04, &pcicmd))) { + printk("ide: Couldn't read back PCI command\n"); + goto quit; + } + } + + if ((pcicmd & 4) == 0) { + printk("ide: BM-DMA feature couldn't be enabled\n"); } else { /* * Get the bmiba base address -- cgit v1.2.3