Received: by 2002:ac0:a5a7:0:0:0:0:0 with SMTP id m36-v6csp2037275imm; Mon, 16 Jul 2018 00:37:10 -0700 (PDT) X-Google-Smtp-Source: AAOMgpdllhpbulcbertsHecYShu64DZzol8malODJurPE5EA89FW10DmvjUiTqUqsF+/Ql7MkCRF X-Received: by 2002:a63:67c3:: with SMTP id b186-v6mr14611050pgc.5.1531726630056; Mon, 16 Jul 2018 00:37:10 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1531726630; cv=none; d=google.com; s=arc-20160816; b=R5acP0iibioQqCHAKCckQsMoQKIv1d55J+yNH/rfGbmZYIRyJBm/28Gr0MYMM2PpzG wrhM7jYS+l0mFs7jskms8X/+cM3cCcUzDeJsid3MbSntd9GgnDmpEyxysx6YLLhvfoZK /My+B+JKGpJcpw4evMeX1nxJlkkkJMn/sNBJIOLaW3ZPYE53aZh/xctjgqxe5bHRLKow TcDJLujDkQaCtErrhtGSYAZueNqp5MtaRacrHa7tHWjt24g4rucFt4UaBTFIpt/CbI1Z AsCy6nlC0I40rb+3is9b2YDBcoIjRrORt7wIt/6AV0zhS0TyQt28dah8CA6zmOqm6PE2 JM5w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:user-agent:references :in-reply-to:message-id:date:subject:cc:to:from :arc-authentication-results; bh=UsA1yjSOpDGY39rh3NJ1pHbZhLbkvsuq3KO48AUJ6yw=; b=QFA69egsTgLUy+PqnnQmg0KttKosk7DanwhBYBCJsU3/aEEHQw8mGXM0qT5dwyWp9m rGofsvSKGs1YRnExHXp/oEpeVfBjDsUKiKwS1RQ7knNJMuY1eGQnvrufYbz1+RQRgQn2 Qq5bJoPleOKN1yTWJppmz9inpbrIEv6EYB/Dxk2sHksUSoNSRySGbVHNI/sY8ay527wy paK8FbSJI5cKp1bj25aPtMdvd9M5/i0MNPp/hMkOReuUQEGkqbOh1Lu0dRE9AB26DLeT gI/TLsb0dzr1g5TR9Rg2ir8AUp+M2qGgG3iD/8wg81sELP++74tuxW6iM/y4z5CB4i7U nSiQ== ARC-Authentication-Results: i=1; mx.google.com; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id t9-v6si12312769plq.324.2018.07.16.00.36.42; Mon, 16 Jul 2018 00:37:10 -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; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729910AbeGPIBs (ORCPT + 99 others); Mon, 16 Jul 2018 04:01:48 -0400 Received: from mail.linuxfoundation.org ([140.211.169.12]:46526 "EHLO mail.linuxfoundation.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726301AbeGPIBr (ORCPT ); Mon, 16 Jul 2018 04:01:47 -0400 Received: from localhost (LFbn-1-12247-202.w90-92.abo.wanadoo.fr [90.92.61.202]) by mail.linuxfoundation.org (Postfix) with ESMTPSA id 930BACA8; Mon, 16 Jul 2018 07:35:47 +0000 (UTC) From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Qing Xia , Ulf Hansson Subject: [PATCH 4.17 10/67] mmc: dw_mmc: fix card threshold control configuration Date: Mon, 16 Jul 2018 09:34:39 +0200 Message-Id: <20180716073444.689906772@linuxfoundation.org> X-Mailer: git-send-email 2.18.0 In-Reply-To: <20180716073443.294323458@linuxfoundation.org> References: <20180716073443.294323458@linuxfoundation.org> User-Agent: quilt/0.65 X-stable: review MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 4.17-stable review patch. If anyone has any objections, please let me know. ------------------ From: x00270170 commit 7a6b9f4d601dfce8cb68f0dcfd834270280e31e6 upstream. Card write threshold control is supposed to be set since controller version 2.80a for data write in HS400 mode and data read in HS200/HS400/SDR104 mode. However the current code returns without configuring it in the case of data writing in HS400 mode. Meanwhile the patch fixes that the current code goes to 'disable' when doing data reading in HS400 mode. Fixes: 7e4bf1bc9543 ("mmc: dw_mmc: add the card write threshold for HS400 mode") Signed-off-by: Qing Xia Cc: stable@vger.kernel.org # v4.8+ Signed-off-by: Ulf Hansson Signed-off-by: Greg Kroah-Hartman --- drivers/mmc/host/dw_mmc.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) --- a/drivers/mmc/host/dw_mmc.c +++ b/drivers/mmc/host/dw_mmc.c @@ -1065,8 +1065,8 @@ static void dw_mci_ctrl_thld(struct dw_m * It's used when HS400 mode is enabled. */ if (data->flags & MMC_DATA_WRITE && - !(host->timing != MMC_TIMING_MMC_HS400)) - return; + host->timing != MMC_TIMING_MMC_HS400) + goto disable; if (data->flags & MMC_DATA_WRITE) enable = SDMMC_CARD_WR_THR_EN; @@ -1074,7 +1074,8 @@ static void dw_mci_ctrl_thld(struct dw_m enable = SDMMC_CARD_RD_THR_EN; if (host->timing != MMC_TIMING_MMC_HS200 && - host->timing != MMC_TIMING_UHS_SDR104) + host->timing != MMC_TIMING_UHS_SDR104 && + host->timing != MMC_TIMING_MMC_HS400) goto disable; blksz_depth = blksz / (1 << host->data_shift);