Received: by 10.213.65.68 with SMTP id h4csp2315909imn; Mon, 2 Apr 2018 05:27:31 -0700 (PDT) X-Google-Smtp-Source: AIpwx4+kzsjPxCWqYQORFgCMU9BWhWkPCZYC+tZr/eeyVv8xRt8xqW3FF4Ry3ZUCj9VYErs/ERu7 X-Received: by 2002:a17:902:264:: with SMTP id 91-v6mr9743974plc.178.1522672051362; Mon, 02 Apr 2018 05:27:31 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1522672051; cv=none; d=google.com; s=arc-20160816; b=sS/G0F5v8EMlBXNW1+1etH2xDGesmHKo/YcelQpBNml2xZWDHz2IcSnym72klxkxFH 2xDHUyoDRurSa3AZWq+PVIOIaDlsWDPH9PEnlrvIck2Qqp3ckwmgjQJIYTHV93YZaogB PHK+xwAj0MiKAp6dPwdtnGvnAufa+wN5jwwY2CGgCMf2S39d9FpAF/CEia7NoPstjxNE QiNCoCxc5xDVpAxL3hPpXKvB7UFrTKqZLEnkjv1WfTtFMxcHOY4JacEhwnm5kgV8cPse 5Jdronf/yqXfmXpOaAOI35LyIBeDfHWUEzjLgxsF/0RKU4uBjrC3yeR4fSilICmn1NA8 k7Rw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:message-id:date:subject:cc:to:from :dkim-signature:arc-authentication-results; bh=P67R7tK4V+hpJs9FWX93uAMHgNQb+NB1FYFbQVu+QKI=; b=yW1owLxmc9IbCvBvIK+eEKdovzV2s7iFaIEAaVNK9eDiGk75/YTfKOiynMYOzXNBEY bFS5we65gg+1+ZRIwJkmENoUKdqfpmBBczB+bPmebprANP9FZ6zLvT/7OyDBWaNz9DH/ iO0lZxUd2ArwHKfvIpNuPwz/d4xnjmEBSKDXwTZCT9gCdIc6n11a+JN90+5oJYwZGhG1 332xzzLeCPVZx0OE/BwQRnQWX20cWy6rl8J3lfBtmrm906HZm/BjvkdOSuGv7ykE9MRv KVN3MmsDd174TQQh00nwtBkIc7JqCT9v+BHeOkLaIBRBVyWtCI1GL5wl27C5kBQCq4zI PM3Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=RmmVn7tf; 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 m39-v6si236273plg.151.2018.04.02.05.27.17; Mon, 02 Apr 2018 05:27:31 -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=RmmVn7tf; 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 S1752414AbeDBMZu (ORCPT + 99 others); Mon, 2 Apr 2018 08:25:50 -0400 Received: from mail-qk0-f196.google.com ([209.85.220.196]:39231 "EHLO mail-qk0-f196.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751260AbeDBMZr (ORCPT ); Mon, 2 Apr 2018 08:25:47 -0400 Received: by mail-qk0-f196.google.com with SMTP id j73so14823140qke.6; Mon, 02 Apr 2018 05:25:47 -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; bh=P67R7tK4V+hpJs9FWX93uAMHgNQb+NB1FYFbQVu+QKI=; b=RmmVn7tfOBl3/brB5coK0Ny6NdeH30CSEU+0C41kL6CbF1vXWv/WaJHBtasMZ749Zx vPF3t5qzC0ID2eUakkommao5XHtxK+M8RiBkFc1RSF/SPUphpFT8fThTADcNgN/0voXj j33oB8Q9fncFIuUXxj4RXC92AwQneli6n4F02+WS9iu8r7nppoMlHMDxZSG64cEFFgdt lOY3Moe8rRnjlROWWYCLKAhTiaN8hGYMUQxl7OQlAImx91P1zgBeX0Snm3qK6CIXhue/ IptYiKPxsjIpxF5QDMFLR0JuVHsum6bsGkOyDL0ddOzZDUaXoNGPO3rwa/29x9wP4f/y qUKw== 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; bh=P67R7tK4V+hpJs9FWX93uAMHgNQb+NB1FYFbQVu+QKI=; b=WeFDsxh6TSROxk4pxNPDidN5blKQuhzUHATlWP0ArxcNqg4D5z/kAK0w2Ioqo9NaID lQGj+k3aWdFIF1vM0PcXJEs/QyOO+/s8S3akjMFr8nRXXJoa+bfFx3Y0hLmFPv/TiHt5 Vnnnz+L6r9Xv2AmxP2ginsT4EOuCgElwhCBBmJI0/jKwf0QSR1LtVOGePYy6cqxJisr0 B5gLf1iWxYTwMnIxIxTmpBe5R6Qdr7wVsFdwzPOvYM64sW1SP95zWgMzYkueFmO1Jewu b/1DjlWhvGgmKGkFYxZmpQ2KcAzgNGL6bmGPtn8ZA2Hkwp55tYdcW1ovXb+xudlVBViQ J8nA== X-Gm-Message-State: ALQs6tDkZJ95BmQRCwOka6JnC4xks7vTzo0UDiNa83XwcW/2nQ5sRAwp X6A0eCzj6TW8bt62LJ1UqmnSj+pXHQk= X-Received: by 10.55.159.204 with SMTP id i195mr12837518qke.188.1522671946413; Mon, 02 Apr 2018 05:25:46 -0700 (PDT) Received: from pm2-ws13.praxislan02.com ([2001:470:8:67e:ba27:ebff:fee8:ce27]) by smtp.gmail.com with ESMTPSA id s184sm172617qkd.78.2018.04.02.05.25.44 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Mon, 02 Apr 2018 05:25:45 -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] i2c: i801: blacklist Host Notify on HP EliteBook G3 850 Date: Mon, 2 Apr 2018 08:25:36 -0400 Message-Id: <20180402122536.5083-1-jandryuk@gmail.com> X-Mailer: git-send-email 2.14.3 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. drivers/i2c/busses/i2c-i801.c | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/drivers/i2c/busses/i2c-i801.c b/drivers/i2c/busses/i2c-i801.c index 692b34125866..2ff10c41ccad 100644 --- a/drivers/i2c/busses/i2c-i801.c +++ b/drivers/i2c/busses/i2c-i801.c @@ -1042,6 +1042,24 @@ 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 +1177,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 +1581,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