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
@@ -142,6 +143,20 @@ int usb_acpi_set_power_state(struct usb_device *hdev, int index, bool enable)
142
143
}
143
144
EXPORT_SYMBOL_GPL (usb_acpi_set_power_state );
144
145
146
+ static const struct dmi_system_id intel_icl_broken_acpi [] = {
147
+ {
148
+ .ident = "ICL RVP" ,
149
+ .matches = {
150
+ DMI_MATCH (DMI_SYS_VENDOR , "Intel Corporation" ),
151
+ DMI_MATCH (DMI_PRODUCT_NAME , "Ice Lake Client Platform" ),
152
+ },
153
+ },
154
+
155
+ { }
156
+ };
157
+
158
+ static bool acpi_connection_type_broken ;
159
+
145
160
static enum usb_port_connect_type usb_acpi_get_connect_type (acpi_handle handle ,
146
161
struct acpi_pld_info * pld )
147
162
{
@@ -150,6 +165,10 @@ static enum usb_port_connect_type usb_acpi_get_connect_type(acpi_handle handle,
150
165
union acpi_object * upc = NULL ;
151
166
acpi_status status ;
152
167
168
+ /* Work around unknown ACPI instruction error on ICL RVP BIOSes. */
169
+ if (acpi_connection_type_broken )
170
+ return USB_PORT_CONNECT_TYPE_UNKNOWN ;
171
+
153
172
/*
154
173
* According to 9.14 in ACPI Spec 6.2. _PLD indicates whether usb port
155
174
* is user visible and _UPC indicates whether it is connectable. If
@@ -321,6 +340,11 @@ static struct acpi_bus_type usb_acpi_bus = {
321
340
322
341
int usb_acpi_register (void )
323
342
{
343
+ if (dmi_check_system (intel_icl_broken_acpi )) {
344
+ pr_info ("USB ACPI connection type broken.\n" );
345
+ acpi_connection_type_broken = true;
346
+ }
347
+
324
348
return register_acpi_bus_type (& usb_acpi_bus );
325
349
}
326
350
0 commit comments