summaryrefslogtreecommitdiffstats
path: root/sys/pci
diff options
context:
space:
mode:
authorn_hibma <n_hibma@FreeBSD.org>2000-02-06 14:52:27 +0000
committern_hibma <n_hibma@FreeBSD.org>2000-02-06 14:52:27 +0000
commitadad9ac78e8ab4fd3b329a4753c97503bea836ea (patch)
tree7ea7d0e5ceb42edab2302cf23a883d900fd2c5f2 /sys/pci
parent0a7605926e1c24427909634304ab3509b3d3f3f1 (diff)
downloadFreeBSD-src-adad9ac78e8ab4fd3b329a4753c97503bea836ea.zip
FreeBSD-src-adad9ac78e8ab4fd3b329a4753c97503bea836ea.tar.gz
Disable the generation of SMIs (System Management Interrupts). Always set
the PIRQD bit. This fixes the problem of uhub0 hanging forever during boot when USB keyboard support is switched on in the BIOS on motherboards with Intel chipsets (UHCI). Approved by: The Sheep
Diffstat (limited to 'sys/pci')
-rw-r--r--sys/pci/uhci_pci.c20
1 files changed, 10 insertions, 10 deletions
diff --git a/sys/pci/uhci_pci.c b/sys/pci/uhci_pci.c
index 0fbade0..0a3959b 100644
--- a/sys/pci/uhci_pci.c
+++ b/sys/pci/uhci_pci.c
@@ -158,7 +158,6 @@ uhci_pci_attach(device_t self)
void *ih;
struct resource *io_res, *irq_res;
int intr;
- int legsup;
int err;
rid = PCI_UHCI_BASE_REG;
@@ -239,16 +238,17 @@ uhci_pci_attach(device_t self)
goto bad3;
}
- /* Verify that the PIRQD enable bit is set, some BIOS's don't do that */
- legsup = pci_read_config(self, PCI_LEGSUP, 4);
- if ( !(legsup & PCI_LEGSUP_USBPIRQDEN) ) {
-#ifndef USB_DEBUG
- if (bootverbose)
+ /* Set the PIRQD enable bit and switch off all the others. We don't
+ * want legacy support to interfere with us
+ * XXX Does this also mean that the BIOS won't touch the keyboard
+ * anymore if it is connected to the ports of the root hub?
+ */
+#ifdef UHCI_DEBUG
+ if (pci_read_config(self, PCI_LEGSUP, 4) != PCI_LEGSUP_USBPIRQDEN)
+ device_printf(self, "LegSup = 0x%08x\n",
+ pci_read_config(self, PCI_LEGSUP, 4));
#endif
- device_printf(self, "PIRQD enable not set\n");
- legsup |= PCI_LEGSUP_USBPIRQDEN;
- pci_write_config(self, PCI_LEGSUP, legsup, 4);
- }
+ pci_write_config(self, PCI_LEGSUP, PCI_LEGSUP_USBPIRQDEN, 4);
err = uhci_init(sc);
if (!err)
OpenPOWER on IntegriCloud