Received: by 2002:a05:7412:b10a:b0:f3:1519:9f41 with SMTP id az10csp120005rdb; Wed, 29 Nov 2023 23:17:04 -0800 (PST) X-Google-Smtp-Source: AGHT+IHL6j58hy+kqLIX2buQyH4OeGucHos+jtvgkInMmSAhoH7AC6zv4McXXxGNdkhlhF30l3ka X-Received: by 2002:a17:90b:164b:b0:280:99ca:1611 with SMTP id il11-20020a17090b164b00b0028099ca1611mr19868303pjb.20.1701328624274; Wed, 29 Nov 2023 23:17:04 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1701328624; cv=none; d=google.com; s=arc-20160816; b=wuzozvEzrKPl0+gm2k6dxurg7qeYnFkuC9FKiKx7YQkQTh1/Kp7Z/0iT3qb3UHITt8 /QdA2rxnvf6t02Do0I+ZjtygsGQMBcLrRDt0ArzFh27dJVOce/nz0kgRwqvoNePEwc4X T8ydWOIUFHRfLt7eezrme6aNSal7HaE6z3XCYfwtO4TEeG3UaXcsrMwexg55MoH6T5Mv l0x9QNHzMhEavDCKVMhBl0wG8+CpGJriloVIrW9LZRwL/tYYDCuxI1k4VPU+l5XZp/sA V9tXhLpRCV32jkRICm1//qBFoY+3/9uleqzO152i5+2wuazbH6z+hh26wE6VahPk1W6s 4xfQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-transfer-encoding :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:dkim-signature; bh=+wSA4J8kEjsMbfBGC3daRYd3L7HhAXkwOUzF16CBgd8=; fh=slI+SzD9xvhCC1ko74QxwV4WJNzw+rW4Nut9obVA7Ak=; b=bxRbJcVb7EvcCcuZLlRTojhQRRuALdtX3C24WXXivMkAzPYk3ZvjZIRYKgP0i46OpW xhDGSEo6AfFAzquMLug2BYnTTo2JJ4s/XBTlnmttFY4HCdcOqy5m4Ko1o48uNFrz6XeC 7WU3oiLAnwPiZaWe8TOiT5iM96fT9SRlMn6J6GiipCOIPr2b0KRStQpJOxiyv+qNnnlV zNH51kVwK4fPp62U8+THG1So/UOMxHoorQEOfrE2q8tE7S90HZKaQFC+VEZkwQa/iAM+ z7g/N0ExghRumdzR423rW+fdzrCS7xNk/tg9PPncschi5y6hxYJCKozPTg/OYPq0Io0w q/mg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b="H/Q2h0Q1"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:1 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from morse.vger.email (morse.vger.email. [2620:137:e000::3:1]) by mx.google.com with ESMTPS id lp8-20020a17090b4a8800b002859bac814dsi3156063pjb.21.2023.11.29.23.16.39 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 29 Nov 2023 23:17:04 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:1 as permitted sender) client-ip=2620:137:e000::3:1; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b="H/Q2h0Q1"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:1 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by morse.vger.email (Postfix) with ESMTP id A8C32826E590; Wed, 29 Nov 2023 23:16:37 -0800 (PST) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.11 at morse.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229971AbjK3HQX (ORCPT + 99 others); Thu, 30 Nov 2023 02:16:23 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:52160 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229596AbjK3HQV (ORCPT ); Thu, 30 Nov 2023 02:16:21 -0500 Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 11F86F4 for ; Wed, 29 Nov 2023 23:16:28 -0800 (PST) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 4AD8DC433C8; Thu, 30 Nov 2023 07:16:21 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1701328587; bh=lLUoztCwhCN/7/8toyFFX0k88uIj2NbfdQ4XFG2xYLU=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=H/Q2h0Q1LvPmphRQaScbts6BBRVynUgqRHZqnMk1DnUdOuUEZRaPZhfmyK8OFXhDw NNlUoQt+7UprWXvvbM72uOjGo3t9tHxBi8UQaMnnBg5w6yZ01WfNo7z1Be92I6IA3a OHQ2ltXTceVJe1VsqXqsp50ZmE0y6yOR0O2P6GCAMKidm7V9WC6sSlj7R38VO3NFqd kwXeJ+Vm55EnewENCo9RsPQaD5H02ZtVjf0gpGrqJPJJRVCDU18BLiZkrSHdFxV5qz STEK0uuvT6Bl6yy+gLit23uLBdRAUy2J5BfdT9vh7ifz++lxzqAVv7toJ3s/3/JkC7 vZC+v5nOGPKdg== Date: Thu, 30 Nov 2023 12:46:17 +0530 From: Manivannan Sadhasivam To: Can Guo Cc: bvanassche@acm.org, adrian.hunter@intel.com, cmd4@qualcomm.com, beanhuo@micron.com, avri.altman@wdc.com, junwoo80.lee@samsung.com, martin.petersen@oracle.com, linux-scsi@vger.kernel.org, linux-arm-msm@vger.kernel.org, Andy Gross , Bjorn Andersson , Konrad Dybcio , "James E.J. Bottomley" , open list Subject: Re: [PATCH v6 09/10] scsi: ufs: ufs-qcom: Check return value of phy_set_mode_ext() Message-ID: <20231130071617.GH3043@thinkpad> References: <1701246516-11626-1-git-send-email-quic_cang@quicinc.com> <1701246516-11626-10-git-send-email-quic_cang@quicinc.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <1701246516-11626-10-git-send-email-quic_cang@quicinc.com> X-Spam-Status: No, score=-1.2 required=5.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on morse.vger.email Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (morse.vger.email [0.0.0.0]); Wed, 29 Nov 2023 23:16:37 -0800 (PST) On Wed, Nov 29, 2023 at 12:28:34AM -0800, Can Guo wrote: > In ufs_qcom_power_up_sequence(), check return value of phy_set_mode_ext() > and stop proceeding if phy_set_mode_ext() fails. > > Signed-off-by: Can Guo > --- > drivers/ufs/host/ufs-qcom.c | 7 ++++++- > 1 file changed, 6 insertions(+), 1 deletion(-) > > diff --git a/drivers/ufs/host/ufs-qcom.c b/drivers/ufs/host/ufs-qcom.c > index 30f4ca6..9c0ebbc 100644 > --- a/drivers/ufs/host/ufs-qcom.c > +++ b/drivers/ufs/host/ufs-qcom.c > @@ -475,7 +475,12 @@ static int ufs_qcom_power_up_sequence(struct ufs_hba *hba) > return ret; > } > > - phy_set_mode_ext(phy, mode, host->phy_gear); > + ret = phy_set_mode_ext(phy, mode, host->phy_gear); > + if (ret) { > + dev_err(hba->dev, "%s: phy set mode failed, ret = %d\n", > + __func__, ret); No need to print the error message here as it is already done in the PHY driver. Also, this patch should come before the PHY patch returning error. - Mani > + goto out_disable_phy; > + } > > /* power on phy - start serdes and phy's power and clocks */ > ret = phy_power_on(phy); > -- > 2.7.4 > > -- மணிவண்ணன் சதாசிவம்