Re: [PATCH] dell-smm-hwmon: Cache fan_type() calls and use fan_status() for fan detection

2016-06-15 Thread Pali Rohár
On Monday 13 June 2016 19:02:14 Guenter Roeck wrote: > >And second question: how to fix second bug? I see only one option: > >Create machine blacklist with broken Dell SMM firmware and disallow > >calling I8K_SMM_GET_FAN_TYPE for them. > > > Or maybe a whitelist with known working systems ? > >

Re: [PATCH] dell-smm-hwmon: Cache fan_type() calls and use fan_status() for fan detection

2016-06-15 Thread Pali Rohár
On Monday 13 June 2016 19:02:14 Guenter Roeck wrote: > >And second question: how to fix second bug? I see only one option: > >Create machine blacklist with broken Dell SMM firmware and disallow > >calling I8K_SMM_GET_FAN_TYPE for them. > > > Or maybe a whitelist with known working systems ? > >

Re: [PATCH] dell-smm-hwmon: Cache fan_type() calls and use fan_status() for fan detection

2016-06-13 Thread Guenter Roeck
On 06/13/2016 11:52 AM, Pali Rohár wrote: On Sunday 22 May 2016 02:28:00 Pali Rohár wrote: On Sunday 22 May 2016 02:19:48 Guenter Roeck wrote: On 05/21/2016 07:46 AM, Pali Rohár wrote: On more Dell machines (e.g. Dell Precision M3800) I8K_SMM_GET_FAN_TYPE call is too expensive (CPU is too

Re: [PATCH] dell-smm-hwmon: Cache fan_type() calls and use fan_status() for fan detection

2016-06-13 Thread Guenter Roeck
On 06/13/2016 11:52 AM, Pali Rohár wrote: On Sunday 22 May 2016 02:28:00 Pali Rohár wrote: On Sunday 22 May 2016 02:19:48 Guenter Roeck wrote: On 05/21/2016 07:46 AM, Pali Rohár wrote: On more Dell machines (e.g. Dell Precision M3800) I8K_SMM_GET_FAN_TYPE call is too expensive (CPU is too

Re: [PATCH] dell-smm-hwmon: Cache fan_type() calls and use fan_status() for fan detection

2016-06-13 Thread Pali Rohár
On Sunday 22 May 2016 02:28:00 Pali Rohár wrote: > On Sunday 22 May 2016 02:19:48 Guenter Roeck wrote: > > On 05/21/2016 07:46 AM, Pali Rohár wrote: > > > On more Dell machines (e.g. Dell Precision M3800) > > > I8K_SMM_GET_FAN_TYPE call is too expensive (CPU is too long in > > > SMM mode) and

Re: [PATCH] dell-smm-hwmon: Cache fan_type() calls and use fan_status() for fan detection

2016-06-13 Thread Pali Rohár
On Sunday 22 May 2016 02:28:00 Pali Rohár wrote: > On Sunday 22 May 2016 02:19:48 Guenter Roeck wrote: > > On 05/21/2016 07:46 AM, Pali Rohár wrote: > > > On more Dell machines (e.g. Dell Precision M3800) > > > I8K_SMM_GET_FAN_TYPE call is too expensive (CPU is too long in > > > SMM mode) and

Re: [PATCH] dell-smm-hwmon: Cache fan_type() calls and use fan_status() for fan detection

2016-06-13 Thread Pali Rohár
On Monday 30 May 2016 13:45:51 Thorsten Leemhuis wrote: > Pali Rohár wrote on 27.05.2016 15:21: > > On Friday 27 May 2016 15:05:54 Thorsten Leemhuis wrote: > >> Pali Rohár wrote on 27.05.2016 12:45: > >> So I tried a few things > >> and came to the conclusion: the problem shows up as soon as > >>

Re: [PATCH] dell-smm-hwmon: Cache fan_type() calls and use fan_status() for fan detection

2016-06-13 Thread Pali Rohár
On Monday 30 May 2016 13:45:51 Thorsten Leemhuis wrote: > Pali Rohár wrote on 27.05.2016 15:21: > > On Friday 27 May 2016 15:05:54 Thorsten Leemhuis wrote: > >> Pali Rohár wrote on 27.05.2016 12:45: > >> So I tried a few things > >> and came to the conclusion: the problem shows up as soon as > >>

Re: [PATCH] dell-smm-hwmon: Cache fan_type() calls and use fan_status() for fan detection

2016-06-02 Thread Pali Rohár
On Monday 30 May 2016 17:25:26 Peter Saunderson wrote: > On 30/05/16 10:36, Pali Rohár wrote: > >Hi Peter! Thank you for information! Are you able to try to call that > >function on some old kernel (e.g. 3.12 or 3.14) to verify that it is > >caused only and only by that function? > > > I have

Re: [PATCH] dell-smm-hwmon: Cache fan_type() calls and use fan_status() for fan detection

2016-06-02 Thread Pali Rohár
On Monday 30 May 2016 17:25:26 Peter Saunderson wrote: > On 30/05/16 10:36, Pali Rohár wrote: > >Hi Peter! Thank you for information! Are you able to try to call that > >function on some old kernel (e.g. 3.12 or 3.14) to verify that it is > >caused only and only by that function? > > > I have

Re: [PATCH] dell-smm-hwmon: Cache fan_type() calls and use fan_status() for fan detection

2016-05-30 Thread Peter Saunderson
On 30/05/16 10:36, Pali Rohár wrote: Hi Peter! Thank you for information! Are you able to try to call that function on some old kernel (e.g. 3.12 or 3.14) to verify that it is caused only and only by that function? I have tried to use my old 3.19.0 kernel that did not have the problem but now

Re: [PATCH] dell-smm-hwmon: Cache fan_type() calls and use fan_status() for fan detection

2016-05-30 Thread Peter Saunderson
On 30/05/16 10:36, Pali Rohár wrote: Hi Peter! Thank you for information! Are you able to try to call that function on some old kernel (e.g. 3.12 or 3.14) to verify that it is caused only and only by that function? I have tried to use my old 3.19.0 kernel that did not have the problem but now

Re: [PATCH] dell-smm-hwmon: Cache fan_type() calls and use fan_status() for fan detection

2016-05-30 Thread Thorsten Leemhuis
Pali Rohár wrote on 27.05.2016 15:21: > On Friday 27 May 2016 15:05:54 Thorsten Leemhuis wrote: >> Pali Rohár wrote on 27.05.2016 12:45: >> So I tried a few things >> and came to the conclusion: the problem shows up as soon as >> i8k_get_fan_type() (introduced in f989e55452) is called somewhere. >

Re: [PATCH] dell-smm-hwmon: Cache fan_type() calls and use fan_status() for fan detection

2016-05-30 Thread Thorsten Leemhuis
Pali Rohár wrote on 27.05.2016 15:21: > On Friday 27 May 2016 15:05:54 Thorsten Leemhuis wrote: >> Pali Rohár wrote on 27.05.2016 12:45: >> So I tried a few things >> and came to the conclusion: the problem shows up as soon as >> i8k_get_fan_type() (introduced in f989e55452) is called somewhere. >

Re: [PATCH] dell-smm-hwmon: Cache fan_type() calls and use fan_status() for fan detection

2016-05-30 Thread Pali Rohár
On Sunday 29 May 2016 20:27:15 Peter Saunderson wrote: > I have just tested removing i8k_get_fan_type() function from the > dell-smm-hwmon driver in the kernel on my Dell Inspiron 580 and the fan > speed problem goes away. My patch simply replaced fan_type with fan_status > in i8k_init_hwmon and

Re: [PATCH] dell-smm-hwmon: Cache fan_type() calls and use fan_status() for fan detection

2016-05-30 Thread Pali Rohár
On Sunday 29 May 2016 20:27:15 Peter Saunderson wrote: > I have just tested removing i8k_get_fan_type() function from the > dell-smm-hwmon driver in the kernel on my Dell Inspiron 580 and the fan > speed problem goes away. My patch simply replaced fan_type with fan_status > in i8k_init_hwmon and

Re: [PATCH] dell-smm-hwmon: Cache fan_type() calls and use fan_status() for fan detection

2016-05-29 Thread Peter Saunderson
I have just tested removing i8k_get_fan_type() function from the dell-smm-hwmon driver in the kernel on my Dell Inspiron 580 and the fan speed problem goes away. My patch simply replaced fan_type with fan_status in i8k_init_hwmon and used the index as the type in i8k_hwmon_show_fan_label

Re: [PATCH] dell-smm-hwmon: Cache fan_type() calls and use fan_status() for fan detection

2016-05-29 Thread Peter Saunderson
I have just tested removing i8k_get_fan_type() function from the dell-smm-hwmon driver in the kernel on my Dell Inspiron 580 and the fan speed problem goes away. My patch simply replaced fan_type with fan_status in i8k_init_hwmon and used the index as the type in i8k_hwmon_show_fan_label

Re: [PATCH] dell-smm-hwmon: Cache fan_type() calls and use fan_status() for fan detection

2016-05-27 Thread Pali Rohár
On Friday 27 May 2016 15:05:54 Thorsten Leemhuis wrote: > Pali Rohár wrote on 27.05.2016 12:45: > > […] > > Looks like there are two different problems with dell-smm-hwmon > > driver: 1) Fan speed going randomly up and down without system > > freeze […] > > So for problem 1) I need to know: > > >

Re: [PATCH] dell-smm-hwmon: Cache fan_type() calls and use fan_status() for fan detection

2016-05-27 Thread Pali Rohár
On Friday 27 May 2016 15:05:54 Thorsten Leemhuis wrote: > Pali Rohár wrote on 27.05.2016 12:45: > > […] > > Looks like there are two different problems with dell-smm-hwmon > > driver: 1) Fan speed going randomly up and down without system > > freeze […] > > So for problem 1) I need to know: > > >

Re: [PATCH] dell-smm-hwmon: Cache fan_type() calls and use fan_status() for fan detection

2016-05-27 Thread Thorsten Leemhuis
Pali Rohár wrote on 27.05.2016 12:45: > […] > Looks like there are two different problems with dell-smm-hwmon driver: > 1) Fan speed going randomly up and down without system freeze > […] > So for problem 1) I need to know: > > * Is it regression? […] Yes, it is known to be a regression from

Re: [PATCH] dell-smm-hwmon: Cache fan_type() calls and use fan_status() for fan detection

2016-05-27 Thread Thorsten Leemhuis
Pali Rohár wrote on 27.05.2016 12:45: > […] > Looks like there are two different problems with dell-smm-hwmon driver: > 1) Fan speed going randomly up and down without system freeze > […] > So for problem 1) I need to know: > > * Is it regression? […] Yes, it is known to be a regression from

Re: [PATCH] dell-smm-hwmon: Cache fan_type() calls and use fan_status() for fan detection

2016-05-27 Thread Pali Rohár
On Friday 27 May 2016 12:01:21 Thorsten Leemhuis wrote: > Pali Rohár wrote on 27.05.2016 11:47: > > […] > > I do not see any long taking SMM call here. Are you really sure > > that your machine freeze when loading or using dell-smm-hwmon? > > Uhh, sorry, it seems something got mixed up somewhere.

Re: [PATCH] dell-smm-hwmon: Cache fan_type() calls and use fan_status() for fan detection

2016-05-27 Thread Pali Rohár
On Friday 27 May 2016 12:01:21 Thorsten Leemhuis wrote: > Pali Rohár wrote on 27.05.2016 11:47: > > […] > > I do not see any long taking SMM call here. Are you really sure > > that your machine freeze when loading or using dell-smm-hwmon? > > Uhh, sorry, it seems something got mixed up somewhere.

Re: [PATCH] dell-smm-hwmon: Cache fan_type() calls and use fan_status() for fan detection

2016-05-27 Thread Thorsten Leemhuis
Pali Rohár wrote on 27.05.2016 11:47: > On Friday 27 May 2016 10:00:05 Thorsten Leemhuis wrote: >> Pali Rohár wrote on 26.05.2016 17:51: >> > On Thursday 26 May 2016 17:39:57 Thorsten Leemhuis wrote: >> >> > I need to know if this patch fixes problem on Dell Studio XPS 8000 >> >> > and Dell Studio

Re: [PATCH] dell-smm-hwmon: Cache fan_type() calls and use fan_status() for fan detection

2016-05-27 Thread Thorsten Leemhuis
Pali Rohár wrote on 27.05.2016 11:47: > On Friday 27 May 2016 10:00:05 Thorsten Leemhuis wrote: >> Pali Rohár wrote on 26.05.2016 17:51: >> > On Thursday 26 May 2016 17:39:57 Thorsten Leemhuis wrote: >> >> > I need to know if this patch fixes problem on Dell Studio XPS 8000 >> >> > and Dell Studio

Re: [PATCH] dell-smm-hwmon: Cache fan_type() calls and use fan_status() for fan detection

2016-05-27 Thread Pali Rohár
On Friday 27 May 2016 10:00:05 Thorsten Leemhuis wrote: > Pali Rohár wrote on 26.05.2016 17:51: > > On Thursday 26 May 2016 17:39:57 Thorsten Leemhuis wrote: > >> > I need to know if this patch fixes problem on Dell Studio XPS 8000 > >> > and Dell Studio XPS 8100 machines, so we can revert git

Re: [PATCH] dell-smm-hwmon: Cache fan_type() calls and use fan_status() for fan detection

2016-05-27 Thread Pali Rohár
On Friday 27 May 2016 10:00:05 Thorsten Leemhuis wrote: > Pali Rohár wrote on 26.05.2016 17:51: > > On Thursday 26 May 2016 17:39:57 Thorsten Leemhuis wrote: > >> > I need to know if this patch fixes problem on Dell Studio XPS 8000 > >> > and Dell Studio XPS 8100 machines, so we can revert git

Re: [PATCH] dell-smm-hwmon: Cache fan_type() calls and use fan_status() for fan detection

2016-05-27 Thread Thorsten Leemhuis
Pali Rohár wrote on 26.05.2016 17:51: > On Thursday 26 May 2016 17:39:57 Thorsten Leemhuis wrote: >> > I need to know if this patch fixes problem on Dell Studio XPS 8000 >> > and Dell Studio XPS 8100 machines, so we can revert git commits: >> > 6220f4ebd7b4 ("hwmon: (dell-smm) Blacklist Dell

Re: [PATCH] dell-smm-hwmon: Cache fan_type() calls and use fan_status() for fan detection

2016-05-27 Thread Thorsten Leemhuis
Pali Rohár wrote on 26.05.2016 17:51: > On Thursday 26 May 2016 17:39:57 Thorsten Leemhuis wrote: >> > I need to know if this patch fixes problem on Dell Studio XPS 8000 >> > and Dell Studio XPS 8100 machines, so we can revert git commits: >> > 6220f4ebd7b4 ("hwmon: (dell-smm) Blacklist Dell

Re: [PATCH] dell-smm-hwmon: Cache fan_type() calls and use fan_status() for fan detection

2016-05-26 Thread Pali Rohár
On Thursday 26 May 2016 17:39:57 Thorsten Leemhuis wrote: > > I need to know if this patch fixes problem on Dell Studio XPS 8000 > > and Dell Studio XPS 8100 machines, so we can revert git commits: > > 6220f4ebd7b4 ("hwmon: (dell-smm) Blacklist Dell Studio XPS 8000") > > a4b45b25f18d ("hwmon:

Re: [PATCH] dell-smm-hwmon: Cache fan_type() calls and use fan_status() for fan detection

2016-05-26 Thread Pali Rohár
On Thursday 26 May 2016 17:39:57 Thorsten Leemhuis wrote: > > I need to know if this patch fixes problem on Dell Studio XPS 8000 > > and Dell Studio XPS 8100 machines, so we can revert git commits: > > 6220f4ebd7b4 ("hwmon: (dell-smm) Blacklist Dell Studio XPS 8000") > > a4b45b25f18d ("hwmon:

Re: [PATCH] dell-smm-hwmon: Cache fan_type() calls and use fan_status() for fan detection

2016-05-26 Thread Thorsten Leemhuis
Lo! Pali Rohár wrote on 21.05.2016 16:46: > […] Thorsten […] can you test this patch if it fixes your freeze problem at > boottime and when using "sensors" program? FWIW, I never saw either of those problems. I only saw the third issue that was mentioned: the CPU fan speed is going up and down

Re: [PATCH] dell-smm-hwmon: Cache fan_type() calls and use fan_status() for fan detection

2016-05-26 Thread Thorsten Leemhuis
Lo! Pali Rohár wrote on 21.05.2016 16:46: > […] Thorsten […] can you test this patch if it fixes your freeze problem at > boottime and when using "sensors" program? FWIW, I never saw either of those problems. I only saw the third issue that was mentioned: the CPU fan speed is going up and down

Re: [PATCH] dell-smm-hwmon: Cache fan_type() calls and use fan_status() for fan detection

2016-05-21 Thread Pali Rohár
On Sunday 22 May 2016 02:19:48 Guenter Roeck wrote: > On 05/21/2016 07:46 AM, Pali Rohár wrote: > > On more Dell machines (e.g. Dell Precision M3800) > > I8K_SMM_GET_FAN_TYPE call is too expensive (CPU is too long in SMM > > mode) and cause kernel to hang. This patch cache type for each fan > >

Re: [PATCH] dell-smm-hwmon: Cache fan_type() calls and use fan_status() for fan detection

2016-05-21 Thread Pali Rohár
On Sunday 22 May 2016 02:19:48 Guenter Roeck wrote: > On 05/21/2016 07:46 AM, Pali Rohár wrote: > > On more Dell machines (e.g. Dell Precision M3800) > > I8K_SMM_GET_FAN_TYPE call is too expensive (CPU is too long in SMM > > mode) and cause kernel to hang. This patch cache type for each fan > >

Re: [PATCH] dell-smm-hwmon: Cache fan_type() calls and use fan_status() for fan detection

2016-05-21 Thread Guenter Roeck
On 05/21/2016 07:46 AM, Pali Rohár wrote: On more Dell machines (e.g. Dell Precision M3800) I8K_SMM_GET_FAN_TYPE call is too expensive (CPU is too long in SMM mode) and cause kernel to hang. This patch cache type for each fan (as it should not change) and change the way how fan presense is

Re: [PATCH] dell-smm-hwmon: Cache fan_type() calls and use fan_status() for fan detection

2016-05-21 Thread Guenter Roeck
On 05/21/2016 07:46 AM, Pali Rohár wrote: On more Dell machines (e.g. Dell Precision M3800) I8K_SMM_GET_FAN_TYPE call is too expensive (CPU is too long in SMM mode) and cause kernel to hang. This patch cache type for each fan (as it should not change) and change the way how fan presense is

[PATCH] dell-smm-hwmon: Cache fan_type() calls and use fan_status() for fan detection

2016-05-21 Thread Pali Rohár
On more Dell machines (e.g. Dell Precision M3800) I8K_SMM_GET_FAN_TYPE call is too expensive (CPU is too long in SMM mode) and cause kernel to hang. This patch cache type for each fan (as it should not change) and change the way how fan presense is detected. It revert and use function fan_status()

[PATCH] dell-smm-hwmon: Cache fan_type() calls and use fan_status() for fan detection

2016-05-21 Thread Pali Rohár
On more Dell machines (e.g. Dell Precision M3800) I8K_SMM_GET_FAN_TYPE call is too expensive (CPU is too long in SMM mode) and cause kernel to hang. This patch cache type for each fan (as it should not change) and change the way how fan presense is detected. It revert and use function fan_status()