From 590951621b899832636bf5937c6dd5025f2cdbf2 Mon Sep 17 00:00:00 2001 From: jhb Date: Fri, 24 Oct 2003 21:01:31 +0000 Subject: [PATCH] - Fail to probe if acpi0 probed ok as this driver basically tries to probe the ACPI timer and we shouldn't do that if ACPI is already around to do that for us. - Set a description and tweak the order of checks in the probe function to more closely match other PCI drivers. This should probably be moved to sys/dev/piix/piix.c at some point and turned on for all i386 kernels rather than just SMP ones. --- sys/i386/i386/mp_clock.c | 19 ++++++++++++------- 1 file changed, 12 insertions(+), 7 deletions(-) diff --git a/sys/i386/i386/mp_clock.c b/sys/i386/i386/mp_clock.c index 061b3fe32b47..1aca1a90f0d2 100644 --- a/sys/i386/i386/mp_clock.c +++ b/sys/i386/i386/mp_clock.c @@ -101,17 +101,22 @@ piix_probe(device_t dev) { u_int32_t d; + if (devclass_get_device(devclass_find("acpi"), 0) != NULL) + return (ENXIO); switch (pci_get_devid(dev)) { case 0x71138086: - d = pci_read_config(dev, PCIR_COMMAND, 2); - if (d & PCIM_CMD_PORTEN) - return (0); - printf("PIIX I/O space not mapped\n"); - return (ENXIO); + device_set_desc(dev, "PIIX Timecounter"); + break; default: return (ENXIO); - }; - return (ENXIO); + } + + d = pci_read_config(dev, PCIR_COMMAND, 2); + if (!(d & PCIM_CMD_PORTEN)) { + device_printf(dev, "PIIX I/O space not mapped\n"); + return (ENXIO); + } + return (0); } static int