Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F144634433
D33896.1775911655.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Flag For Later
Award Token
Size
1 KB
Referenced Files
None
Subscribers
None
D33896.1775911655.diff
View Options
Index: sys/x86/isa/atrtc.c
===================================================================
--- sys/x86/isa/atrtc.c
+++ sys/x86/isa/atrtc.c
@@ -85,6 +85,7 @@
#ifdef DEV_ACPI
#define _COMPONENT ACPI_TIMER
+static int acpi_rtc_is_present;
ACPI_MODULE_NAME("ATRTC")
#endif
@@ -203,6 +204,7 @@
struct resource *intr_res;
void *intr_handler;
struct eventtimer et;
+ int is_active;
#ifdef DEV_ACPI
ACPI_HANDLE acpi_handle;
#endif
@@ -293,7 +295,7 @@
if (addr >= ATRTC_LAST_REG || addr + len > ATRTC_LAST_REG)
return (false);
- if (is_read) {
+ if (is_read || !(acpi_rtc_is_present)) {
/* Reading 0x0C will muck with interrupts */
if (addr <= RTC_INTR && addr + len > RTC_INTR)
return (false);
@@ -487,6 +489,8 @@
sc->et.et_priv = dev;
et_register(&sc->et);
}
+ sc->is_active = 1;
+
return(0);
}
@@ -502,11 +506,14 @@
atrtc_acpi_attach(device_t dev)
{
int ret;
-
- ret = atrtc_attach(dev);
- if (ret)
- return (ret);
-
+ acpi_rtc_is_present = acpi_DeviceIsPresent(dev);
+ if (acpi_rtc_is_present){
+ ret = atrtc_attach(dev);
+ if (ret)
+ return (ret);
+ }else{
+ device_printf(dev, "disabled in acpi handle. Only address space handler\n");
+ }
(void)atrtc_reg_acpi_cmos_handler(dev);
return (0);
@@ -524,8 +531,9 @@
static int
atrtc_resume(device_t dev)
{
-
- atrtc_restore();
+ struct atrtc_softc *sc = device_get_softc(dev);
+ if(sc->is_active)
+ atrtc_restore();
return(0);
}
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Sat, Apr 11, 12:47 PM (18 h, 14 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
28325092
Default Alt Text
D33896.1775911655.diff (1 KB)
Attached To
Mode
D33896: atrtc.c: handle _STA object indcate it is not functional.
Attached
Detach File
Event Timeline
Log In to Comment