Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751768AbdCCDpj (ORCPT ); Thu, 2 Mar 2017 22:45:39 -0500 Received: from lucky1.263xmail.com ([211.157.147.131]:55939 "EHLO lucky1.263xmail.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751422AbdCCDph (ORCPT ); Thu, 2 Mar 2017 22:45:37 -0500 X-263anti-spam: KSV:0; X-MAIL-GRAY: 1 X-MAIL-DELIVERY: 0 X-KSVirus-check: 0 X-ABS-CHECKED: 4 X-RL-SENDER: shawn.lin@rock-chips.com X-FST-TO: linux-kernel@vger.kernel.org X-SENDER-IP: 58.22.7.114 X-LOGIN-NAME: shawn.lin@rock-chips.com X-UNIQUE-TAG: <30d80d6f2dc9f05c342be1a389631314> X-ATTACHMENT-NUM: 0 X-DNS-TYPE: 0 Subject: Re: [PATCH] mmc: core: fix changing bus witdh in hs400es mode To: Piotr Sroka References: <1488462454-905-1-git-send-email-piotrs@cadence.com> Cc: linux-mmc@vger.kernel.org, shawn.lin@rock-chips.com, Ulf Hansson , Chaotian Jing , Gwendal Grignou , Dong Aisheng , linux-kernel@vger.kernel.org From: Shawn Lin Message-ID: <78c1d56c-5272-f6c6-bb55-447857acb6b8@rock-chips.com> Date: Fri, 3 Mar 2017 11:43:05 +0800 User-Agent: Mozilla/5.0 (Windows NT 6.3; WOW64; rv:45.0) Gecko/20100101 Thunderbird/45.7.1 MIME-Version: 1.0 In-Reply-To: <1488462454-905-1-git-send-email-piotrs@cadence.com> Content-Type: text/plain; charset=gbk; format=flowed Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 905 Lines: 34 Hi Poitr, On 2017/3/2 21:47, Piotr Sroka wrote: > Fix the code to avoid changing bus width if HS400ES mode is selected. > Thanks for catching this, but Guenter posted a fix[1] already. :) [1]: https://patchwork.kernel.org/patch/9599261/ > Signed-off-by: Piotr Sroka > --- > drivers/mmc/core/mmc.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/drivers/mmc/core/mmc.c b/drivers/mmc/core/mmc.c > index 7fd7228..c7d9c9f 100644 > --- a/drivers/mmc/core/mmc.c > +++ b/drivers/mmc/core/mmc.c > @@ -1730,7 +1730,7 @@ static int mmc_init_card(struct mmc_host *host, u32 ocr, > err = mmc_select_hs400(card); > if (err) > goto free_card; > - } else { > + } else if (!mmc_card_hs400(card)) { > /* Select the desired bus width optionally */ > err = mmc_select_bus_width(card); > if (err > 0 && mmc_card_hs(card)) { > -- Best Regards Shawn Lin