hw/misc/tmp105.c | 73 ++++++++++++++++++++++++++++++++++++++++++------ hw/misc/tmp105.h | 7 +++++ 2 files changed, 71 insertions(+), 9 deletions(-)
This patchseries fixes bug https://bugs.launchpad.net/qemu/+bug/1734474 which is a regression between QEMU 1.3.0 and 1.4.0 of ability to boot a guest image on the n800 machine. The regression was introduced by commit cb5ef3fa1871522a08, which fixed a logic error in the tmp105 device's handling of i2c writes. That commit is correct, but it exposed an underlying bug in the tmp105 implementation. Previously, we accidentallywrote 0 to the config register when this guest tried to write 0x36, which meant (among other things) that we left the device in "comparator mode" rather than putting it into "interrupt mode" as the guest wanted, and it turns out that our interrupt-mode logic was buggy, so we would signal an over-temperature interrupt immediately and continuously, and the guest would hang. Patch 1 fixes a silly omission where we weren't setting the reset values for the T_high and T_low limit registers. Patch 2 fixes the interrupt mode limit checks. With these two the n9800 image linked to in the bug report can boot properly again. thanks -- PMM Peter Maydell (2): hw/misc/tmp105: reset the T_low and T_High registers tmp105: Correct handling of temperature limit checks hw/misc/tmp105.c | 73 ++++++++++++++++++++++++++++++++++++++++++------ hw/misc/tmp105.h | 7 +++++ 2 files changed, 71 insertions(+), 9 deletions(-) -- 2.20.1
Patchew URL: https://patchew.org/QEMU/20201110150023.25533-1-peter.maydell@linaro.org/ Hi, This series seems to have some coding style problems. See output below for more information: Message-id: 20201110150023.25533-1-peter.maydell@linaro.org Subject: [PATCH 0/2] hw/misc/tmp105: Correct temperature limit check logic Type: series === TEST SCRIPT BEGIN === #!/bin/bash git rev-parse base > /dev/null || exit 0 git config --local diff.renamelimit 0 git config --local diff.renames True git config --local diff.algorithm histogram ./scripts/checkpatch.pl --mailback base.. === TEST SCRIPT END === Updating 3c8cf5a9c21ff8782164d1def7f44bd888713384 From https://github.com/patchew-project/qemu - [tag update] patchew/1604643893-8223-1-git-send-email-zhengchuan@huawei.com -> patchew/1604643893-8223-1-git-send-email-zhengchuan@huawei.com - [tag update] patchew/20201104172512.2381656-1-ehabkost@redhat.com -> patchew/20201104172512.2381656-1-ehabkost@redhat.com - [tag update] patchew/20201109091719.2449141-1-f4bug@amsat.org -> patchew/20201109091719.2449141-1-f4bug@amsat.org * [new tag] patchew/20201110150023.25533-1-peter.maydell@linaro.org -> patchew/20201110150023.25533-1-peter.maydell@linaro.org Switched to a new branch 'test' aeeb041 tmp105: Correct handling of temperature limit checks d5c6bca hw/misc/tmp105: reset the T_low and T_High registers === OUTPUT BEGIN === 1/2 Checking commit d5c6bca1904c (hw/misc/tmp105: reset the T_low and T_High registers) 2/2 Checking commit aeeb0419f673 (tmp105: Correct handling of temperature limit checks) ERROR: spaces required around that '*' (ctx:VxV) #120: FILE: hw/misc/tmp105.c:263: + .subsections = (const VMStateDescription*[]) { ^ total: 1 errors, 0 warnings, 108 lines checked Patch 2/2 has style problems, please review. If any of these errors are false positives report them to the maintainer, see CHECKPATCH in MAINTAINERS. === OUTPUT END === Test command exited with code: 1 The full log is available at http://patchew.org/logs/20201110150023.25533-1-peter.maydell@linaro.org/testing.checkpatch/?type=message. --- Email generated automatically by Patchew [https://patchew.org/]. Please send your feedback to patchew-devel@redhat.com
Ping for code review? Might be nice to have in 5.2, though given how old the bug is it's scarcely critical... Ccing the ASPEED maintainers since that's the only other machine that uses the tmp105. thanks -- PMM On Tue, 10 Nov 2020 at 15:00, Peter Maydell <peter.maydell@linaro.org> wrote: > > This patchseries fixes bug https://bugs.launchpad.net/qemu/+bug/1734474 > which is a regression between QEMU 1.3.0 and 1.4.0 of ability to boot a > guest image on the n800 machine. The regression was introduced by > commit cb5ef3fa1871522a08, which fixed a logic error in the tmp105 > device's handling of i2c writes. That commit is correct, but it exposed > an underlying bug in the tmp105 implementation. Previously, we > accidentallywrote 0 to the config register when this guest tried to > write 0x36, which meant (among other things) that we left the device > in "comparator mode" rather than putting it into "interrupt mode" as > the guest wanted, and it turns out that our interrupt-mode logic was > buggy, so we would signal an over-temperature interrupt immediately > and continuously, and the guest would hang. > > Patch 1 fixes a silly omission where we weren't setting the > reset values for the T_high and T_low limit registers. > Patch 2 fixes the interrupt mode limit checks. > > With these two the n9800 image linked to in the bug report can > boot properly again. > > thanks > -- PMM > > Peter Maydell (2): > hw/misc/tmp105: reset the T_low and T_High registers > tmp105: Correct handling of temperature limit checks > > hw/misc/tmp105.c | 73 ++++++++++++++++++++++++++++++++++++++++++------ > hw/misc/tmp105.h | 7 +++++ > 2 files changed, 71 insertions(+), 9 deletions(-)
© 2016 - 2024 Red Hat, Inc.