Received: by 10.213.65.68 with SMTP id h4csp2323131imn; Mon, 2 Apr 2018 05:36:04 -0700 (PDT) X-Google-Smtp-Source: AIpwx4+MxGtTmJ+IdMayhr7p6UXMS1Zi4QQIdAobTGYQzjdFcYf5XzCsXdKi+XJSKpF4MtTArXyK X-Received: by 2002:a17:902:8482:: with SMTP id c2-v6mr9972400plo.295.1522672564857; Mon, 02 Apr 2018 05:36:04 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1522672564; cv=none; d=google.com; s=arc-20160816; b=i7WqpFSHgQCBiu37Hu4xBR7ZifznJ7Of6DvwozqG0zvyLMzaGmgi1LX0qMbtoPp0W4 ZsbDQYsp/LmQRwXrc1ikROVyr5h3Ed8smWXlcdGvREUFi8m2V/YsqrxSHRroBjgkHKAu jN/STxY2zofK2ZP9u51/usarEbh/8d3fOvapNuN2KyBdJIhi6xeCWCl+508iRXIs6xnT pjL7BUmir1Eyluie60Eru15bIZgMuYNnD+y666aNuu+6wCZ63AOqD7RK4P+h4m1f4jW6 bHbKZHsO5yh2Y01ycuGgwBRU41i0WLl7hUPLG0iYMbNI3/0m/C4h33AiUBltUnHU25++ R71A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:in-reply-to:message-id:date :subject:cc:to:from:dkim-signature:arc-authentication-results; bh=LXwMKYfd52P/FwV9zUDCtwKY9T6NMvBNh+VoIwgO0x0=; b=OEVcmuvhrO71RNt+G5jBYucp2hevCL7fzb08kfcf/Gsak74V3jqV9ZuKEakmU9Kgeg 3Ni9meiPr1uvORTxCKdvt8SuDvFohCDJO3s1NxwWwoxGRsWTphc/Zbcu7d7Cl/WLWQ65 LOQwFBV0zuvdqEmaPoMGe0i0QL2/JQ+tqT+UYsxqFqiiM+bXRi39Y2R2CCpgztbyYg5V fufAelX19/ggFk2AcelA+KWsDtHqnshhKLPS/8KxvyxwQhKpE5OBgtfyAbFZqQaWOytx Xr8tLLVxjvq8in8ufu1aCyiC8SJ9iF2uBZhE+Fy3D2LbrCB85sjlXH8YgtPcR89dM0EY 4qgA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=UwNSpAv0; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id b59-v6si246464plc.309.2018.04.02.05.35.51; Mon, 02 Apr 2018 05:36:04 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=UwNSpAv0; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751906AbeDBMeo (ORCPT + 99 others); Mon, 2 Apr 2018 08:34:44 -0400 Received: from mail-qt0-f195.google.com ([209.85.216.195]:46527 "EHLO mail-qt0-f195.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751324AbeDBMem (ORCPT ); Mon, 2 Apr 2018 08:34:42 -0400 Received: by mail-qt0-f195.google.com with SMTP id h4so15300315qtn.13; Mon, 02 Apr 2018 05:34:42 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=LXwMKYfd52P/FwV9zUDCtwKY9T6NMvBNh+VoIwgO0x0=; b=UwNSpAv0wu0mCSZwFebkfbeZGayYr8cztZDkoQiCQljiMEa1Dgp3K6jpEDd+iOGAR1 CTE3TfQZs6RyeJD+Cxbt1U3S7PKYQU+fUCQBPhFGoDNVCDFSK6fSIO3VuWGItHjPX9C5 bz5FxPNK5eY77+YkzbiVRWXUnM25RGnguZY1mrL8TMRuRKagvdiGysuRdpkgE+Q9Y6/T F1leiFb0+t+enfiybHfIxrPVtTaHBgykiEwrjJuOFZm3NN/Y6w8TU4+U6G7pAI73pHUe j2hkKTWUI9z/aSqsegUZl71qfQLbpdtdS2dSgoUrCCaHxef5jTaHjb7ZdxS3lEoosLRR J+ww== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=LXwMKYfd52P/FwV9zUDCtwKY9T6NMvBNh+VoIwgO0x0=; b=GIIssD3JBSAWuhDXQK1oaNgFtpN6s+SV0ab7aao37fbPsY48WQPPtHLdlDaytGp0x4 CGWP2tnWzFjQLZxvyR8myVt9t54LVdKbkRy0+ayqZfYCh1csULWhai4zA061oIownvyh TIXjGw719m4iwSZzDg9JzhTu4eELeXZWopja+7nq1ylKX7gW+CKG1WVEctydxCUkvCLC AI3IJkAjkcfTaH6UpCHkXBAeVwcdtYY6pH9a8sEIrhIhBRRUht1UGKlknQkHg/PDYrYZ fzPX4w59xywS104YAWXMXEj4op8Vl3UHHeRCaAN7Uc+XNdhOiknL7PCoiHSMzM+HZK3G w+4A== X-Gm-Message-State: ALQs6tArCHjQpBGuclm6PeThMdmLpTkU7Jr7hkhzxlTrc0xekJGcSap9 uHVBgH6pBFHUMW7MUfp5mQQ= X-Received: by 10.237.43.228 with SMTP id e91mr14317026qtd.17.1522672481640; Mon, 02 Apr 2018 05:34:41 -0700 (PDT) Received: from pm2-ws13.praxislan02.com ([2001:470:8:67e:ba27:ebff:fee8:ce27]) by smtp.gmail.com with ESMTPSA id 6sm182225qkj.92.2018.04.02.05.34.40 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Mon, 02 Apr 2018 05:34:40 -0700 (PDT) From: Jason Andryuk To: Jean Delvare , Wolfram Sang Cc: benjamin.tissoires@redhat.com, andyrtr@archlinux.org, aduggan@synaptics.com, Jason Andryuk , linux-i2c@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH v2] i2c: i801: blacklist Host Notify on HP EliteBook G3 850 Date: Mon, 2 Apr 2018 08:34:35 -0400 Message-Id: <20180402123435.5587-1-jandryuk@gmail.com> X-Mailer: git-send-email 2.14.3 In-Reply-To: <20180402122536.5083-1-jandryuk@gmail.com> References: <20180402122536.5083-1-jandryuk@gmail.com> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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 --- I only added my machine to the blacklist, since it's the only one I've tested. More systems can be added when identified and tested. v2: Fix open brace on function definition drivers/i2c/busses/i2c-i801.c | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) diff --git a/drivers/i2c/busses/i2c-i801.c b/drivers/i2c/busses/i2c-i801.c index 692b34125866..3e8e613c0801 100644 --- a/drivers/i2c/busses/i2c-i801.c +++ b/drivers/i2c/busses/i2c-i801.c @@ -1042,6 +1042,25 @@ 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_MATCH(DMI_BOARD_VENDOR, "HP"), + DMI_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 +1178,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 +1582,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