ntb: idt: Discard temperature sensor IRQ handler
authorSerge Semin <fancer.lancer@gmail.com>
Tue, 17 Jul 2018 09:24:36 +0000 (12:24 +0300)
committerJon Mason <jdmason@kudzu.us>
Thu, 1 Nov 2018 14:33:12 +0000 (10:33 -0400)
commitb8babacbae624da6d244d0721263edda56be3991
treed52389c295510d0fdf3110927bad82f7d98b7210
parentaed1b7b31154bdd6f2fccca0ab5cf8a6fe2f52eb
ntb: idt: Discard temperature sensor IRQ handler

IDT PCIe-switch temperature sensor interface is very broken. First
of all only a few combinations of TMPCTL threshold enable bits
really cause the interrupts unmasked. Even if an individual bit
indicates the event unmasked, corresponding IRQ just isn't generated.
Most of the threshold enable bits combinations are in fact useless and
non of them can help to create a fully functional alarm interface.
So to speak, we can't create a well defined hwmon alarms based on
the IDT PCI-switch threshold IRQs.

Secondly a single threshold IRQ (not a combination of thresholds) can
be successfully enabled without the issue described above. But in this
case we experienced an enormous number of interrupts generated by
the chip if the temperature got near the enabled threshold value. Filter
adjustment didn't help much. It also doesn't provide a hysteresis settings.
Due to the temperature sample fluctuations near the threshold the
interrupts spate makes the system nearly unusable until the temperature
value finally settled so being pushed either to be fully higher or lower
the threshold.

All of these issues makes the temperature sensor alarm interface useless
and even at some point dangerous to be used in the driver. In this case
it is safer to completely discard it and disable the temperature alarm
interrupts.

Signed-off-by: Serge Semin <fancer.lancer@gmail.com>
Signed-off-by: Jon Mason <jdmason@kudzu.us>
drivers/ntb/hw/idt/ntb_hw_idt.c
drivers/ntb/hw/idt/ntb_hw_idt.h