linux-hwmon.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Guenter Roeck <linux@roeck-us.net>
To: Frank Crawford <frank@crawford.emu.id.au>
Cc: Jean Delvare <jdelvare@suse.com>, linux-hwmon@vger.kernel.org
Subject: Re: [PATCH v3 1/7] hwmon: (it87) Allow disabling exiting of configuration mode
Date: Mon, 30 Jan 2023 10:42:36 -0800	[thread overview]
Message-ID: <1d51e281-15a9-7997-acbd-6ea1518ef596@roeck-us.net> (raw)
In-Reply-To: <20230129205647.GA1951466@roeck-us.net>

On 1/29/23 12:56, Guenter Roeck wrote:
> On Sat, Jan 28, 2023 at 05:03:02PM +1100, Frank Crawford wrote:
>> Disabling configuration mode on some chips can result in system
>> hang-ups and access failures to the Super-IO chip at the
>> second SIO address. Never exit configuration mode on these
>> chips to avoid the problem.
>>
>> This patch should be applied in conjunction with a previous one to
>> initialise the second chip for certain mother boards.
>>
>> Signed-off-by: Frank Crawford <frank@crawford.emu.id.au>
>> ---
>>
>> v3:
>>   * Correct possible uninitialised pointer issue.
>>
>> v2:
>>   * Convert to use feature flag and related macros rather than a separate
>>     field, as suggested in review.
>>   * Reverse sense of flag in superio_exit to simplify feature macro.
>>
>> ---
>>   drivers/hwmon/it87.c | 26 ++++++++++++++++++--------
>>   1 file changed, 18 insertions(+), 8 deletions(-)
>>
>> diff --git a/drivers/hwmon/it87.c b/drivers/hwmon/it87.c
>> index a8a6a0ffee82..923a9563be92 100644
>> --- a/drivers/hwmon/it87.c
>> +++ b/drivers/hwmon/it87.c
>> @@ -128,10 +128,12 @@ static inline int superio_enter(int ioreg)
>>   	return 0;
>>   }
>>   
>> -static inline void superio_exit(int ioreg)
>> +static inline void superio_exit(int ioreg, bool noexit)
>>   {
>> -	outb(0x02, ioreg);
>> -	outb(0x02, ioreg + 1);
>> +	if (!noexit) {
>> +		outb(0x02, ioreg);
>> +		outb(0x02, ioreg + 1);
>> +	}
>>   	release_region(ioreg, 2);
>>   }
>>   
>> @@ -300,6 +302,13 @@ struct it87_devices {
>>   #define FEAT_PWM_FREQ2		BIT(16)	/* Separate pwm freq 2 */
>>   #define FEAT_SIX_TEMP		BIT(17)	/* Up to 6 temp sensors */
>>   #define FEAT_VIN3_5V		BIT(18)	/* VIN3 connected to +5V */
>> +/*
>> + * Disabling configuration mode on some chips can result in system
>> + * hang-ups and access failures to the Super-IO chip at the
>> + * second SIO address. Never exit configuration mode on these
>> + * chips to avoid the problem.
>> + */
>> +#define FEAT_CONF_NOEXIT	BIT(28)	/* Chip should not exit conf mode */
> 
> Feature bits are supposed to be numbered sequentially, not randomly
> assigned. Please use bit 19.
> 

Given that the commit window is coming up, and since I don't have
other issues with your series, I am inclined to apply it with the
bit changed. Please let me know in the next day or two if this is
acceptable for you. If not, the series will have to wait until v6.4.

Thanks,
Guenter


  reply	other threads:[~2023-01-30 18:42 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-01-28  6:03 [PATCH v3 0/7] hwmon: (it87) Complete handling multi-chip configuration Frank Crawford
2023-01-28  6:03 ` [PATCH v3 1/7] hwmon: (it87) Allow disabling exiting of configuration mode Frank Crawford
2023-01-29 20:56   ` Guenter Roeck
2023-01-30 18:42     ` Guenter Roeck [this message]
2023-01-30 22:19       ` Frank Crawford
2023-01-31  3:40         ` Guenter Roeck
2023-01-28  6:03 ` [PATCH v3 2/7] hwmon: (it87) Disable configuration exit for certain chips Frank Crawford
2023-01-28  6:03 ` [PATCH v3 3/7] hwmon: (it87) List full chip model name Frank Crawford
2023-01-28  6:03 ` [PATCH v3 4/7] hwmon: (it87) Add chip_id in some info message Frank Crawford
2023-01-28  6:03 ` [PATCH v3 5/7] hwmon: (it87) Allow multiple chip IDs for force_id Frank Crawford
2023-01-28  6:03 ` [PATCH v3 6/7] hwmon: (it87) Add new chipset IT87952E Frank Crawford
2023-01-28  6:03 ` [PATCH v3 7/7] hwmon: (it87) Updated documentation for recent updates to it87 Frank Crawford

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1d51e281-15a9-7997-acbd-6ea1518ef596@roeck-us.net \
    --to=linux@roeck-us.net \
    --cc=frank@crawford.emu.id.au \
    --cc=jdelvare@suse.com \
    --cc=linux-hwmon@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).