Received: by 2002:a05:7412:419a:b0:f3:1519:9f41 with SMTP id i26csp4419707rdh; Wed, 29 Nov 2023 00:29:43 -0800 (PST) X-Google-Smtp-Source: AGHT+IExl0JADheKxGsj/hyZqk2+6qmdFfmIra+60OpGThOLxvezEwsWGLbfMtKCpkiuzcTLQci4 X-Received: by 2002:a17:902:ce84:b0:1cf:c42d:4f10 with SMTP id f4-20020a170902ce8400b001cfc42d4f10mr13388716plg.69.1701246582691; Wed, 29 Nov 2023 00:29:42 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1701246582; cv=none; d=google.com; s=arc-20160816; b=xGmBzj4XlbfNnoFUVpL+6nUAOlfZpqVMDAD7jLTBETJHiyh+CBDz4+/zwPmA9JgL7w 1SLOirTen6xVmm+7DFBcwo1OQsTvJRPoq1g5Jl3ukBrRGlS2NTdp9ddEPGKZzAcaM5qn oYq1fY0pC6/PzNq8m4FgJHN8SpEx8turxmx7JIYvjH4pateD78wUHLGBn735IO9xQMKb Ev5Yi8IdTnCYLJD/8ERwu5Vl5pzUpTvgkuLqt6UNrjTyk4wpdXwcgw3JQkxa8XtnIr8a UTm2TeuRkaBNAPV90es2r5GSJB3ZXF1qcOWB+qW/YwPjTLGSaJugfQws3tvrIVdSFFnO RJ3Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:references:in-reply-to:message-id:date:subject :cc:to:from:dkim-signature; bh=IOyf33US+gSCzelwMgTg6dIf2ThMvbvb70K94drusfs=; fh=GfW6IokojBSM2WalA9WiQDdU1UuM8RK2I83+Pwj1klU=; b=k0LZU7LF61f8ydeHXIMBSjBOUgqdpu3Mo4lnOtnEC6Ht5JiU2oy7/N6Gp0z+XrMcmi 6WUzMXMxsbFY7q1qAdG5brr+M1yVTzXL6wx3en8iZn0ch2Eqb9Dbeq8fsyr+ehQk7H3x 6tb53hi0RWY7vKPbaFtaLRAZdZuu8ITdqYLc1MZ3Xb/TJffj1RGTS+Lc2LJwEDJ6Ppuz /NP09yXIzTqG9hVQ7vCVYgCGqdsb5oObjmhBKH9TfNwa/M2DWSvnaNmillfqx5mDcBVp IEn+B5clpGkTbnnFCJqac19mPAuYD7VgpHGt1X1kpNg8g35rUzkCc8ixqS15r2a+/Ocb 4P1A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@quicinc.com header.s=qcppdkim1 header.b=AsvC5fr6; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.31 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 morse.vger.email (morse.vger.email. [23.128.96.31]) by mx.google.com with ESMTPS id l8-20020a170902f68800b001cc5f995bccsi13895536plg.182.2023.11.29.00.29.42 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 29 Nov 2023 00:29:42 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.31 as permitted sender) client-ip=23.128.96.31; Authentication-Results: mx.google.com; dkim=pass header.i=@quicinc.com header.s=qcppdkim1 header.b=AsvC5fr6; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.31 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 morse.vger.email (Postfix) with ESMTP id 0827B8034631; Wed, 29 Nov 2023 00:29:40 -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 S232422AbjK2I3Y (ORCPT + 99 others); Wed, 29 Nov 2023 03:29:24 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:46578 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232318AbjK2I3O (ORCPT ); Wed, 29 Nov 2023 03:29:14 -0500 Received: from mx0a-0031df01.pphosted.com (mx0a-0031df01.pphosted.com [205.220.168.131]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 0273719B9; Wed, 29 Nov 2023 00:29:21 -0800 (PST) Received: from pps.filterd (m0279865.ppops.net [127.0.0.1]) by mx0a-0031df01.pphosted.com (8.17.1.19/8.17.1.19) with ESMTP id 3AT4oxCQ019477; Wed, 29 Nov 2023 08:29:08 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=quicinc.com; h=from : to : cc : subject : date : message-id : in-reply-to : references; s=qcppdkim1; bh=IOyf33US+gSCzelwMgTg6dIf2ThMvbvb70K94drusfs=; b=AsvC5fr62AVRUTkAqsoqLVV4m2yTjjuy3t4TNG0Rm52ebCXjfxx6dzWrzArcGA8rMzRx cF9CyiTZJO/0G8q3TiCXUo9BDfRZAC6j1ZJ5k2XAMiUC4rACdENM4jiDECffdTZOOmuC Lw2iM0566ciZpgt+Nt4sT+fARsYZzEkDRqyP/MLmYGIRO3Dv5QIQKwFyQfDGxhUxouxc fVF4q+epwRZBL1jN2BWkuNswoCNpRE/PNduEGrmZFARcV2Nshf/Ot7DedOYz7001vR2a k55BcRADQDjyqgK8aQqEiIkPQISWuNpQU0DrG3VoWe4z/3XsWI9fJS6lpbhpqQZVuR/S XA== Received: from nasanppmta02.qualcomm.com (i-global254.qualcomm.com [199.106.103.254]) by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 3unkent3e4-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Wed, 29 Nov 2023 08:29:07 +0000 Received: from pps.filterd (NASANPPMTA02.qualcomm.com [127.0.0.1]) by NASANPPMTA02.qualcomm.com (8.17.1.5/8.17.1.5) with ESMTP id 3AT8AdGQ032698; Wed, 29 Nov 2023 08:29:07 GMT Received: from pps.reinject (localhost [127.0.0.1]) by NASANPPMTA02.qualcomm.com (PPS) with ESMTP id 3unmevpydm-1; Wed, 29 Nov 2023 08:29:07 +0000 Received: from NASANPPMTA02.qualcomm.com (NASANPPMTA02.qualcomm.com [127.0.0.1]) by pps.reinject (8.17.1.5/8.17.1.5) with ESMTP id 3AT8RJcZ024746; Wed, 29 Nov 2023 08:29:07 GMT Received: from stor-dylan.qualcomm.com (stor-dylan.qualcomm.com [192.168.140.207]) by NASANPPMTA02.qualcomm.com (PPS) with ESMTP id 3AT8T6Ac027817; Wed, 29 Nov 2023 08:29:06 +0000 Received: by stor-dylan.qualcomm.com (Postfix, from userid 359480) id 8EC7320A5D; Wed, 29 Nov 2023 00:29:06 -0800 (PST) From: Can Guo To: quic_cang@quicinc.com, bvanassche@acm.org, mani@kernel.org, adrian.hunter@intel.com, cmd4@qualcomm.com, beanhuo@micron.com, avri.altman@wdc.com, junwoo80.lee@samsung.com, martin.petersen@oracle.com Cc: linux-scsi@vger.kernel.org, linux-arm-msm@vger.kernel.org, Andy Gross , Bjorn Andersson , Konrad Dybcio , "James E.J. Bottomley" , linux-kernel@vger.kernel.org (open list) Subject: [PATCH v6 09/10] scsi: ufs: ufs-qcom: Check return value of phy_set_mode_ext() Date: Wed, 29 Nov 2023 00:28:34 -0800 Message-Id: <1701246516-11626-10-git-send-email-quic_cang@quicinc.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1701246516-11626-1-git-send-email-quic_cang@quicinc.com> References: <1701246516-11626-1-git-send-email-quic_cang@quicinc.com> X-QCInternal: smtphost X-QCInternal: smtphost X-Proofpoint-Virus-Version: vendor=nai engine=6200 definitions=5800 signatures=585085 X-Proofpoint-Virus-Version: vendor=nai engine=6200 definitions=5800 signatures=585085 X-Proofpoint-GUID: zncicgKQdt9qvqwxTCiyHAJ8v8bSW5mj X-Proofpoint-ORIG-GUID: zncicgKQdt9qvqwxTCiyHAJ8v8bSW5mj 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-29_06,2023-11-27_01,2023-05-22_02 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 malwarescore=0 suspectscore=0 impostorscore=0 mlxscore=0 phishscore=0 spamscore=0 priorityscore=1501 bulkscore=0 mlxlogscore=999 lowpriorityscore=0 adultscore=0 clxscore=1015 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2311060000 definitions=main-2311290062 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 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 00:29:40 -0800 (PST) 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); + goto out_disable_phy; + } /* power on phy - start serdes and phy's power and clocks */ ret = phy_power_on(phy); -- 2.7.4