Re: [PATCH 1/1] hwmon: (it87) Automatic handling of ACPI resource failure

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Mon, Nov 21, 2022 at 01:57:18PM +1100, Frank Crawford wrote:
> On some Gigabyte boards sensors are marked as ACPI regions but not
> really handled by ACPI calls, as they return no data.
> Most commonly this is seen on boards with multiple ITE chips.
> In this case we just ignore the failure and continue on.
> 
> This is effectively the same as the use of either
>     acpi_enforce_resources=lax (kernel)
> or
>     ignore_resource_conflict=1 (it87)
> but set programatically.
> 
> Signed-off-by: Frank Crawford <frank@xxxxxxxxxxxxxxxxxx>
> ---

Sorry, I can not accept this patch. Ignoring resource conflicts
may have unintentional side effects and _has_ to be explicitly
requested by the user.

Guenter

> 
> Changes in this patch set:
> 
> * Add a flag, set in the DMI table, for ignoring ACPI resource conflict.
> 
> * Print an message if a conflict occurs, but otherwise ignore the issue.
> 
> * Add known, tested boards to the DMI table.
> 
>  drivers/hwmon/it87.c | 62 +++++++++++++++++++++++++++++++++++++++++++-
>  1 file changed, 61 insertions(+), 1 deletion(-)
> 
> diff --git a/drivers/hwmon/it87.c b/drivers/hwmon/it87.c
> index 9997f76b1f4a..991f1ab5f82c 100644
> --- a/drivers/hwmon/it87.c
> +++ b/drivers/hwmon/it87.c
> @@ -570,6 +570,7 @@ struct it87_data {
>  /* Board specific settings from DMI matching */
>  struct it87_dmi_data {
>  	u8 skip_pwm;		/* pwm channels to skip for this board  */
> +	bool skip_acpi_res;	/* ignore acpi failures on this board */
>  };
>  
>  /* Global for results from DMI matching, if needed */
> @@ -3264,7 +3265,9 @@ static int __init it87_device_add(int index, unsigned short address,
>  
>  	err = acpi_check_resource_conflict(&res);
>  	if (err) {
> -		if (!ignore_resource_conflict)
> +		if (dmi_data && dmi_data->skip_acpi_res)
> +			pr_info("Ignoring expected ACPI resource conflict\n");
> +		else if (!ignore_resource_conflict)
>  			return err;
>  	}
>  
> @@ -3322,6 +3325,21 @@ static struct it87_dmi_data nvidia_fn68pt = {
>  	.skip_pwm = BIT(1),
>  };
>  
> +/*
> + * On some Gigabyte boards sensors are marked as ACPI regions but not
> + * really handled by ACPI calls, as they return no data.
> + * Most commonly this is seen on boards with multiple ITE chips.
> + * In this case we just ignore the failure and continue on.
> + * This is effectively the same as the use of either
> + *     acpi_enforce_resources=lax (kernel)
> + * or
> + *     ignore_resource_conflict=1 (it87)
> + * but set programatically.
> + */
> +static struct it87_dmi_data gigabyte_acpi_ignore = {
> +	.skip_acpi_res = true,
> +};
> +
>  #define IT87_DMI_MATCH_VND(vendor, name, cb, data) \
>  	{ \
>  		.callback = cb, \
> @@ -3332,7 +3350,49 @@ static struct it87_dmi_data nvidia_fn68pt = {
>  		.driver_data = data, \
>  	}
>  
> +#define IT87_DMI_MATCH_GBT(name, cb, data) \
> +	IT87_DMI_MATCH_VND("Gigabyte Technology Co., Ltd.", name, cb, data)
> +
>  static const struct dmi_system_id it87_dmi_table[] __initconst = {
> +	IT87_DMI_MATCH_GBT("TRX40 AORUS XTREME", it87_dmi_cb,
> +			   &gigabyte_acpi_ignore),
> +		/* IT8688E + IT8792E/IT8795E */
> +	IT87_DMI_MATCH_GBT("Z390 AORUS ULTRA-CF", it87_dmi_cb,
> +			   &gigabyte_acpi_ignore),
> +		/* IT8688E + IT8792E/IT8795E */
> +	IT87_DMI_MATCH_GBT("Z490 AORUS ELITE AC", it87_dmi_cb,
> +			   &gigabyte_acpi_ignore),
> +		/* IT8688E */
> +	IT87_DMI_MATCH_GBT("B550 AORUS PRO AC", it87_dmi_cb,
> +			   &gigabyte_acpi_ignore),
> +		/* IT8688E + IT8792E/IT8795E */
> +	IT87_DMI_MATCH_GBT("B560I AORUS PRO AX", it87_dmi_cb,
> +			   &gigabyte_acpi_ignore),
> +		/* IT8689E */
> +	IT87_DMI_MATCH_GBT("X570 AORUS ELITE WIFI", it87_dmi_cb,
> +			   &gigabyte_acpi_ignore),
> +		/* IT8688E */
> +	IT87_DMI_MATCH_GBT("X570 AORUS MASTER", it87_dmi_cb,
> +			   &gigabyte_acpi_ignore),
> +		/* IT8688E + IT8792E/IT8795E */
> +	IT87_DMI_MATCH_GBT("X570 AORUS PRO WIFI", it87_dmi_cb,
> +			   &gigabyte_acpi_ignore),
> +		/* IT8688E + IT8792E/IT8795E */
> +	IT87_DMI_MATCH_GBT("X570 I AORUS PRO WIFI", it87_dmi_cb,
> +			   &gigabyte_acpi_ignore),
> +		/* IT8688E */
> +	IT87_DMI_MATCH_GBT("X570S AERO G", it87_dmi_cb,
> +			   &gigabyte_acpi_ignore),
> +		/* IT8689E + IT87952E */
> +	IT87_DMI_MATCH_GBT("X670E AORUS MASTER", it87_dmi_cb,
> +			   &gigabyte_acpi_ignore),
> +		/* IT8689E - Note there may also be a second chip */
> +	IT87_DMI_MATCH_GBT("Z690 AORUS PRO DDR4", it87_dmi_cb,
> +			   &gigabyte_acpi_ignore),
> +		/* IT8689E + IT87952E */
> +	IT87_DMI_MATCH_GBT("Z690 AORUS PRO", it87_dmi_cb,
> +			   &gigabyte_acpi_ignore),
> +		/* IT8689E + IT87952E */
>  	IT87_DMI_MATCH_VND("nVIDIA", "FN68PT", it87_dmi_cb, &nvidia_fn68pt),
>  	{ }
>  



[Index of Archives]     [LM Sensors]     [Linux Sound]     [ALSA Users]     [ALSA Devel]     [Linux Audio Users]     [Linux Media]     [Kernel]     [Gimp]     [Yosemite News]     [Linux Media]

  Powered by Linux