Received: by 2002:a05:7412:8d10:b0:f3:1519:9f41 with SMTP id bj16csp2161265rdb; Thu, 7 Dec 2023 23:01:02 -0800 (PST) X-Google-Smtp-Source: AGHT+IGyjdh9NvgNLCyrCBlHBskBcwhti4Cnhu9deu05OWo2ZZRg91nVaF4/2oa+olk6MpUZ1oP8 X-Received: by 2002:a05:6870:6124:b0:1fb:75b:2bba with SMTP id s36-20020a056870612400b001fb075b2bbamr3961783oae.118.1702018861963; Thu, 07 Dec 2023 23:01:01 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1702018861; cv=none; d=google.com; s=arc-20160816; b=McOCh5514PkCfwLTfzi3w2T2Cx8ZHdS/RjwpHD6JK1dxWnUDvog3kCXpDEoDI4DYzB Ja5ewiLrLCY5HeGeHGB8bKoWxFkJ5jQk9KnBfL/9eRmd1MVBsTWgeVouZVtBRf9Ws0od j8jVfZETWozXN+FWlgKHed7HckGrhEL/gO5pNnp15IHcIstdzxRn/mpsjZqlERaCQNA8 G8+iH8754/rBnWGcWH+lH/t32Zf/3oDz3YbHcj0RmCvIv5IRRREsxWHy0fB9eUfmPQLE Tsqoydvu3CrSJ048BKGSBoxx+ysTNB4SszexhZkob0OKLQPJhY9CqlNpAVbr+LI5bAev clSw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=RkWOwl1gLnVxHW9Sk9i4VGOJ3Gf+zYB/UjGbRoXR81c=; fh=3M/8bTCRB16Lsc02X7bSCpILCqUt5UU6Z9lIcVlF+qQ=; b=NTUQZ+dEhKYHw9nfmHziu+9HfNT7KGp/VmT/UvMAdPluPi1AJT8oZrzeEC50vLjg3V t8qDxYPm8LAtIJVR+yDzoZkgliBOFqF+sjIcKSNpIgocHk0WZ8Jx6Wmpg1Ihr4bQykB8 eB53fC0liBVPdLg/SvD3Vcnvu3dbDmc2dDfV0fS3lb6JjD2jynm8vXbApiU/+JTsiFrd 2YmrmB9gpbJEKY6Fzlki5y6SRYG3S76BZ2crzP9/LSOHOsGqNLxsfHrH7b4SFuZGRXpw 9spKv5vS3qa6ATV8TV2JZRaQ8VadRqK9Pbcm/rDQhz0X153/KGLGbE2I1FdPV/QymXvN ukPw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=wmE7sC40; 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=linaro.org Return-Path: Received: from morse.vger.email (morse.vger.email. [23.128.96.31]) by mx.google.com with ESMTPS id 8-20020a631748000000b00565dd108fd4si1037288pgx.115.2023.12.07.23.01.01 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 07 Dec 2023 23:01:01 -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=@linaro.org header.s=google header.b=wmE7sC40; 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=linaro.org Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by morse.vger.email (Postfix) with ESMTP id 6B20B836D60B; Thu, 7 Dec 2023 23:00: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 S233291AbjLHHAH (ORCPT + 99 others); Fri, 8 Dec 2023 02:00:07 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:46190 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235697AbjLHG7q (ORCPT ); Fri, 8 Dec 2023 01:59:46 -0500 Received: from mail-pl1-x630.google.com (mail-pl1-x630.google.com [IPv6:2607:f8b0:4864:20::630]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 1A8DE173F for ; Thu, 7 Dec 2023 22:59:52 -0800 (PST) Received: by mail-pl1-x630.google.com with SMTP id d9443c01a7336-1d1e1edb10bso16237245ad.1 for ; Thu, 07 Dec 2023 22:59:52 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1702018791; x=1702623591; darn=vger.kernel.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=RkWOwl1gLnVxHW9Sk9i4VGOJ3Gf+zYB/UjGbRoXR81c=; b=wmE7sC409h0Z1AqzsfGRreFRBGN9XqN7GgJKdxVly1q2zyWBByCUtVJEoGQcYc5TFN OqXM+odAuee2nH+pe2dqXLKwx9fFUKHsjWOCAMRO6wg/3NtKKfak2UmfpFqK5CLAj65Y n+M0cBeSYXis8tiN4jPERzm0tXbkVMMCH1RgDrh715roDpTeRJcI3QlDH4dkVGk3PiiS LVZz17f5Jvxt642jhNrRyRcxm+rYDGUFNNXtboBflfvxsFtq3gr6X7LrbbdtoCnCsPsH m3ul8303tWm6G6+7MgCWfXuKkK/faqrrVS6j4XPNvj6b3552RUlb50Ej8AGG3D3fMq5I Eq2A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1702018791; x=1702623591; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=RkWOwl1gLnVxHW9Sk9i4VGOJ3Gf+zYB/UjGbRoXR81c=; b=T/Cs/5jSoOiJ3V7t5R8NGdVRJJQ2vIZcwrnwECWufrFCVaphllzckANe8YFmppPZih 0tCC7JMp7fSr/xOXRb/kMz4P7Vos5/o0Xys7v97vIpgilLf1ZqYOL7VAN9VHTSECTHPy BV9JhNcLiOi3Dlqi7G5HCjNnNBV6ArQ614zGJKzz3y/ZUSh1FYUnC/guBzGBe48NiCSS GvGNs2LUn89FfYLhdNmGcViGrBVhQDz6qupyzG2X4cVrgeasev6V7fA522SjuDzgpaVj LtVGc8T2wwbnXwu9ObTCSXiYeIEUhUbArZsEvOEQJPMnEotya1putxFQTZfHpcLlopNR BbAA== X-Gm-Message-State: AOJu0YzWNsZ2gyg0vyeCAtyGRc7gzpGKd4aF5QcDyyy91k/TEZU90qMn PzxWkyBTJwjX4apmKtQI1gHB X-Received: by 2002:a17:902:8d85:b0:1d0:6ffd:e2d8 with SMTP id v5-20020a1709028d8500b001d06ffde2d8mr3844469plo.114.1702018791539; Thu, 07 Dec 2023 22:59:51 -0800 (PST) Received: from localhost.localdomain ([117.216.123.142]) by smtp.gmail.com with ESMTPSA id n8-20020a170902e54800b001b03f208323sm934263plf.64.2023.12.07.22.59.47 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 07 Dec 2023 22:59:51 -0800 (PST) From: Manivannan Sadhasivam To: martin.petersen@oracle.com, jejb@linux.ibm.com Cc: andersson@kernel.org, konrad.dybcio@linaro.org, linux-arm-msm@vger.kernel.org, linux-scsi@vger.kernel.org, linux-kernel@vger.kernel.org, quic_cang@quicinc.com, ahalaney@redhat.com, quic_nitirawa@quicinc.com, Manivannan Sadhasivam Subject: [PATCH v2 07/17] scsi: ufs: qcom: Fail ufs_qcom_power_up_sequence() when core_reset fails Date: Fri, 8 Dec 2023 12:28:52 +0530 Message-Id: <20231208065902.11006-8-manivannan.sadhasivam@linaro.org> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20231208065902.11006-1-manivannan.sadhasivam@linaro.org> References: <20231208065902.11006-1-manivannan.sadhasivam@linaro.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit 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]); Thu, 07 Dec 2023 23:00:37 -0800 (PST) Even though core_reset is optional, a failure during assert/deassert should be considered fatal, if core_reset is available. So fail ufs_qcom_power_up_sequence() if an error happens during reset and also get rid of the redundant warning as the ufs_qcom_host_reset() function itself prints error messages. Reviewed-by: Andrew Halaney Signed-off-by: Manivannan Sadhasivam --- drivers/ufs/host/ufs-qcom.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/drivers/ufs/host/ufs-qcom.c b/drivers/ufs/host/ufs-qcom.c index 604273a22afd..365a61dbf7ea 100644 --- a/drivers/ufs/host/ufs-qcom.c +++ b/drivers/ufs/host/ufs-qcom.c @@ -317,9 +317,11 @@ static int ufs_qcom_host_reset(struct ufs_hba *hba) usleep_range(200, 210); ret = reset_control_deassert(host->core_reset); - if (ret) + if (ret) { dev_err(hba->dev, "%s: core_reset deassert failed, err = %d\n", __func__, ret); + return ret; + } usleep_range(1000, 1100); @@ -359,8 +361,7 @@ static int ufs_qcom_power_up_sequence(struct ufs_hba *hba) /* Reset UFS Host Controller and PHY */ ret = ufs_qcom_host_reset(hba); if (ret) - dev_warn(hba->dev, "%s: host reset returned %d\n", - __func__, ret); + return ret; /* phy initialization - calibrate the phy */ ret = phy_init(phy); -- 2.25.1