Received: by 10.213.65.68 with SMTP id h4csp2255498imn; Thu, 5 Apr 2018 11:40:16 -0700 (PDT) X-Google-Smtp-Source: AIpwx4/VU6YcbOvG3a+Gt8E/Ow3BOJs+hQMaMoZq1KpoYaJFZ+4g2FUZ4PGsY1JbIIjq2SveSAPs X-Received: by 10.101.97.16 with SMTP id z16mr15808827pgu.23.1522953616601; Thu, 05 Apr 2018 11:40:16 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1522953616; cv=none; d=google.com; s=arc-20160816; b=eD1xZzuDxWFlHIxCYXS2RbaUUPPPJ/xzw01wH2kQfzix94VfP/rWFnWOJrfyIA6O2a v8WPWUM2xiOvMJwW7KpGp5SKaO90xuKzsH0b2XlgAc5uvndSxvwqZbk+qa7kSyBpMr+W 81N1n7Tw8DqkcF047p6W1GCl6t2GJSKkhQKnNdLeiPMe0vaJ+1pOyKOrzIvUGDVi64bI Cg4Oy76lO1V7wbjo5YqHr7sgHNFRdW6anYilXOWLK7JjUWRRR8zArbovcQz184Y+zK22 RL76AWsEfJbHeFr5EWGA+nfp0Cgup8MxALaBMwrCfP7+oR+WHcdQPIDj5xhGrQ1iEwGi BrBQ== 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=+HkYt9+3uSMGeBekXyjPvfS86pd0ppXplTUzbAPELDw=; b=dWqyySr/qOJeRMW4C6SGQRXoGe3Jp9Hy5Mrd/xkb815nPlmQbg/ib9mjQOJKqLwFIF ZRRSBIthvgL7XoQxmovt7jjvunwhZcUPx3nWUSeIPfivsVujOnGMMS6c2DHOBBGwV67j uViTj5HLnljdD993ATHTS/D3MPbqoRGS4myUBpriNDRM9BXIGYOzMTT8x4FzLGNjWxQC Pwkgs5XEaxWBviq+5LRCM5+gHyCZ3zaAgIYqd0eCSmBK/P8rI567R4M3/3cU/5O3DU/O B74ksbxPJrVvjmwPA5romj5l15L0IwtoerZX0ixv8vFph+xiGQON9d7sIt0HA9XiuBZg wFSg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=M9nbxq+b; 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 z3si6101459pfe.255.2018.04.05.11.40.01; Thu, 05 Apr 2018 11:40:16 -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=M9nbxq+b; 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 S1751932AbeDESir (ORCPT + 99 others); Thu, 5 Apr 2018 14:38:47 -0400 Received: from mail-qk0-f196.google.com ([209.85.220.196]:45752 "EHLO mail-qk0-f196.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751535AbeDESip (ORCPT ); Thu, 5 Apr 2018 14:38:45 -0400 Received: by mail-qk0-f196.google.com with SMTP id s9so27375120qke.12; Thu, 05 Apr 2018 11:38:45 -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=+HkYt9+3uSMGeBekXyjPvfS86pd0ppXplTUzbAPELDw=; b=M9nbxq+bViLubdqINYugQO/xkfi5s1j/b12Fy5H9dhac2/2te2WzTJUHfSiMpNU9KZ 0O9rfbQrvqvHff9Txgjv88UAXgK53HU08lJF0/oTEoivPDsz7N2RPFnDTl6VGt63wnzB 1O3kbSgQsKZ03SOwfCqF3LozcW6kw8lB5+rSt84yJCWapS13HT7CHzkWGyGHORdGqoFD XMOaZyPtTr1Xp2zzJNVBuofM0j2cdP52GY08B95TmBdQrdDKhSDe4CxnrlrK2uxXOscH 2v0e8hbTmmONKGl9g21DyFZq1C61Evc5kzmTAZUNcNoH64gS9Trm4zInrQsLokagkD84 kIRA== 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=+HkYt9+3uSMGeBekXyjPvfS86pd0ppXplTUzbAPELDw=; b=ErsXj5/GIuU3U33FONmMV4SrKG5GrpA1hCN6n8IAMCLkyAL6qHdJf6pEA5ZUWdm5w3 yf0audoq3fDD7YJevxzVZjXK85hoFczKjsifGeRY2+AzhrNbJ9u3rknQ917nHheL7Eih AbD/CLOE+wivHMeIZYtB6TZVLkyphWnCqURlOrBCmdMnGHthE/snxWzCdgeX1aQxprXr JiZudP0A4/A2u5bNC+c+sTKuhJ7xXhnghDlHXMGmr24jNgHj00UejXHQsSqWiQpvFqP0 pvplV9BQ8dWKgwS+Khv7LOvPwWA2KSAW7VeJZuRAKDiduQrrCUSO3D9tgOY5FoI/rniS fVfw== X-Gm-Message-State: ALQs6tDcYyPWtqRZ3wv6WQVT/eXH5534UmI/clXIyOqeQVXuLe4wZPds 9yZ4yio9IMyqqOdrUQx+z9A= X-Received: by 10.55.24.15 with SMTP id j15mr30356863qkh.243.1522953524386; Thu, 05 Apr 2018 11:38:44 -0700 (PDT) Received: from pm2-ws13.praxislan02.com ([2001:470:8:67e:ba27:ebff:fee8:ce27]) by smtp.gmail.com with ESMTPSA id c29sm6939179qtb.75.2018.04.05.11.38.42 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Thu, 05 Apr 2018 11:38:43 -0700 (PDT) From: Jason Andryuk To: Jean Delvare , Wolfram Sang Cc: benjamin.tissoires@redhat.com, andyrtr@archlinux.org, aduggan@synaptics.com, Jason Andryuk , stable@vger.kernel.org, linux-i2c@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH v3] i2c: i801: blacklist Host Notify on HP EliteBook G3 850 Date: Thu, 5 Apr 2018 14:38:24 -0400 Message-Id: <20180405183824.13333-1-jandryuk@gmail.com> X-Mailer: git-send-email 2.14.3 In-Reply-To: <20180404225643.6b40782f@endymion> References: <20180404225643.6b40782f@endymion> 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 Reviewed-by: Jean Delvare 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