summaryrefslogtreecommitdiffstats
path: root/arch/i386/kernel/pci-i386.c
diff options
context:
space:
mode:
Diffstat (limited to 'arch/i386/kernel/pci-i386.c')
-rw-r--r--arch/i386/kernel/pci-i386.c14
1 files changed, 14 insertions, 0 deletions
diff --git a/arch/i386/kernel/pci-i386.c b/arch/i386/kernel/pci-i386.c
index 6dd0a4306..942de9c79 100644
--- a/arch/i386/kernel/pci-i386.c
+++ b/arch/i386/kernel/pci-i386.c
@@ -323,3 +323,17 @@ int pcibios_enable_resources(struct pci_dev *dev)
}
return 0;
}
+
+/*
+ * If we set up a device for bus mastering, we need to check the latency
+ * timer as certain crappy BIOSes forget to set it properly.
+ */
+void pcibios_set_master(struct pci_dev *dev)
+{
+ u8 lat;
+ pci_read_config_byte(dev, PCI_LATENCY_TIMER, &lat);
+ if (lat < 16) {
+ printk("PCI: Increasing latency timer of device %s to 64\n", dev->slot_name);
+ pci_write_config_byte(dev, PCI_LATENCY_TIMER, 64);
+ }
+}