patch-2.4.0-test3 linux/arch/alpha/kernel/pci.c
Next file: linux/arch/alpha/kernel/process.c
Previous file: linux/arch/alpha/kernel/osf_sys.c
Back to the patch index
Back to the overall index
- Lines: 23
- Date:
Mon Jun 26 11:26:56 2000
- Orig file:
v2.4.0-test2/linux/arch/alpha/kernel/pci.c
- Orig date:
Fri Jun 23 21:55:07 2000
diff -u --recursive --new-file v2.4.0-test2/linux/arch/alpha/kernel/pci.c linux/arch/alpha/kernel/pci.c
@@ -369,6 +369,22 @@
return 0;
}
+/*
+ * If we set up a device for bus mastering, we need to check the latency
+ * timer as certain firmware forgets to set it properly, as seen
+ * on SX164 and LX164 with SRM.
+ */
+void
+pcibios_set_master(struct pci_dev *dev)
+{
+ u8 lat;
+ pci_read_config_byte(dev, PCI_LATENCY_TIMER, &lat);
+ if (lat >= 16) return;
+ printk("PCI: Setting latency timer of device %s to 64\n",
+ dev->slot_name);
+ pci_write_config_byte(dev, PCI_LATENCY_TIMER, 64);
+}
+
#define ROUND_UP(x, a) (((x) + (a) - 1) & ~((a) - 1))
static void __init
FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen (who was at: slshen@lbl.gov)