12
12
#include <linux/acpi.h>
13
13
#include <linux/pci.h>
14
14
#include <linux/usb/hcd.h>
15
+ #include <linux/dmi.h>
15
16
16
17
#include "hub.h"
17
18
@@ -146,6 +147,20 @@ int usb_acpi_set_power_state(struct usb_device *hdev, int index, bool enable)
146
147
}
147
148
EXPORT_SYMBOL_GPL (usb_acpi_set_power_state );
148
149
150
+ static const struct dmi_system_id intel_icl_broken_acpi [] = {
151
+ {
152
+ .ident = "ICL RVP" ,
153
+ .matches = {
154
+ DMI_MATCH (DMI_SYS_VENDOR , "Intel Corporation" ),
155
+ DMI_MATCH (DMI_PRODUCT_NAME , "Ice Lake Client Platform" ),
156
+ },
157
+ },
158
+
159
+ { }
160
+ };
161
+
162
+ static bool acpi_connection_type_broken ;
163
+
149
164
static enum usb_port_connect_type usb_acpi_get_connect_type (acpi_handle handle ,
150
165
struct acpi_pld_info * pld )
151
166
{
@@ -154,6 +169,10 @@ static enum usb_port_connect_type usb_acpi_get_connect_type(acpi_handle handle,
154
169
union acpi_object * upc = NULL ;
155
170
acpi_status status ;
156
171
172
+ /* Work around unknown ACPI instruction error on ICL RVP BIOSes. */
173
+ if (acpi_connection_type_broken )
174
+ return USB_PORT_CONNECT_TYPE_UNKNOWN ;
175
+
157
176
/*
158
177
* According to 9.14 in ACPI Spec 6.2. _PLD indicates whether usb port
159
178
* is user visible and _UPC indicates whether it is connectable. If
@@ -325,6 +344,11 @@ static struct acpi_bus_type usb_acpi_bus = {
325
344
326
345
int usb_acpi_register (void )
327
346
{
347
+ if (dmi_check_system (intel_icl_broken_acpi )) {
348
+ pr_info ("USB ACPI connection type broken.\n" );
349
+ acpi_connection_type_broken = true;
350
+ }
351
+
328
352
return register_acpi_bus_type (& usb_acpi_bus );
329
353
}
330
354
0 commit comments