* [PATCH v3] i2c: i801: blacklist Host Notify on HP EliteBook G3 850
[not found] <20180404225643.6b40782f@endymion>
@ 2018-04-05 18:38 ` Jason Andryuk
2018-04-10 7:38 ` Jean Delvare
2018-04-10 13:49 ` Sasha Levin
0 siblings, 2 replies; 5+ messages in thread
From: Jason Andryuk @ 2018-04-05 18:38 UTC (permalink / raw)
To: Jean Delvare, Wolfram Sang
Cc: benjamin.tissoires, andyrtr, aduggan, Jason Andryuk, stable,
linux-i2c, linux-kernel
The HP EliteBook G3 850 has a weird bug where a subsequent cold boot
hangs while plugged in if Linux enables the Host Notify features of
i2c-i801. The cold boot hang depends on how the system boots. It does
not hang on UEFI Grub text boot or legacy Grub text boot. But it does
hang on legacy Grub graphical boot and Intel Boot Agent PXE text boot.
Booting unplugged is not affected.
Disabling the Host Notify feature with disable_feature=0x20 works around
the bug, so automatically do so based on DMI information.
More information can be found here:
https://www.spinics.net/lists/linux-i2c/msg33938.html
Signed-off-by: Jason Andryuk <jandryuk@gmail.com>
Reviewed-by: Jean Delvare <jdelvare@suse.de>
Cc: stable@vger.kernel.org
---
v3: Switch to DMI_EXACT_MATCH and add empty element to array
drivers/i2c/busses/i2c-i801.c | 23 +++++++++++++++++++++++
1 file changed, 23 insertions(+)
diff --git a/drivers/i2c/busses/i2c-i801.c b/drivers/i2c/busses/i2c-i801.c
index 692b34125866..11149ddae745 100644
--- a/drivers/i2c/busses/i2c-i801.c
+++ b/drivers/i2c/busses/i2c-i801.c
@@ -1042,6 +1042,27 @@ static const struct pci_device_id i801_ids[] = {
MODULE_DEVICE_TABLE(pci, i801_ids);
#if defined CONFIG_X86 && defined CONFIG_DMI
+static const struct dmi_system_id host_notify_dmi_blacklist[] = {
+ {
+ .ident = "HP EliteBook G3 850",
+ .matches = {
+ DMI_EXACT_MATCH(DMI_BOARD_VENDOR, "HP"),
+ DMI_EXACT_MATCH(DMI_PRODUCT_NAME,
+ "HP EliteBook 850 G3"),
+ },
+ },
+ {}
+};
+
+static void blacklist_features(struct i801_priv *priv)
+{
+ if (dmi_check_system(host_notify_dmi_blacklist)) {
+ dev_warn(&priv->pci_dev->dev,
+ "SMBus Host Notify disabled on this system");
+ priv->features &= ~FEATURE_HOST_NOTIFY;
+ }
+}
+
static unsigned char apanel_addr;
/* Scan the system ROM for the signature "FJKEYINF" */
@@ -1159,6 +1180,7 @@ static void i801_probe_optional_slaves(struct i801_priv *priv)
#else
static void __init input_apanel_init(void) {}
static void i801_probe_optional_slaves(struct i801_priv *priv) {}
+static void blacklist_features(struct i801_priv *priv) {}
#endif /* CONFIG_X86 && CONFIG_DMI */
#if IS_ENABLED(CONFIG_I2C_MUX_GPIO) && defined CONFIG_DMI
@@ -1562,6 +1584,7 @@ static int i801_probe(struct pci_dev *dev, const struct pci_device_id *id)
i801_feature_names[i]);
}
priv->features &= ~disable_features;
+ blacklist_features(priv);
err = pcim_enable_device(dev);
if (err) {
--
2.14.3
^ permalink raw reply related [flat|nested] 5+ messages in thread
* Re: [PATCH v3] i2c: i801: blacklist Host Notify on HP EliteBook G3 850
2018-04-05 18:38 ` [PATCH v3] i2c: i801: blacklist Host Notify on HP EliteBook G3 850 Jason Andryuk
@ 2018-04-10 7:38 ` Jean Delvare
2018-04-10 9:10 ` Wolfram Sang
2018-04-10 13:49 ` Sasha Levin
1 sibling, 1 reply; 5+ messages in thread
From: Jean Delvare @ 2018-04-10 7:38 UTC (permalink / raw)
To: Jason Andryuk
Cc: Wolfram Sang, benjamin.tissoires, andyrtr, aduggan, stable,
linux-i2c, linux-kernel
On Thu, 5 Apr 2018 14:38:24 -0400, Jason Andryuk wrote:
> The HP EliteBook G3 850 has a weird bug where a subsequent cold boot
> hangs while plugged in if Linux enables the Host Notify features of
> i2c-i801. The cold boot hang depends on how the system boots. It does
> not hang on UEFI Grub text boot or legacy Grub text boot. But it does
> hang on legacy Grub graphical boot and Intel Boot Agent PXE text boot.
> Booting unplugged is not affected.
>
> Disabling the Host Notify feature with disable_feature=0x20 works around
> the bug, so automatically do so based on DMI information.
>
> More information can be found here:
> https://www.spinics.net/lists/linux-i2c/msg33938.html
>
> Signed-off-by: Jason Andryuk <jandryuk@gmail.com>
> Reviewed-by: Jean Delvare <jdelvare@suse.de>
> Cc: stable@vger.kernel.org
> ---
> v3: Switch to DMI_EXACT_MATCH and add empty element to array
>
> drivers/i2c/busses/i2c-i801.c | 23 +++++++++++++++++++++++
> 1 file changed, 23 insertions(+)
> (...)
Wolfram and stable, please hold on with this patch, Jason and I may have
found a proper fix so blacklisting would no longer be needed.
--
Jean Delvare
SUSE L3 Support
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH v3] i2c: i801: blacklist Host Notify on HP EliteBook G3 850
2018-04-10 7:38 ` Jean Delvare
@ 2018-04-10 9:10 ` Wolfram Sang
0 siblings, 0 replies; 5+ messages in thread
From: Wolfram Sang @ 2018-04-10 9:10 UTC (permalink / raw)
To: Jean Delvare
Cc: Jason Andryuk, benjamin.tissoires, andyrtr, aduggan, stable,
linux-i2c, linux-kernel
[-- Attachment #1: Type: text/plain, Size: 289 bytes --]
> > drivers/i2c/busses/i2c-i801.c | 23 +++++++++++++++++++++++
> > 1 file changed, 23 insertions(+)
> > (...)
>
> Wolfram and stable, please hold on with this patch, Jason and I may have
> found a proper fix so blacklisting would no longer be needed.
Awesome, thanks Jean!
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH v3] i2c: i801: blacklist Host Notify on HP EliteBook G3 850
2018-04-05 18:38 ` [PATCH v3] i2c: i801: blacklist Host Notify on HP EliteBook G3 850 Jason Andryuk
2018-04-10 7:38 ` Jean Delvare
@ 2018-04-10 13:49 ` Sasha Levin
2018-04-10 14:39 ` Jean Delvare
1 sibling, 1 reply; 5+ messages in thread
From: Sasha Levin @ 2018-04-10 13:49 UTC (permalink / raw)
To: Sasha Levin, Jason Andryuk, Jean Delvare, Wolfram Sang
Cc: benjamin.tissoires@redhat.com, andyrtr@archlinux.org,
stable@vger.kernel.org, stable@vger.kernel.org
Hi,
[This is an automated email]
This commit has been processed because it contains a -stable tag.
The stable tag indicates that it's relevant for the following trees: all
The bot has tested the following trees: v4.16.1, v4.15.16, v4.14.33, v4.9.93, v4.4.127.
v4.16.1: Build OK!
v4.15.16: Build OK!
v4.14.33: Build OK!
v4.9.93: Build OK!
v4.4.127: Build failed! Errors:
i2c-i801.c:918:22: error: ‘FEATURE_HOST_NOTIFY’ undeclared (first use in this function); did you mean ‘X86_FEATURE_HWP_NOTIFY’?
Please let us know if you'd like to have this patch included in a stable tree.
--
Thanks,
Sasha
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH v3] i2c: i801: blacklist Host Notify on HP EliteBook G3 850
2018-04-10 13:49 ` Sasha Levin
@ 2018-04-10 14:39 ` Jean Delvare
0 siblings, 0 replies; 5+ messages in thread
From: Jean Delvare @ 2018-04-10 14:39 UTC (permalink / raw)
To: Sasha Levin, Jason Andryuk, Wolfram Sang
Cc: benjamin.tissoires@redhat.com, andyrtr@archlinux.org,
stable@vger.kernel.org
On mar., 2018-04-10 at 13:49 +0000, Sasha Levin wrote:
> Hi,
>
> [This is an automated email]
>
> This commit has been processed because it contains a -stable tag.
> The stable tag indicates that it's relevant for the following trees: all
>
> The bot has tested the following trees: v4.16.1, v4.15.16, v4.14.33, v4.9.93, v4.4.127.
>
> v4.16.1: Build OK!
> v4.15.16: Build OK!
> v4.14.33: Build OK!
> v4.9.93: Build OK!
> v4.4.127: Build failed! Errors:
> i2c-i801.c:918:22: error: ‘FEATURE_HOST_NOTIFY’ undeclared (first use in this function); did you mean ‘X86_FEATURE_HWP_NOTIFY’?
>
>
> Please let us know if you'd like to have this patch included in a stable tree.
Nack. As stated somewhere else in this thread, odds are that this
blacklisting won't be needed after all.
--
Jean Delvare
SUSE L3 Support
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2018-04-10 14:39 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
[not found] <20180404225643.6b40782f@endymion>
2018-04-05 18:38 ` [PATCH v3] i2c: i801: blacklist Host Notify on HP EliteBook G3 850 Jason Andryuk
2018-04-10 7:38 ` Jean Delvare
2018-04-10 9:10 ` Wolfram Sang
2018-04-10 13:49 ` Sasha Levin
2018-04-10 14:39 ` Jean Delvare
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox