From fe38ebca56b3d7b4ad533821b5b008ab93570f5a Mon Sep 17 00:00:00 2001 From: John Baldwin 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