summaryrefslogtreecommitdiff
path: root/drivers
diff options
context:
space:
mode:
authorDaniel Vetter <daniel.vetter@ffwll.ch>2024-01-08 09:42:13 +0100
committerDaniel Vetter <daniel.vetter@ffwll.ch>2024-01-08 09:42:13 +0100
commit21654ae81104cc7e6106c0c6d2eb077f65722492 (patch)
tree06dc992e1e7976a39be2b9814a42239915efb475 /drivers
parent03a611cc2962c4a907568555c52d110395ab38cd (diff)
parentd77abe80efb959aa038165a87df4327c90a26447 (diff)
Merge remote-tracking branch 'drm-intel/topic/core-for-CI' into drm-tip
Diffstat (limited to 'drivers')
-rw-r--r--drivers/acpi/sleep.c20
-rw-r--r--drivers/ata/libata-core.c16
-rw-r--r--drivers/net/phy/phy.c7
-rw-r--r--drivers/pci/msi/msi.c4
-rw-r--r--drivers/thermal/intel/therm_throt.c8
-rw-r--r--drivers/usb/core/usb-acpi.c24
6 files changed, 61 insertions, 18 deletions
diff --git a/drivers/acpi/sleep.c b/drivers/acpi/sleep.c
index 808484d11209..f9cba0e648c5 100644
--- a/drivers/acpi/sleep.c
+++ b/drivers/acpi/sleep.c
@@ -84,11 +84,16 @@ static int acpi_sleep_prepare(u32 acpi_state)
return 0;
}
+static u8 max_sleep_state = -1;
+
bool acpi_sleep_state_supported(u8 sleep_state)
{
acpi_status status;
u8 type_a, type_b;
+ if (sleep_state > max_sleep_state)
+ return false;
+
status = acpi_get_sleep_type_data(sleep_state, &type_a, &type_b);
return ACPI_SUCCESS(status) && (!acpi_gbl_reduced_hardware
|| (acpi_gbl_FADT.sleep_control.address
@@ -165,6 +170,13 @@ static int __init init_nvs_nosave(const struct dmi_system_id *d)
return 0;
}
+static int __init init_nosleep(const struct dmi_system_id *d)
+{
+ pr_info("Disabling ACPI suspend\n");
+ max_sleep_state = 0;
+ return 0;
+}
+
bool acpi_sleep_default_s3;
static int __init init_default_s3(const struct dmi_system_id *d)
@@ -397,6 +409,14 @@ static const struct dmi_system_id acpisleep_dmi_table[] __initconst = {
DMI_MATCH(DMI_PRODUCT_NAME, "ASUS EXPERTBOOK B1400CEAE"),
},
},
+ {
+ .callback = init_nosleep,
+ .ident = "samus",
+ .matches = {
+ DMI_MATCH(DMI_SYS_VENDOR, "GOOGLE"),
+ DMI_MATCH(DMI_PRODUCT_NAME, "Samus"),
+ },
+ },
{},
};
diff --git a/drivers/ata/libata-core.c b/drivers/ata/libata-core.c
index 09ed67772fae..b7c7c829d895 100644
--- a/drivers/ata/libata-core.c
+++ b/drivers/ata/libata-core.c
@@ -2202,7 +2202,7 @@ static bool ata_identify_page_supported(struct ata_device *dev, u8 page)
* for drives which implement this ATA level or above.
*/
if (ata_id_major_version(dev->id) >= 10)
- ata_dev_warn(dev,
+ ata_dev_notice(dev,
"ATA Identify Device Log not supported\n");
dev->horkage |= ATA_HORKAGE_NO_ID_DEV_LOG;
return false;
@@ -2274,7 +2274,7 @@ static void ata_dev_config_ncq_send_recv(struct ata_device *dev)
unsigned int err_mask;
if (!ata_log_supported(dev, ATA_LOG_NCQ_SEND_RECV)) {
- ata_dev_warn(dev, "NCQ Send/Recv Log not supported\n");
+ ata_dev_notice(dev, "NCQ Send/Recv Log not supported\n");
return;
}
err_mask = ata_read_log_page(dev, ATA_LOG_NCQ_SEND_RECV,
@@ -2299,8 +2299,8 @@ static void ata_dev_config_ncq_non_data(struct ata_device *dev)
unsigned int err_mask;
if (!ata_log_supported(dev, ATA_LOG_NCQ_NON_DATA)) {
- ata_dev_warn(dev,
- "NCQ Send/Recv Log not supported\n");
+ ata_dev_notice(dev,
+ "NCQ Send/Recv Log not supported\n");
return;
}
err_mask = ata_read_log_page(dev, ATA_LOG_NCQ_NON_DATA,
@@ -2953,14 +2953,14 @@ int ata_dev_configure(struct ata_device *dev)
if (ata_id_is_cfa(id)) {
/* CPRM may make this media unusable */
if (id[ATA_ID_CFA_KEY_MGMT] & 1)
- ata_dev_warn(dev,
+ ata_dev_notice(dev,
"supports DRM functions and may not be fully accessible\n");
snprintf(revbuf, 7, "CFA");
} else {
snprintf(revbuf, 7, "ATA-%d", ata_id_major_version(id));
/* Warn the user if the device has TPM extensions */
if (ata_id_has_tpm(id))
- ata_dev_warn(dev,
+ ata_dev_notice(dev,
"supports DRM functions and may not be fully accessible\n");
}
@@ -3115,8 +3115,8 @@ int ata_dev_configure(struct ata_device *dev)
}
if ((dev->horkage & ATA_HORKAGE_FIRMWARE_WARN) && print_info) {
- ata_dev_warn(dev, "WARNING: device requires firmware update to be fully functional\n");
- ata_dev_warn(dev, " contact the vendor or visit http://ata.wiki.kernel.org\n");
+ ata_dev_notice(dev, "WARNING: device requires firmware update to be fully functional\n");
+ ata_dev_notice(dev, " contact the vendor or visit http://ata.wiki.kernel.org\n");
}
return 0;
diff --git a/drivers/net/phy/phy.c b/drivers/net/phy/phy.c
index a5fa077650e8..d4747009c419 100644
--- a/drivers/net/phy/phy.c
+++ b/drivers/net/phy/phy.c
@@ -1245,7 +1245,7 @@ static void phy_error_precise(struct phy_device *phydev,
*/
void phy_error(struct phy_device *phydev)
{
- WARN_ON(1);
+ pr_notice_once("%s\n", __func__);
phy_process_error(phydev);
}
EXPORT_SYMBOL(phy_error);
@@ -1472,11 +1472,8 @@ void phy_stop(struct phy_device *phydev)
enum phy_state old_state;
if (!phy_is_started(phydev) && phydev->state != PHY_DOWN &&
- phydev->state != PHY_ERROR) {
- WARN(1, "called from state %s\n",
- phy_state_to_str(phydev->state));
+ phydev->state != PHY_ERROR)
return;
- }
mutex_lock(&phydev->lock);
old_state = phydev->state;
diff --git a/drivers/pci/msi/msi.c b/drivers/pci/msi/msi.c
index 682fa877478f..748af066f424 100644
--- a/drivers/pci/msi/msi.c
+++ b/drivers/pci/msi/msi.c
@@ -421,8 +421,10 @@ int __pci_enable_msi_range(struct pci_dev *dev, int minvec, int maxvec,
if (maxvec < minvec)
return -ERANGE;
- if (WARN_ON_ONCE(dev->msi_enabled))
+ if (dev->msi_enabled) {
+ pci_info(dev, "can't enable MSI, already enabled\n");
return -EINVAL;
+ }
nvec = pci_msi_vec_count(dev);
if (nvec < 0)
diff --git a/drivers/thermal/intel/therm_throt.c b/drivers/thermal/intel/therm_throt.c
index e69868e868eb..9d18f2fba7a0 100644
--- a/drivers/thermal/intel/therm_throt.c
+++ b/drivers/thermal/intel/therm_throt.c
@@ -345,10 +345,10 @@ static void __maybe_unused throttle_active_work(struct work_struct *work)
avg /= ARRAY_SIZE(state->temp_samples);
if (state->average > avg) {
- pr_warn("CPU%d: %s temperature is above threshold, cpu clock is throttled (total events = %lu)\n",
- this_cpu,
- state->level == CORE_LEVEL ? "Core" : "Package",
- state->count);
+ pr_notice("CPU%d: %s temperature is above threshold, cpu clock is throttled (total events = %lu)\n",
+ this_cpu,
+ state->level == CORE_LEVEL ? "Core" : "Package",
+ state->count);
state->rate_control_active = true;
}
diff --git a/drivers/usb/core/usb-acpi.c b/drivers/usb/core/usb-acpi.c
index a34b22537d7c..922992fce668 100644
--- a/drivers/usb/core/usb-acpi.c
+++ b/drivers/usb/core/usb-acpi.c
@@ -12,6 +12,7 @@
#include <linux/acpi.h>
#include <linux/pci.h>
#include <linux/usb/hcd.h>
+#include <linux/dmi.h>
#include "hub.h"
@@ -142,6 +143,20 @@ int usb_acpi_set_power_state(struct usb_device *hdev, int index, bool enable)
}
EXPORT_SYMBOL_GPL(usb_acpi_set_power_state);
+static const struct dmi_system_id intel_icl_broken_acpi[] = {
+ {
+ .ident = "ICL RVP",
+ .matches = {
+ DMI_MATCH(DMI_SYS_VENDOR, "Intel Corporation"),
+ DMI_MATCH(DMI_PRODUCT_NAME, "Ice Lake Client Platform"),
+ },
+ },
+
+ { }
+};
+
+static bool acpi_connection_type_broken;
+
static enum usb_port_connect_type usb_acpi_get_connect_type(acpi_handle handle,
struct acpi_pld_info *pld)
{
@@ -150,6 +165,10 @@ static enum usb_port_connect_type usb_acpi_get_connect_type(acpi_handle handle,
union acpi_object *upc = NULL;
acpi_status status;
+ /* Work around unknown ACPI instruction error on ICL RVP BIOSes. */
+ if (acpi_connection_type_broken)
+ return USB_PORT_CONNECT_TYPE_UNKNOWN;
+
/*
* According to 9.14 in ACPI Spec 6.2. _PLD indicates whether usb port
* is user visible and _UPC indicates whether it is connectable. If
@@ -321,6 +340,11 @@ static struct acpi_bus_type usb_acpi_bus = {
int usb_acpi_register(void)
{
+ if (dmi_check_system(intel_icl_broken_acpi)) {
+ pr_info("USB ACPI connection type broken.\n");
+ acpi_connection_type_broken = true;
+ }
+
return register_acpi_bus_type(&usb_acpi_bus);
}