From patchwork Thu Oct 13 21:00:17 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Patrick Thompson X-Patchwork-Id: 2361 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:4ac7:0:0:0:0:0 with SMTP id y7csp478241wrs; Thu, 13 Oct 2022 14:01:24 -0700 (PDT) X-Google-Smtp-Source: AMsMyM5StURrCZVdGeFPD7dXGLk96jkmkejK8tPxdFLjmjlEcwz/rVuGmZBXnMGlW44fXsUAbJvD X-Received: by 2002:a17:90b:2752:b0:20d:6790:19fb with SMTP id qi18-20020a17090b275200b0020d679019fbmr13517156pjb.117.1665694884464; Thu, 13 Oct 2022 14:01:24 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1665694884; cv=none; d=google.com; s=arc-20160816; b=DY1H96M29FbQH7mipmDSo/aLnO93USyqrHQ3mRbrLCOguJx1z023p22AHDcvOZMAWv CQQkoJYQG1lm3mP0roTwi9FP414tNPhlqaRpPrNfC6R2KNLh3uCb6L+F+6s74ZEJE7sY vA0B9CNBoqkaa5ozW9Zgqm/T1TcAL8ShsT3GWJMFJC6qKcTvVm+WhiHYT2Dup7zsGe4b jQcHNsjgxR2xrv0b1yRZXzuTR21FRr3x1azwQQArszwvj/pcEJWaWx7VKprH/CUwKPzW VUMWsL9XlbDOslHA6vjpvlSzuViS7r5rpZgGGnKFdZ7ynaQuhItWEjfbNNOExm+cMcR0 McMQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:from:subject:message-id:mime-version:date :dkim-signature; bh=/bUd8aKPH80AhGjW+++xUOpyDvX0kb5YuI9G+Oh1VW8=; b=kxhsN4qp+NXUDn2tzt7BWTLBJBuSxQOS49oiCcWbxOH5mbI/nbqKWcWGXozkrd1cjy BwW6dBwW5zgOLR6EaTxgA3yxxFsq+UObQ/94YkUavvui19AsIM6HP8s125ZXuypjptw5 vp5lvSEu4FbXrJAdKfbXyVRfSwelw/2M1bNsuAIwrbFRyntHGIN4cWlpq1wJrkbgBPFh FUFLApPQvg458LPF+B3h4XpfScNcXaLECpuNPkqJj2C3jMkwAKAxB6RDIqILWY9KZ4cF 7o6fSZbyAMI37Ou5K9U0tNqJbkaIDYZv2TRAgpEqlSq+BQQNM9uZXTPt0XSU7A1vDI2l J2qw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@google.com header.s=20210112 header.b=Ump8uOis; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id k21-20020a056a00169500b00537ac8547e9si577986pfc.82.2022.10.13.14.01.08; Thu, 13 Oct 2022 14:01:24 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@google.com header.s=20210112 header.b=Ump8uOis; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229894AbiJMVA2 (ORCPT + 99 others); Thu, 13 Oct 2022 17:00:28 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:49162 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229804AbiJMVAY (ORCPT ); Thu, 13 Oct 2022 17:00:24 -0400 Received: from mail-yw1-x114a.google.com (mail-yw1-x114a.google.com [IPv6:2607:f8b0:4864:20::114a]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 4E4D35E306 for ; Thu, 13 Oct 2022 14:00:23 -0700 (PDT) Received: by mail-yw1-x114a.google.com with SMTP id 00721157ae682-3562f0fb5a7so27861407b3.1 for ; Thu, 13 Oct 2022 14:00:23 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20210112; h=cc:to:from:subject:message-id:mime-version:date:from:to:cc:subject :date:message-id:reply-to; bh=/bUd8aKPH80AhGjW+++xUOpyDvX0kb5YuI9G+Oh1VW8=; b=Ump8uOis3JBmRWnAOLZHobNzJx2Li8xG9bd9NKtG4i6CMt5Rh1Yd7lTxDszAvk3Edd QZYdxBYgtg3/d4Zy/sQLh7uUzkzpqBf68G19QKg6grUhU7380+5lmV6MP7YR0xw6KNY9 fIHuavZYQc9f45UNc+JTrLvMG7qBR8m5mX8tgDy2lt7MQim3VmDXXQQuHk8T84G6FVQH ecc+Axgs04dVYxO4xc5iQYGii4BJ3uGa0NrgCNs4OxdBvzdAlGwaQQ6htxXGNaqznGPZ JZxRey1d0IeHMLiw+uC06q6sYFAXbm33JLYbMzZbA0VpIKJ5oM72FdKlknkqUscOT/Zi W9LA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=cc:to:from:subject:message-id:mime-version:date:x-gm-message-state :from:to:cc:subject:date:message-id:reply-to; bh=/bUd8aKPH80AhGjW+++xUOpyDvX0kb5YuI9G+Oh1VW8=; b=K7GRAzdgh2A8HD1sw2ICuQSB0asiR1XBBu2lftQI8pqQar+NOzIexip4tNDYrJrgfN 2tcNhBcRnDIG6ocDNis1mutZ844KLlahQ/Sq4OBTlRsjKAVLDcIQYW04IVEDS07Sje5w TCAgsn1dOpVkhjVxBBrsNCT7y6HpryftSmCeaz/PsMAkGHJclCZ6GQYC8OBXKhWC8hv5 O7Yk8gIk3gWv21mEPEcWDF43NQWT4h9ZijCiHxlfP/YvBWYkcP9htB8K3Oe94KTwh1Hx THATL6mDlicdySuFNn3baxaXSHfPjb04cjPRB5l5qL7LNRbjW17GFut/OD00ms07CcwM /PcA== X-Gm-Message-State: ACrzQf16SjjfuKwKQPF5VkVWvDJvsyLQ+kZtP1bgPhENIoyuUqJaLhyC N0AWgoVD8EEa1IPCHOfzsIvERLQ= X-Received: from ptf16.nyc.corp.google.com ([2620:0:1003:314:397e:65e9:dc1c:f5cd]) (user=ptf job=sendgmr) by 2002:a25:254a:0:b0:6bc:d8a1:939c with SMTP id l71-20020a25254a000000b006bcd8a1939cmr1782359ybl.438.1665694822583; Thu, 13 Oct 2022 14:00:22 -0700 (PDT) Date: Thu, 13 Oct 2022 17:00:17 -0400 Mime-Version: 1.0 X-Mailer: git-send-email 2.38.0.413.g74048e4d9e-goog Message-ID: <20221013210017.3751025-1-ptf@google.com> Subject: [PATCH v3] mmc: sdhci-pci-core: Disable ES for ASUS BIOS on Jasper Lake From: Patrick Thompson To: Linux MMC Development Cc: Sangwhan Moon , Adrian Hunter , Patrick Thompson , Ulf Hansson , linux-kernel@vger.kernel.org X-Spam-Status: No, score=-9.6 required=5.0 tests=BAYES_00,DKIMWL_WL_MED, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_NONE, SPF_HELO_NONE,SPF_PASS,USER_IN_DEF_DKIM_WL autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1746607679100021401?= X-GMAIL-MSGID: =?utf-8?q?1746607679100021401?= Enhanced Strobe (ES) does not work correctly on the ASUS 1100 series of devices. Jasper Lake eMMCs (pci_id 8086:4dc4) are supposed to support ES. There are also two system families under the series, thus this is being scoped to the ASUS BIOS. The failing ES prevents the installer from writing to disk. Falling back to HS400 without ES fixes the issue. Signed-off-by: Patrick Thompson Fixes: 315e3bd7ac19 ("mmc: sdhci-pci: Add support for Intel JSL") Acked-by: Adrian Hunter --- Changes in v3: * Remove redundant MMC_CAP2_HS400 selection Changes in v2: * Only disable ES instead of CQE in its entirety. * Target Jasper Lake (JSL) * Target ASUS BIOS instead of specific system family drivers/mmc/host/sdhci-pci-core.c | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/drivers/mmc/host/sdhci-pci-core.c b/drivers/mmc/host/sdhci-pci-core.c index 169b84761041..34ea1acbb3cc 100644 --- a/drivers/mmc/host/sdhci-pci-core.c +++ b/drivers/mmc/host/sdhci-pci-core.c @@ -914,6 +914,12 @@ static bool glk_broken_cqhci(struct sdhci_pci_slot *slot) dmi_match(DMI_SYS_VENDOR, "IRBIS")); } +static bool jsl_broken_hs400es(struct sdhci_pci_slot *slot) +{ + return slot->chip->pdev->device == PCI_DEVICE_ID_INTEL_JSL_EMMC && + dmi_match(DMI_BIOS_VENDOR, "ASUSTeK COMPUTER INC."); +} + static int glk_emmc_probe_slot(struct sdhci_pci_slot *slot) { int ret = byt_emmc_probe_slot(slot); @@ -922,9 +928,11 @@ static int glk_emmc_probe_slot(struct sdhci_pci_slot *slot) slot->host->mmc->caps2 |= MMC_CAP2_CQE; if (slot->chip->pdev->device != PCI_DEVICE_ID_INTEL_GLK_EMMC) { - slot->host->mmc->caps2 |= MMC_CAP2_HS400_ES; - slot->host->mmc_host_ops.hs400_enhanced_strobe = - intel_hs400_enhanced_strobe; + if (!jsl_broken_hs400es(slot)) { + slot->host->mmc->caps2 |= MMC_CAP2_HS400_ES; + slot->host->mmc_host_ops.hs400_enhanced_strobe = + intel_hs400_enhanced_strobe; + } slot->host->mmc->caps2 |= MMC_CAP2_CQE_DCMD; }