Skip to contentSkip to conversation

hwmon: (i5500_temp) Don't bind to disabled sensors

PATCH Superseded Jean Delvare 3 participants 14 messages Oct 22, 2014 – Oct 23, 2014 Hardware monitoring

v1 of 2 Superseded Latest is v2 →

lore
Share & tools
lore
#0 lore raw

PATCH 3/3 hwmon: (i5500_temp) Don't bind to disabled sensors

On many motherboards, for an unknown reason, the thermal sensor seems to be disabled and will return a constant temperature value of 36.5 degrees Celsius. Don't bind to the device in that case, so that we don't report this bogus value to userspace.

Cc Romain Dolbeau <[email protected]>
Cc Guenter Roeck <[email protected]>

---
As suggested by Guenter.

 drivers/hwmon/i5500_temp.c |    7 +++++++
 1 file changed, 7 insertions(+)
drivers/hwmon/i5500_temp.c +7 -0
@@ -121,6 +121,7 @@ static int i5500_temp_probe(struct pci_d
 {
 	int err;
 	struct device *hwmon_dev;
+	s8 tsfsc;
 
 	err = pci_enable_device(pdev);
 	if (err) {
@@ -128,6 +129,12 @@ static int i5500_temp_probe(struct pci_d
 		return err;
 	}
 
+	pci_read_config_byte(pdev, REG_TSFSC, &tsfsc);
+	if (tsfsc = 0x7F) {
+		dev_warn(&pdev->dev, "Sensor seems to be disabled\n");
+		return -ENODEV;
+	}
+
 	hwmon_dev = devm_hwmon_device_register_with_groups(&pdev->dev,
 							   "intel5500", NULL,
 							   i5500_temp_groups);
Signature · 7 lines
Jean Delvare
SUSE L3 Support

_______________________________________________
lm-sensors mailing list
[email protected]
http://lists.lm-sensors.org/mailman/listinfo/lm-sensors
#1 lore raw

MjAxNC0xMC0yMiAxMToxMyBHTVQrMDI6MDAgSmVhbiBEZWx2YXJlIDxqZGVsdmFyZUBzdXNlLmRl PjoKPiBPbiBtYW55IG1vdGhlcmJvYXJkcywgZm9yIGFuIHVua25vd24gcmVhc29uLCB0aGUgdGhl cm1hbCBzZW5zb3Igc2VlbXMKPiB0byBiZSBkaXNhYmxlZCBhbmQgd2lsbCByZXR1cm4gYSBjb25z dGFudCB0ZW1wZXJhdHVyZSB2YWx1ZSBvZi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3b3JrCndpdGggeW91ciBjdXJyZW50IHRlc3QuCgpDb3JkaWFsbHksCgot LSAKUm9tYWluIERvbGJlYXUKCl9fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19f X19fX19fX19fCmxtLXNlbnNvcnMgbWFpbGluZyBsaXN0CmxtLXNlbnNvcnNAbG0tc2Vuc29ycy5v cmcKaHR0cDovL2xpc3RzLmxtLXNlbnNvcnMub3JnL21haWxtYW4vbGlzdGluZm8vbG0tc2Vuc29y cw=

maintainer
#2 lore raw
In reply to Jean Delvare
Quoted 25 lines · Jean Delvare

On many motherboards, for an unknown reason, the thermal sensor seems to be disabled and will return a constant temperature value of 36.5 degrees Celsius. Don't bind to the device in that case, so that we don't report this bogus value to userspace.

Cc Romain Dolbeau <[email protected]>
Cc Guenter Roeck <[email protected]>

---
As suggested by Guenter.

 drivers/hwmon/i5500_temp.c |    7 +++++++
 1 file changed, 7 insertions(+)
drivers/hwmon/i5500_temp.c +1 -0
@@ -121,6 +121,7 @@ static int i5500_temp_probe(struct pci_d
 {
 	int err;
 	struct device *hwmon_dev;
+	s8 tsfsc;
 
 	err = pci_enable_device(pdev);
 	if (err) {

drivers/hwmon/i5500_temp.c static int i5500_temp_probe(struct pci_d · line 137

Quoted 9 lines
drivers/hwmon/i5500_temp.c +6 -0
@@ -128,6 +129,12 @@ static int i5500_temp_probe(struct pci_d
 		return err;
 	}
 
+	pci_read_config_byte(pdev, REG_TSFSC, &tsfsc);
+	if (tsfsc = 0x7F) {
+		dev_warn(&pdev->dev, "Sensor seems to be disabled\n");
+		return -ENODEV;
+	}
+

Is there really no other register you can use to detect if the sensor is enabled ? How about the TSTIMER register ?

Thanks,
Guenter

Quoted 8 lines
drivers/hwmon/i5500_temp.c +0 -0
 	hwmon_dev = devm_hwmon_device_register_with_groups(&pdev->dev,
 							   "intel5500", NULL,
 							   i5500_temp_groups);
Signature · 3 lines
-- 
Jean Delvare
SUSE L3 Support

_______________________________________________
lm-sensors mailing list
[email protected]
http://lists.lm-sensors.org/mailman/listinfo/lm-sensors

#3 lore raw
In reply to Jean Delvare

2014-10-22 18:26 GMT+02:00 Guenter Roeck <[email protected]>:

Quoted 2 lines

Is there really no other register you can use to detect if the sensor is enabled ? How about the TSTIMER register ?

As far as I can tell (but I'm not an expert), all the documented registers display "sane" values, so it's hard to tell apart working and non-working systems. I tried copying the whole register space from the working to the non-working system, and it didn't help one bit. Seems there's some undocumented initialization missing (or the sensor is just not there).

So among the possibilities I see

1) Jean's solution, which I think is the best one. Simply reject if TSFSC=0x7F and document why. In the odd case where a cold system won't load, the admin can always load it on a warm (literally) system (@reboot in crontab).

2) the variability solution. perhaps a tiny bit more reliable, but much more complicated (and how much time does it take of TSFSC to react to change in TSTHRHI anyway ?)

3) depends on some undocumented behavior, such as the byte @ 0xE4 seemingly containing (TSTHRTHI-TSFSC).

4) the TSTHRCATA register is write-once, and (apparently) already written on the "working" system but not on the "non-working" system. But that's on a sample of 1 system of either kind, so again not very safe.

I think 1) is still the best solution, because it's simple and has no side-effect other than not loading in an hypothetical scenario unlikely to happen. 5500-based system are 3 to 4 generations back, it's unlikely chipset temperature is going to be a critical factor where the driver just _must_ load :-)

Cordially,

Signature · 6 lines
Romain Dolbeau

_______________________________________________
lm-sensors mailing list
[email protected]
http://lists.lm-sensors.org/mailman/listinfo/lm-sensors
maintainer
#4 lore raw
In reply to Jean Delvare

Hi Romain,

Quoted 6 lines · Romain Dolbeau

2014-10-22 18:26 GMT+02:00 Guenter Roeck <[email protected]>:

Quoted 2 lines

Is there really no other register you can use to detect if the sensor is enabled ? How about the TSTIMER register ?

As far as I can tell (but I'm not an expert), all the documented registers display "sane" values, so it's hard to tell apart working

Too bad. I thought that maybe the TSTIMER would have its poweron value of 0, though the datasheet is a bit confusing in that regard. It seems to state that the default value is 0 and 200,000 at the same time.

Maybe it is as simple as VCCTS or TSIREF not connected on the 'failing' board.

Did you check for 'thermal error enable' in the GERRCTL register ?

Quoted 24 lines

and non-working systems. I tried copying the whole register space from the working to the non-working system, and it didn't help one bit. Seems there's some undocumented initialization missing (or the sensor is just not there).

So among the possibilities I see

1) Jean's solution, which I think is the best one. Simply reject if TSFSC=0x7F and document why. In the odd case where a cold system won't load, the admin can always load it on a warm (literally) system (@reboot in crontab).

2) the variability solution. perhaps a tiny bit more reliable, but much more complicated (and how much time does it take of TSFSC to react to change in TSTHRHI anyway ?)

3) depends on some undocumented behavior, such as the byte @ 0xE4 seemingly containing (TSTHRTHI-TSFSC).

4) the TSTHRCATA register is write-once, and (apparently) already written on the "working" system but not on the "non-working" system. But that's on a sample of 1 system of either kind, so again not very safe.

Quoted 6 lines

I think 1) is still the best solution, because it's simple and has no side-effect other than not loading in an hypothetical scenario unlikely to happen. 5500-based system are 3 to 4 generations back, it's unlikely chipset temperature is going to be a critical factor where the driver just _must_ load :-)

I thought you were suggesting solution 2) earlier ?

Thanks,
Guenter

_______________________________________________
lm-sensors mailing list
[email protected]
http://lists.lm-sensors.org/mailman/listinfo/lm-sensors

maintainer Reviewed-by on v1 3/3
#5 lore raw
In reply to Jean Delvare
Quoted 8 lines · Jean Delvare

On many motherboards, for an unknown reason, the thermal sensor seems to be disabled and will return a constant temperature value of 36.5 degrees Celsius. Don't bind to the device in that case, so that we don't report this bogus value to userspace.

Cc Romain Dolbeau <[email protected]>
Cc Guenter Roeck <[email protected]>

Assuming there is no simple better way:

Guenter

Quoted 21 lines

---
As suggested by Guenter.

  drivers/hwmon/i5500_temp.c |    7 +++++++
  1 file changed, 7 insertions(+)
drivers/hwmon/i5500_temp.c +1 -0
@@ -121,6 +121,7 @@ static int i5500_temp_probe(struct pci_d
  {
  	int err;
  	struct device *hwmon_dev;
+	s8 tsfsc;
 
  	err = pci_enable_device(pdev);
  	if (err) {
@@ -128,6 +129,12 @@ static int i5500_temp_probe(struct pci_d
  		return err;
  	}

drivers/hwmon/i5500_temp.c static int i5500_temp_probe(struct pci_d · line 140

Quoted 10 lines
drivers/hwmon/i5500_temp.c +6 -0
 
+	pci_read_config_byte(pdev, REG_TSFSC, &tsfsc);
+	if (tsfsc = 0x7F) {
+		dev_warn(&pdev->dev, "Sensor seems to be disabled\n");
+		return -ENODEV;
+	}
+
  	hwmon_dev = devm_hwmon_device_register_with_groups(&pdev->dev,
  							   "intel5500", NULL,
  							   i5500_temp_groups);

_______________________________________________
lm-sensors mailing list
[email protected]
http://lists.lm-sensors.org/mailman/listinfo/lm-sensors

#6 lore raw
In reply to Jean Delvare

2014-10-23 0:53 GMT+02:00 Guenter Roeck <[email protected]>:

Quoted 1 line

I thought you were suggesting solution 2) earlier ?

Merely mentioning a possible alternative solution to a very minor potential flaw. And if someone encounters a load-at-bootime issue, s/he will be able to find why by a google search :-)

Cordially,

Signature · 6 lines
Romain Dolbeau

_______________________________________________
lm-sensors mailing list
[email protected]
http://lists.lm-sensors.org/mailman/listinfo/lm-sensors
#7 lore raw
In reply to Jean Delvare

SGkgUm9tYWluLAoKT24gV2VkLCAyMiBPY3QgMjAxNCAxMToyNTowMyArMDIwMCwgUm9tYWluIERv bGJlYXUgd3JvdGU6Cj4gMjAxNC0xMC0yMiAxMToxMyBHTVQrMDI6MDAgSmVhbiBEZWx2YXJlIDxq ZGVsdmFyZUBzdXNlLmRlPjoKPiA+IE9uIG1hbnkgbW90aGVyYm9hcmRzLCBmb3IgYW4gdW5rbm93 biByZWFzb24sIHRoZSB0aGVybWFsIHNlbnNvciBzZWVtcwo+ID4gdG8gYmUgZGlzYWJsZWQgYW5k IHdpbGwgcmV0dXJuIGEgY29uc3RhbnQgdGVtcGVyYXR1cmUgdmFsdWUgb2YgMzYuNQo+ID4gZGVn cmVlcyBDZWxzaXVzLiBEb24ndCBiaW5kIHRvIHRoZSBkZXZpY2UgaW4gdGhhdCBjYXNlLCBzbyB0 aGF0IHdlCj4gPiBkb24ndCByZXBvcnQgdGhpcyBib2d1cyB2YWx1ZSB0byB1c2Vyc3BhY2UuCj4g Cj4gMzYuNcKwQyBtaWdodCBiZSBhIGxlZ2l0aW1hdGUgdmFsdW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X19fX19fX19fX19fX19fX19fX18KbG0tc2Vu c29ycyBtYWlsaW5nIGxpc3QKbG0tc2Vuc29yc0BsbS1zZW5zb3JzLm9yZwpodHRwOi8vbGlzdHMu bG0tc2Vuc29ycy5vcmcvbWFpbG1hbi9saXN0aW5mby9sbS1zZW5zb3Jz

#9 lore raw
In reply to Jean Delvare

Hi Guenter,

Quoted 5 lines · Guenter Roeck
Quoted 4 lines · Romain Dolbeau

2014-10-22 18:26 GMT+02:00 Guenter Roeck <[email protected]>:

Quoted 2 lines

Is there really no other register you can use to detect if the sensor is enabled ? How about the TSTIMER register ?

Quoted 7 lines
Quoted 2 lines

As far as I can tell (but I'm not an expert), all the documented registers display "sane" values, so it's hard to tell apart working

Too bad. I thought that maybe the TSTIMER would have its poweron value of 0, though the datasheet is a bit confusing in that regard. It seems to state that the default value is 0 and 200,000 at the same time.

Value of this register is 0x07d30d40 on three boards where the driver
doesn't work. This means PRESCALER = 0x30d40 = 200000 and FILTER 0x07d = 125, as indicated in the datasheet. On the two boards where the driver does work, the FILTER field has the same value, however the
PRESCALER has a different value (257600 on one, 257201 on the other.)

So we could at least improve the heuristic and only fail the driver binding if TSFSC = 0x7F _and_ TSTIMER = 0x07D30D40. If someone changed the prescaler or filter values, there are good chances that the driver should work.

Quoted 2 lines

Maybe it is as simple as VCCTS or TSIREF not connected on the 'failing' board.

I indeed suspect that this could be a wiring issue. Out of curiosity, how did you find the relevant pin names?

Quoted 1 line

Did you check for 'thermal error enable' in the GERRCTL register ?

Interesting suggestion. But the bit is set on the only working board I have access to (Thermal error reporting disabled) while it is cleared on the non-working boards (Thermal error reporting enabled.) So I don't think we can rely on it.

Another interesting register in device 00:14.2 is THRERRCTL. It's set to 0x5 on the one working board I have access to, and to 0x0 on non-working ones.

Signature · 7 lines
Jean Delvare
SUSE L3 Support

_______________________________________________
lm-sensors mailing list
[email protected]
http://lists.lm-sensors.org/mailman/listinfo/lm-sensors
maintainer
#10 lore raw
In reply to Jean Delvare
Quoted 26 lines · Jean Delvare

Hi Guenter,

Quoted 5 lines · Guenter Roeck
Quoted 4 lines · Romain Dolbeau

2014-10-22 18:26 GMT+02:00 Guenter Roeck <[email protected]>:

Quoted 2 lines

Is there really no other register you can use to detect if the sensor is enabled ? How about the TSTIMER register ?

Quoted 7 lines
Quoted 2 lines

As far as I can tell (but I'm not an expert), all the documented registers display "sane" values, so it's hard to tell apart working

Too bad. I thought that maybe the TSTIMER would have its poweron value of 0, though the datasheet is a bit confusing in that regard. It seems to state that the default value is 0 and 200,000 at the same time.

Value of this register is 0x07d30d40 on three boards where the driver
doesn't work. This means PRESCALER = 0x30d40 = 200000 and FILTER > 0x07d = 125, as indicated in the datasheet. On the two boards where the driver does work, the FILTER field has the same value, however the
PRESCALER has a different value (257600 on one, 257201 on the other.)

So we could at least improve the heuristic and only fail the driver binding if TSFSC = 0x7F _and_ TSTIMER = 0x07D30D40. If someone changed the prescaler or filter values, there are good chances that the driver should work.

Quoted 6 lines
Quoted 2 lines

Maybe it is as simple as VCCTS or TSIREF not connected on the 'failing' board.

I indeed suspect that this could be a wiring issue. Out of curiosity, how did you find the relevant pin names?

Hi Jean,

The datasheet is online. I just browsed through it, looking for the term "thermal".

Quoted 7 lines
Quoted 1 line

Did you check for 'thermal error enable' in the GERRCTL register ?

Interesting suggestion. But the bit is set on the only working board I have access to (Thermal error reporting disabled) while it is cleared on the non-working boards (Thermal error reporting enabled.) So I don't think we can rely on it.

Interesting.

Quoted 4 lines

Another interesting register in device 00:14.2 is THRERRCTL. It's set to 0x5 on the one working board I have access to, and to 0x0 on non-working ones.

Can you set it on the non-working boards ?

Thanks,
Guenter

_______________________________________________
lm-sensors mailing list
[email protected]
http://lists.lm-sensors.org/mailman/listinfo/lm-sensors

#11 lore raw
In reply to Jean Delvare
Quoted 6 lines · Guenter Roeck
Quoted 3 lines · Jean Delvare

Another interesting register in device 00:14.2 is THRERRCTL. It's set to 0x5 on the one working board I have access to, and to 0x0 on non-working ones.

Can you set it on the non-working boards ?

Mind you, I tried that already, but it didn't help :( So either it is a hardware issue (pins not connected as you suggested before) or it takes a combination of changes to get it to work and we did not find all the steps, or didn't apply them all at the same time, or not in the right order... Maybe Romain will have more luck than me.

Signature · 7 lines
Jean Delvare
SUSE L3 Support

_______________________________________________
lm-sensors mailing list
[email protected]
http://lists.lm-sensors.org/mailman/listinfo/lm-sensors
#12 lore raw
In reply to Jean Delvare

2014-10-23 15:26 GMT+02:00 Jean Delvare <[email protected]>:

Quoted 1 line

Mind you, I tried that already, but it didn't help :(

[...]

Quoted 1 line

Maybe Romain will have more luck than me.

Nope, those registers are pretty much identical on both systems for me, AFAICT with lspci -xxxx.

Cordially,

Signature · 6 lines
Romain Dolbeau

_______________________________________________
lm-sensors mailing list
[email protected]
http://lists.lm-sensors.org/mailman/listinfo/lm-sensors
maintainer
#13 lore raw
In reply to Jean Delvare
Quoted 6 lines · Jean Delvare
Quoted 5 lines · Guenter Roeck
Quoted 3 lines · Jean Delvare

Another interesting register in device 00:14.2 is THRERRCTL. It's set to 0x5 on the one working board I have access to, and to 0x0 on non-working ones.

Quoted 8 lines
Quoted 1 line

Can you set it on the non-working boards ?

Mind you, I tried that already, but it didn't help :( So either it is a hardware issue (pins not connected as you suggested before) or it takes a combination of changes to get it to work and we did not find all the steps, or didn't apply them all at the same time, or not in the right order... Maybe Romain will have more luck than me.

Should have guessed. Well, you can only do so much.

Guenter

_______________________________________________
lm-sensors mailing list
[email protected]
http://lists.lm-sensors.org/mailman/listinfo/lm-sensors