Received: by 2002:ac0:a5a7:0:0:0:0:0 with SMTP id m36-v6csp2042009imm; Mon, 16 Jul 2018 00:44:05 -0700 (PDT) X-Google-Smtp-Source: AAOMgpfiBsVduxOKZ1dmfIU+TVAV26s/qa9SXzs9quWXLOfBscE7mxJ+kYsDAVwBKT1YPErgdLOo X-Received: by 2002:a63:2043:: with SMTP id r3-v6mr14881657pgm.105.1531727045634; Mon, 16 Jul 2018 00:44:05 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1531727045; cv=none; d=google.com; s=arc-20160816; b=1IxPx3Bj1cg6S/JP47xGyW3oLKedMsHazaAEsZbQLmSpqy9Pjo0TrXSk5wK8UOrJvi YI6b2gl7VTol6e3NiH/H4ZOmfNK/YHAvhlwGJzXliXKHvkNai3vy+p+Cs+hWOZ0/RaLC xVhd4gC4x5dU5XJCa3lP4Ex+q8/+EHM7Uyzcbhi9m40CUEs7rCRpODOLt+kR9HHiKwq+ mH91mfNmdTcr0eMZTe00InkiNchZQz8q8brECgjIBGGhoXSqE4SQsumNxnuC1jgardxb rugJH2nsa2kaXCZvEElumAAfw5FN4FyvWtA+fBn6Nk4bUuntQLVVk6kiwmNf9MxktuK5 uzVQ== 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=sP7FMIayywxIdBsXAKQH4d9btBaTCUwFMEeB7oXE8HI=; b=PKj1a/GUxwS4o6QcGK02g5CkFFRnt9FBMmoFa1txXTWeJqpFXaCZU0mVQjvaX/Cfnm i1Q4RRwI/uFtq6o93tv63LusKhjH+8UkZavQ1XB9jS5YU9mZk1zbfrJ7enLk2TOsXy2k NICVxuEw7EEeID0FcgaTgBPq8d9vibje1uTVi7CIi6E6NiisNrTBlIiZCCuhAeM2wS5w Lt2zXOqftVp5NZcsbDKh2qUVt2JGnmbHpzcfGOD18GUAL2hv4EZt8H89PuFkG3kbmTbT lDtoEWj6gmcaqLiI83xXiAlHW/5lPqv18wp9uji5ilN/9ukM1A5Th+RrCgnOLVpfw3+I tWKg== 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 f12-v6si27352180pgo.203.2018.07.16.00.43.50; Mon, 16 Jul 2018 00:44:05 -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 S2388815AbeGPIIk (ORCPT + 99 others); Mon, 16 Jul 2018 04:08:40 -0400 Received: from mail.linuxfoundation.org ([140.211.169.12]:47826 "EHLO mail.linuxfoundation.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1730161AbeGPIIj (ORCPT ); Mon, 16 Jul 2018 04:08:39 -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 518BAC03; Mon, 16 Jul 2018 07:42:37 +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.9 05/32] mmc: dw_mmc: fix card threshold control configuration Date: Mon, 16 Jul 2018 09:36:13 +0200 Message-Id: <20180716073505.097623666@linuxfoundation.org> X-Mailer: git-send-email 2.18.0 In-Reply-To: <20180716073504.433996952@linuxfoundation.org> References: <20180716073504.433996952@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.9-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 @@ -981,8 +981,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; @@ -990,7 +990,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);