File tree Expand file tree Collapse file tree 2 files changed +12
-1
lines changed Expand file tree Collapse file tree 2 files changed +12
-1
lines changed Original file line number Diff line number Diff line change @@ -112,6 +112,17 @@ int acpi_bus_get_status(struct acpi_device *device)
112
112
if (ACPI_FAILURE (status ))
113
113
return - ENODEV ;
114
114
115
+ if (!device -> status .present && device -> status .enabled ) {
116
+ pr_info (FW_BUG "Device [%s] status [%08x]: not present and enabled\n" ,
117
+ device -> pnp .bus_id , (u32 )sta );
118
+ device -> status .enabled = 0 ;
119
+ /*
120
+ * The status is clearly invalid, so clear the functional bit as
121
+ * well to avoid attempting to use the device.
122
+ */
123
+ device -> status .functional = 0 ;
124
+ }
125
+
115
126
acpi_set_device_status (device , sta );
116
127
117
128
if (device -> status .functional && !device -> status .present ) {
Original file line number Diff line number Diff line change @@ -1962,7 +1962,7 @@ bool acpi_device_is_present(const struct acpi_device *adev)
1962
1962
1963
1963
bool acpi_device_is_enabled (const struct acpi_device * adev )
1964
1964
{
1965
- return adev -> status .present && adev -> status . enabled ;
1965
+ return adev -> status .enabled ;
1966
1966
}
1967
1967
1968
1968
static bool acpi_scan_handler_matching (struct acpi_scan_handler * handler ,
You can’t perform that action at this time.
0 commit comments