Received: by 2002:a05:7412:b10a:b0:f3:1519:9f41 with SMTP id az10csp145378rdb; Thu, 30 Nov 2023 00:20:31 -0800 (PST) X-Google-Smtp-Source: AGHT+IFxUZtnoMTcl/+a/u2waf5Q+8IhcaEO84qs+99uGjVL+QjtzGj0AdMOL121odW4vRG/ExHU X-Received: by 2002:a92:c90d:0:b0:35c:c02b:f00b with SMTP id t13-20020a92c90d000000b0035cc02bf00bmr13070295ilp.19.1701332430678; Thu, 30 Nov 2023 00:20:30 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1701332430; cv=none; d=google.com; s=arc-20160816; b=RWw7FKvRFMLy+ApH3Klr5tRKbjU4mklWtk2htcFARR/F1hV1EcorLxN1nR4JDcb0D2 VJKgwY/6k1XMOVYwTqvQAZEj0iX3P8ZRMD0ISHIK8/6r5NZnMCG0hrxEJaXOXszF+tQt N+K4lp9GeV5Fh3JVvKhmuSGGSdtIlxJ7aHRHZnpNvozbHvteNFU8+c/OSislGLJKDhfp WmwJ/rj8phl1IkMwBJVu63fHdPHRkFuLbFeWnSShTta4D/imCap6qls6ri95TTlBOXMF crpEj5oj3wSdgLBJvZYauqVUB+eYYFHKj6Oc6ZAHANCSKRC129N1hArj4LCmg21imeEA qPrw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:in-reply-to:from :references:cc:to:content-language:subject:user-agent:mime-version :date:message-id:dkim-signature; bh=CFr8q8JGPSUgsIAWzotT9fOS873jpyhDs4xuFKlAlqg=; fh=zKeZKV7m8RL4T/hGameio7kNSsQk0FMDz11cgD/wU3A=; b=l5EgphAp92nTK4I+aGJljzvBzZZ3aUKd1xcZSaJtkPVdIM5YV0pesjX2QAa7VT3r8I faCKJDUPhdwCQ55rFZoxMRbRg84QKWVVkoZ4cb9fMZqQcwDvNXeWnmodChJc6jRfVDyA LCVuBn9x4K0B0HMXuhkCRtwZElxegeYvE/Gyn70g4UH9Le+sbQW0kr9AOFwJTVi/Fjk8 n99hGQaQ6q+NaVfZ5zqPTnk6xwtQpd9ZFg+rPnD3AMWsAt+ZAigkSVAy8q7QtlGe/90L WM2522xZwllcyyaBwI/RurWVUmfpGs0FCmGzgUvSTTubIWMJSEjLjXkPrdHcQqmtnpRP Yyrw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@quicinc.com header.s=qcppdkim1 header.b=DckYJDVE; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.36 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=quicinc.com Return-Path: Received: from pete.vger.email (pete.vger.email. [23.128.96.36]) by mx.google.com with ESMTPS id h128-20020a636c86000000b005789f552066si847467pgc.335.2023.11.30.00.20.30 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 30 Nov 2023 00:20:30 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.36 as permitted sender) client-ip=23.128.96.36; Authentication-Results: mx.google.com; dkim=pass header.i=@quicinc.com header.s=qcppdkim1 header.b=DckYJDVE; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.36 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=quicinc.com Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by pete.vger.email (Postfix) with ESMTP id 5B4538025C82; Thu, 30 Nov 2023 00:20:27 -0800 (PST) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.11 at pete.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229758AbjK3IUN (ORCPT + 99 others); Thu, 30 Nov 2023 03:20:13 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:55778 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229596AbjK3IUL (ORCPT ); Thu, 30 Nov 2023 03:20:11 -0500 Received: from mx0a-0031df01.pphosted.com (mx0a-0031df01.pphosted.com [205.220.168.131]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 96706D50; Thu, 30 Nov 2023 00:20:17 -0800 (PST) Received: from pps.filterd (m0279862.ppops.net [127.0.0.1]) by mx0a-0031df01.pphosted.com (8.17.1.19/8.17.1.19) with ESMTP id 3AU608HW006448; Thu, 30 Nov 2023 08:19:58 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=quicinc.com; h=message-id : date : mime-version : subject : to : cc : references : from : in-reply-to : content-type : content-transfer-encoding; s=qcppdkim1; bh=CFr8q8JGPSUgsIAWzotT9fOS873jpyhDs4xuFKlAlqg=; b=DckYJDVEgmqMptZxKw8WQ2BqD+g+Ki+JLPF+GcBG/drU9F7fU5byqaIA5kzRUdYAKKTn CpoLqMup3oYthEtjNVlSOs0sNc+KLSBXACF83ONEGlRc58OwstRtLu0DQumzhpnVvvyY P83VpFNVqfRpeQ6yst0LZB9vELIgcGdXsLwkU/bPVZutD0IxGrXHnRBNLv5c8Dh2ov+1 k6LfkGwHD2p9xu+PfCXALYk6O2BvQHCizwIMvfnZSrskd4fWAhWy/3DvxiGJAz/MCeGJ N2GE0ngmdbYUNNraGJYCPdbvD35BPXdoX7b+ydfOpFyMAkkFHP/YwZhW2nE1iCdYiFGG eA== Received: from nalasppmta02.qualcomm.com (Global_NAT1.qualcomm.com [129.46.96.20]) by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 3upjsqrnwb-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Thu, 30 Nov 2023 08:19:58 +0000 Received: from nalasex01a.na.qualcomm.com (nalasex01a.na.qualcomm.com [10.47.209.196]) by NALASPPMTA02.qualcomm.com (8.17.1.5/8.17.1.5) with ESMTPS id 3AU8Jvgi011676 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Thu, 30 Nov 2023 08:19:57 GMT Received: from [10.253.11.15] (10.80.80.8) by nalasex01a.na.qualcomm.com (10.47.209.196) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.1118.40; Thu, 30 Nov 2023 00:19:54 -0800 Message-ID: <0124c9da-3179-476a-9a92-71f85a62fd17@quicinc.com> Date: Thu, 30 Nov 2023 16:19:52 +0800 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH v6 09/10] scsi: ufs: ufs-qcom: Check return value of phy_set_mode_ext() Content-Language: en-US To: Manivannan Sadhasivam CC: , , , , , , , , , Andy Gross , Bjorn Andersson , Konrad Dybcio , "James E.J. Bottomley" , open list References: <1701246516-11626-1-git-send-email-quic_cang@quicinc.com> <1701246516-11626-10-git-send-email-quic_cang@quicinc.com> <20231130071617.GH3043@thinkpad> From: Can Guo In-Reply-To: <20231130071617.GH3043@thinkpad> Content-Type: text/plain; charset="UTF-8"; format=flowed Content-Transfer-Encoding: 7bit X-Originating-IP: [10.80.80.8] X-ClientProxiedBy: nasanex01a.na.qualcomm.com (10.52.223.231) To nalasex01a.na.qualcomm.com (10.47.209.196) X-QCInternal: smtphost X-Proofpoint-Virus-Version: vendor=nai engine=6200 definitions=5800 signatures=585085 X-Proofpoint-GUID: jZd8v2KZZOkkB7v_qQ1KILXqpP1pgwYF X-Proofpoint-ORIG-GUID: jZd8v2KZZOkkB7v_qQ1KILXqpP1pgwYF X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.272,Aquarius:18.0.997,Hydra:6.0.619,FMLib:17.11.176.26 definitions=2023-11-30_06,2023-11-29_01,2023-05-22_02 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 phishscore=0 priorityscore=1501 bulkscore=0 spamscore=0 mlxlogscore=999 malwarescore=0 suspectscore=0 adultscore=0 clxscore=1015 lowpriorityscore=0 mlxscore=0 impostorscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2311060000 definitions=main-2311300061 X-Spam-Status: No, score=-0.9 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,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 pete.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 (pete.vger.email [0.0.0.0]); Thu, 30 Nov 2023 00:20:27 -0800 (PST) On 11/30/2023 3:16 PM, Manivannan Sadhasivam wrote: > 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. Sure. Thanks, Can Guo. > > - Mani > >> + goto out_disable_phy; >> + } >> >> /* power on phy - start serdes and phy's power and clocks */ >> ret = phy_power_on(phy); >> -- >> 2.7.4 >> >> >