diff options
author | mav <mav@FreeBSD.org> | 2010-07-01 18:59:05 +0000 |
---|---|---|
committer | mav <mav@FreeBSD.org> | 2010-07-01 18:59:05 +0000 |
commit | 234db8607d0c787920735055e39ebc8ded6b35b0 (patch) | |
tree | edae0f3208adfe586c9169e7755e352b73660727 /sys/x86/isa | |
parent | 0966180de4c4670f353a2a204c5c0df3a45b3805 (diff) | |
download | FreeBSD-src-234db8607d0c787920735055e39ebc8ded6b35b0.zip FreeBSD-src-234db8607d0c787920735055e39ebc8ded6b35b0.tar.gz |
Allow attimer to be hinted at ISA if not reported by ISA PNP or ACPI.
Rephrase respective atrtc code same way to be more readable.
Diffstat (limited to 'sys/x86/isa')
-rw-r--r-- | sys/x86/isa/atrtc.c | 12 | ||||
-rw-r--r-- | sys/x86/isa/clock.c | 7 |
2 files changed, 12 insertions, 7 deletions
diff --git a/sys/x86/isa/atrtc.c b/sys/x86/isa/atrtc.c index c4cc9f5..9e28379 100644 --- a/sys/x86/isa/atrtc.c +++ b/sys/x86/isa/atrtc.c @@ -231,13 +231,13 @@ atrtc_probe(device_t dev) { int result; - device_set_desc(dev, "AT Real Time Clock"); result = ISA_PNP_PROBE(device_get_parent(dev), dev, atrtc_ids); - /* ENXIO if wrong PnP-ID, ENOENT ifno PnP-ID, zero if good PnP-iD */ - if (result != ENOENT) - return(result); - /* All PC's have an RTC, and we're hosed without it, so... */ - return (BUS_PROBE_LOW_PRIORITY); + /* ENOENT means no PnP-ID, device is hinted. */ + if (result == ENOENT) { + device_set_desc(dev, "AT realtime clock"); + return (BUS_PROBE_LOW_PRIORITY); + } + return (result); } static int diff --git a/sys/x86/isa/clock.c b/sys/x86/isa/clock.c index a3211f8..bf50812 100644 --- a/sys/x86/isa/clock.c +++ b/sys/x86/isa/clock.c @@ -511,7 +511,12 @@ attimer_probe(device_t dev) int result; result = ISA_PNP_PROBE(device_get_parent(dev), dev, attimer_ids); - return(result); + /* ENOENT means no PnP-ID, device is hinted. */ + if (result == ENOENT) { + device_set_desc(dev, "AT timer"); + return (BUS_PROBE_LOW_PRIORITY); + } + return (result); } static int |