From: Greg KH <gregkh@suse.de>
To: linux-kernel@vger.kernel.org, stable@vger.kernel.org
Cc: torvalds@linux-foundation.org, akpm@linux-foundation.org,
alan@lxorguk.ukuu.org.uk, Jean Delvare <khali@linux-fr.org>,
Guenter Roeck <guenter.roeck@ericsson.com>
Subject: [049/101] hwmon: (w83627ehf) Properly report thermal diode sensors
Date: Wed, 02 Nov 2011 15:26:33 -0700 [thread overview]
Message-ID: <20111102222744.215836652@clark.kroah.org> (raw)
In-Reply-To: <20111102222755.GA10893@kroah.com>
2.6.33-longterm review patch. If anyone has any objections, please let us know.
------------------
From: Jean Delvare <khali@linux-fr.org>
commit bf164c58e58328c40ebc597a8ac00cc6840f9703 upstream.
The w83627ehf driver is improperly reporting thermal diode sensors as
type 2, instead of 3. This caused "sensors" and possibly other
monitoring tools to report these sensors as "transistor" instead of
"thermal diode".
Furthermore, diode subtype selection (CPU vs. external) is only
supported by the original W83627EHF/EHG. All later models only support
CPU diode type, and some (NCT6776F) don't even have the register in
question so we should avoid reading from it.
Signed-off-by: Jean Delvare <khali@linux-fr.org>
Signed-off-by: Guenter Roeck <guenter.roeck@ericsson.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
---
drivers/hwmon/w83627ehf.c | 15 +++++++++++----
1 file changed, 11 insertions(+), 4 deletions(-)
--- a/drivers/hwmon/w83627ehf.c
+++ b/drivers/hwmon/w83627ehf.c
@@ -1273,7 +1273,8 @@ static void w83627ehf_device_remove_file
}
/* Get the monitoring functions started */
-static inline void __devinit w83627ehf_init_device(struct w83627ehf_data *data)
+static inline void __devinit w83627ehf_init_device(struct w83627ehf_data *data,
+ enum kinds kind)
{
int i;
u8 tmp, diode;
@@ -1302,10 +1303,16 @@ static inline void __devinit w83627ehf_i
w83627ehf_write_value(data, W83627EHF_REG_VBAT, tmp | 0x01);
/* Get thermal sensor types */
- diode = w83627ehf_read_value(data, W83627EHF_REG_DIODE);
+ switch (kind) {
+ case w83627ehf:
+ diode = w83627ehf_read_value(data, W83627EHF_REG_DIODE);
+ break;
+ default:
+ diode = 0x70;
+ }
for (i = 0; i < 3; i++) {
if ((tmp & (0x02 << i)))
- data->temp_type[i] = (diode & (0x10 << i)) ? 1 : 2;
+ data->temp_type[i] = (diode & (0x10 << i)) ? 1 : 3;
else
data->temp_type[i] = 4; /* thermistor */
}
@@ -1353,7 +1360,7 @@ static int __devinit w83627ehf_probe(str
}
/* Initialize the chip */
- w83627ehf_init_device(data);
+ w83627ehf_init_device(data, sio_data->kind);
data->vrm = vid_which_vrm();
superio_enter(sio_data->sioreg);
next prev parent reply other threads:[~2011-11-03 1:40 UTC|newest]
Thread overview: 103+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-11-02 22:27 [000/101] 2.6.33.20-longterm review Greg KH
2011-11-02 22:25 ` [001/101] USB: ftdi_sio: add Calao reference board support Greg KH
2011-11-02 22:25 ` [002/101] USB: EHCI: Do not rely on PORT_SUSPEND to stop USB resuming in ehci_bus_resume() Greg KH
2011-11-02 22:25 ` [003/101] rt2x00: do not drop usb dev reference counter on suspend Greg KH
2011-11-02 22:25 ` [004/101] atm: br2684: Fix oops due to skb->dev being NULL Greg KH
2011-11-02 22:25 ` [005/101] sparc64: remove unnecessary macros from spinlock_64.h Greg KH
2011-11-02 22:25 ` [006/101] sparc32: unbreak arch_write_unlock() Greg KH
2011-11-02 22:25 ` [007/101] sparc: fix array bounds error setting up PCIC NMI trap Greg KH
2011-11-02 22:25 ` [008/101] ipv6: Add GSO support on forwarding path Greg KH
2011-11-02 22:25 ` [009/101] Revert "x86, hotplug: Use mwait to offline a processor, fix the legacy case" Greg KH
2011-11-02 22:25 ` [010/101] GRO: fix merging a paged skb after non-paged skbs Greg KH
2011-11-02 22:25 ` [011/101] xen-blkfront: fix data size for xenbus_gather in blkfront_connect Greg KH
2011-11-02 22:25 ` [012/101] md/linear: avoid corrupting structure while waiting for rcu_free to complete Greg KH
2011-11-02 22:25 ` [013/101] powerpc/pci: Check devices status property when scanning OF tree Greg KH
2011-11-02 22:25 ` [014/101] xen: x86_32: do not enable iterrupts when returning from exception in interrupt context Greg KH
2011-11-02 22:25 ` [015/101] xen/smp: Warn user why they keel over - nosmp or noapic and what to use instead Greg KH
2011-11-02 22:26 ` [016/101] ARM: davinci: da850 EVM: read mac address from SPI flash Greg KH
2011-11-02 22:26 ` [017/101] md: Fix handling for devices from 2TB to 4TB in 0.90 metadata Greg KH
2011-11-02 22:26 ` [018/101] net/9p: fix client code to fail more gracefully on protocol error Greg KH
2011-11-02 22:26 ` [019/101] fs/9p: Fid is not valid after a failed clunk Greg KH
2011-11-02 22:26 ` [020/101] fs/9p: Fix invalid mount options/args Greg KH
2011-11-02 22:26 ` [021/101] net/9p: Fix the msize calculation Greg KH
2011-11-02 22:26 ` [022/101] irda: fix smsc-ircc2 section mismatch warning Greg KH
2011-11-02 22:26 ` [023/101] [SCSI] qla2xxx: Correct inadvertent loop state transitions during port-update handling Greg KH
2011-11-02 22:26 ` [024/101] e1000: Fix driver to be used on PA RISC C8000 workstations Greg KH
2011-11-02 22:26 ` [025/101] ASoC: Fix reporting of partial jack updates Greg KH
2011-11-02 22:26 ` [026/101] ALSA: HDA: Cirrus - fix "Surround Speaker" volume control name Greg KH
2011-11-02 22:26 ` [027/101] drm/radeon/kms: fix typo in r100_blit_copy Greg KH
2011-11-03 13:01 ` Deucher, Alexander
2011-11-02 22:26 ` [028/101] cifs: fix possible memory corruption in CIFSFindNext Greg KH
2011-11-02 22:26 ` [029/101] b43: Fix beacon problem in ad-hoc mode Greg KH
2011-11-02 22:26 ` [030/101] wireless: Reset beacon_found while updating regulatory Greg KH
2011-11-02 22:26 ` [031/101] rtl2800usb: Fix incorrect storage of MAC address on big-endian platforms Greg KH
2011-11-02 22:26 ` [032/101] USB: PL2303: correctly handle baudrates above 115200 Greg KH
2011-11-02 22:26 ` [033/101] ASIX: Add AX88772B USB ID Greg KH
2011-11-02 22:26 ` [034/101] [SCSI] fcoe: Unable to select the exchangeID from offload pool for storage targets Greg KH
2011-11-02 22:26 ` [035/101] hvc_console: Improve tty/console put_chars handling Greg KH
2011-11-02 22:26 ` [036/101] TPM: Call tpm_transmit with correct size Greg KH
2011-11-02 22:26 ` [037/101] TPM: Zero buffer after copying to userspace Greg KH
2011-11-02 22:26 ` [038/101] [SCSI] libiscsi_tcp: fix LLD data allocation Greg KH
2011-11-02 22:26 ` [039/101] cnic: Improve NETDEV_UP event handling Greg KH
2011-11-02 22:26 ` [040/101] ALSA: hda/realtek - Avoid bogus HP-pin assignment Greg KH
2011-11-02 22:26 ` [041/101] [SCSI] 3w-9xxx: fix iommu_iova leak Greg KH
2011-11-02 22:26 ` [042/101] [SCSI] aacraid: reset should disable MSI interrupt Greg KH
2011-11-02 22:26 ` [043/101] [SCSI] libsas: fix failure to revalidate domain for anything but the first expander child Greg KH
2011-11-02 22:26 ` [044/101] cfg80211: Fix validation of AKM suites Greg KH
2011-11-02 22:26 ` [045/101] splice: direct_splice_actor() should not use pos in sd Greg KH
2011-11-02 22:26 ` [046/101] [SCSI] libsas: fix panic when single phy is disabled on a wide port Greg KH
2011-11-02 22:26 ` [047/101] ahci: Enable SB600 64bit DMA on Asus M3A Greg KH
2011-11-02 22:26 ` [048/101] HID: usbhid: Add support for SiGma Micro chip Greg KH
2011-11-02 22:26 ` Greg KH [this message]
2011-11-02 22:26 ` [050/101] x25: Prevent skb overreads when checking call user data Greg KH
2011-11-02 22:26 ` [051/101] block: check for proper length of iov entries earlier in blk_rq_map_user_iov() Greg KH
2011-11-02 22:26 ` [052/101] staging: quatech_usb2: Potential lost wakeup scenario in TIOCMIWAIT Greg KH
2011-11-02 22:26 ` [053/101] USB: qcserial: add device ID for "HP un2430 Mobile Broadband Module" Greg KH
2011-11-02 22:26 ` [054/101] xhci-mem.c: Check for ring->first_seg != NULL Greg KH
2011-11-02 22:26 ` [055/101] [SCSI] ipr: Always initiate hard reset in kdump kernel Greg KH
2011-11-02 22:26 ` [056/101] [SCSI] libsas: set sas_address and device type of rphy Greg KH
2011-11-02 22:26 ` [057/101] ALSA: HDA: Add new revision for ALC662 Greg KH
2011-11-02 22:26 ` [058/101] x86: Fix compilation bug in kprobes twobyte_is_boostable Greg KH
2011-11-02 22:26 ` [059/101] epoll: fix spurious lockdep warnings Greg KH
2011-11-02 22:26 ` [060/101] usbmon vs. tcpdump: fix dropped packet count Greg KH
2011-11-02 22:26 ` [061/101] USB: storage: Use normalized sense when emulating autosense Greg KH
2011-11-02 22:26 ` [062/101] usb/core/devio.c: Check for printer class specific request Greg KH
2011-11-02 22:26 ` [063/101] USB: pid_ns: ensure pid is not freed during kill_pid_info_as_uid Greg KH
2011-11-02 22:26 ` [064/101] usb: cdc-acm: Owen SI-30 support Greg KH
2011-11-02 22:26 ` [065/101] USB: pl2303: add id for SMART device Greg KH
2011-11-02 22:26 ` [066/101] USB: ftdi_sio: add PID for Sony Ericsson Urban Greg KH
2011-11-02 22:26 ` [067/101] USB: ftdi_sio: Support TI/Luminary Micro Stellaris BD-ICDI Board Greg KH
2011-11-02 22:26 ` [068/101] QE/FHCI: fixed the CONTROL bug Greg KH
2011-11-02 22:26 ` [069/101] Update email address for stable patch submission Greg KH
2011-11-02 22:26 ` [070/101] kobj_uevent: Ignore if some listeners cannot handle message Greg KH
2011-11-02 22:26 ` [071/101] kmod: prevent kmod_loop_msg overflow in __request_module() Greg KH
2011-11-02 22:26 ` [072/101] time: Change jiffies_to_clock_t() argument type to unsigned long Greg KH
2011-11-02 22:26 ` [073/101] tracing: Fix returning of duplicate data after EOF in trace_pipe_raw Greg KH
2011-11-02 22:26 ` [074/101] nfsd4: Remove check for a 32-bit cookie in nfsd4_readdir() Greg KH
2011-11-02 22:26 ` [075/101] nfsd4: fix seqid_mutating_error Greg KH
2011-11-02 22:27 ` [076/101] nfsd4: ignore WANT bits in open downgrade Greg KH
2011-11-02 22:27 ` [077/101] ASoC: ak4642: fixup cache register table Greg KH
2011-11-02 22:27 ` [078/101] ASoC: ak4535: " Greg KH
2011-11-02 22:27 ` [079/101] KVM: s390: check cpu_id prior to using it Greg KH
2011-11-02 22:27 ` [080/101] [S390] ccwgroup: move attributes to attribute group Greg KH
2011-11-02 22:27 ` [081/101] iommu/amd: Fix wrong shift direction Greg KH
2011-11-02 22:27 ` [082/101] carminefb: Fix module parameters permissions Greg KH
2011-11-02 22:27 ` [083/101] [media] uvcvideo: Set alternate setting 0 on resume if the bus has been reset Greg KH
2011-11-02 22:27 ` [084/101] [media] tuner_xc2028: Allow selection of the frequency adjustment code for XC3028 Greg KH
2011-11-02 22:27 ` [085/101] plat-mxc: iomux-v3.h: implicitly enable pull-up/down when thats desired Greg KH
2011-11-02 22:27 ` [086/101] net: Fix a memmove bug in dev_gro_receive() Greg KH
2011-11-02 22:27 ` [087/101] gro: fix different skb headrooms Greg KH
2011-11-02 22:27 ` [088/101] gro: Re-fix " Greg KH
2011-11-02 22:27 ` [089/101] Revert "MIPS: MTX-1: Make au1000_eth probe all PHY Greg KH
2011-11-02 22:27 ` [090/101] Revert "usb: musb: restore INDEX register in resume path" Greg KH
2011-11-02 22:27 ` [091/101] watchdog: mtx1-wdt: fix build failure Greg KH
2011-11-02 22:27 ` [092/101] kcore: fix test for end of list Greg KH
2011-11-02 22:27 ` [093/101] thinkpad-acpi: module autoloading for newer Lenovo ThinkPads Greg KH
2011-11-02 22:27 ` [094/101] scm: lower SCM_MAX_FD Greg KH
2011-11-02 22:27 ` [095/101] NLM: Dont hang forever on NLM unlock requests Greg KH
2011-11-02 22:27 ` [096/101] Bluetooth: l2cap and rfcomm: fix 1 byte infoleak to userspace Greg KH
2011-11-02 22:27 ` [097/101] vm: fix vm_pgoff wrap in stack expansion Greg KH
2011-11-02 22:27 ` [098/101] vm: fix vm_pgoff wrap in upward expansion Greg KH
2011-11-02 22:27 ` [099/101] Bluetooth: Prevent buffer overflow in l2cap config request Greg KH
2011-11-02 22:27 ` [100/101] nl80211: fix overflow in ssid_len Greg KH
2011-11-02 22:27 ` [101/101] net_sched: Fix qdisc_notify() Greg KH
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=20111102222744.215836652@clark.kroah.org \
--to=gregkh@suse.de \
--cc=akpm@linux-foundation.org \
--cc=alan@lxorguk.ukuu.org.uk \
--cc=guenter.roeck@ericsson.com \
--cc=khali@linux-fr.org \
--cc=linux-kernel@vger.kernel.org \
--cc=stable@vger.kernel.org \
--cc=torvalds@linux-foundation.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
all inboxes | Powered by JetHome®