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
@@ -81,6 +82,20 @@ int usb_acpi_set_power_state(struct usb_device *hdev, int index, bool enable)
81
82
}
82
83
EXPORT_SYMBOL_GPL (usb_acpi_set_power_state );
83
84
85
+ static const struct dmi_system_id intel_icl_broken_acpi [] = {
86
+ {
87
+ .ident = "ICL RVP" ,
88
+ .matches = {
89
+ DMI_MATCH (DMI_SYS_VENDOR , "Intel Corporation" ),
90
+ DMI_MATCH (DMI_PRODUCT_NAME , "Ice Lake Client Platform" ),
91
+ },
92
+ },
93
+
94
+ { }
95
+ };
96
+
97
+ static bool acpi_connection_type_broken ;
98
+
84
99
static enum usb_port_connect_type usb_acpi_get_connect_type (acpi_handle handle ,
85
100
struct acpi_pld_info * pld )
86
101
{
@@ -89,6 +104,10 @@ static enum usb_port_connect_type usb_acpi_get_connect_type(acpi_handle handle,
89
104
union acpi_object * upc ;
90
105
acpi_status status ;
91
106
107
+ /* Work around unknown ACPI instruction error on ICL RVP BIOSes. */
108
+ if (acpi_connection_type_broken )
109
+ return USB_PORT_CONNECT_TYPE_UNKNOWN ;
110
+
92
111
/*
93
112
* According to 9.14 in ACPI Spec 6.2. _PLD indicates whether usb port
94
113
* is user visible and _UPC indicates whether it is connectable. If
@@ -235,6 +254,11 @@ static struct acpi_bus_type usb_acpi_bus = {
235
254
236
255
int usb_acpi_register (void )
237
256
{
257
+ if (dmi_check_system (intel_icl_broken_acpi )) {
258
+ pr_info ("USB ACPI connection type broken.\n" );
259
+ acpi_connection_type_broken = true;
260
+ }
261
+
238
262
return register_acpi_bus_type (& usb_acpi_bus );
239
263
}
240
264
0 commit comments