Message ID | 20230726134140.7180-2-quic_nitirawa@quicinc.com |
---|---|
State | New |
Headers |
Return-Path: <linux-kernel-owner@vger.kernel.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:a985:0:b0:3e4:2afc:c1 with SMTP id t5csp446689vqo; Wed, 26 Jul 2023 07:35:32 -0700 (PDT) X-Google-Smtp-Source: APBJJlFLzcT/c59JSunmy3eBx/Zyk9K64HWoseemkAkz/7FL/ScNRRHeHS2SvRUmFPWCEUcPwO7U X-Received: by 2002:a05:6a21:47c8:b0:137:3803:33c with SMTP id as8-20020a056a2147c800b001373803033cmr1910627pzc.54.1690382131781; Wed, 26 Jul 2023 07:35:31 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1690382131; cv=none; d=google.com; s=arc-20160816; b=W89v7yxw/4vgVoMZVa8bL5TMpcNjgHPngZKEGKxSNWgjSYOpS05hPF5MiIgCsk1on4 C8Qd3PflEI6m/Nw8mbsypKlajSvLgyzeD8wD5pigOjmPpz/nJf1vFg+oDOrZiZEg4m0M l/aCogLrOCnXOlfQYZ9JfKcoYf2EzByzEwlzZ6J3MKQ2WT+Gk5QCzuWm8Kqk+EnD0rgq iUv+8EZwGdTFRIO+qzB0h9UISAC2xZAGENkFOl/nM8Vow+r5c7ruF1kJhwDLdO1wdMUZ 6UkNxv5SLgaDR5pIIX9vBg8zt6+5Ah1cPNRH1jOPerXNDEwbzfILjUwsw8mpQ/XwQbpo +aJg== 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=6Rtbzl8f2b/zKk6//BhNizcH1rZYFH3VxZICLLh6Dx8=; fh=SZF46NJDpmjJRjNmqZvFOs3JNJCGWSoTLL5wJ/TrF2Q=; b=D5QMhRs9kAAIu8nVK4XrmvkJzuq2nTJ76Ystwov41vDtgNsNmCK85Ag7iSYbtyydWB med9MXh2staAqHRacuzUHwn/SghjUdiBNlnuNtDWeekOu06LSXgejPeJ8aUsill0jNWp 9iilUdy+sw8JnVFaNxZcxKbDMFwFn1Q0aAJ6RXJ7B9by+uzCKOfZ/1R4gCKekM/BrFM3 DRF5ogYLyHdyh2VLjtR0biDR6H/KB23IulEAecFiYPgBbpPev6aHA8Pr720dr9NjMip5 KD+kNGcVzfMTacfJrP5sXwJjIVyfCOTyW0KSkoZTGqFlko+6qj3mZG7A1GPXCjPomfSS /hvw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@quicinc.com header.s=qcppdkim1 header.b=mxZ80FXG; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 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 (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id k13-20020a056a00168d00b0068658355b40si13436680pfc.162.2023.07.26.07.35.17; Wed, 26 Jul 2023 07:35:31 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@quicinc.com header.s=qcppdkim1 header.b=mxZ80FXG; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=quicinc.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234037AbjGZNmp (ORCPT <rfc822;kloczko.tomasz@gmail.com> + 99 others); Wed, 26 Jul 2023 09:42:45 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:50244 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233808AbjGZNmh (ORCPT <rfc822;linux-kernel@vger.kernel.org>); Wed, 26 Jul 2023 09:42:37 -0400 Received: from mx0a-0031df01.pphosted.com (mx0a-0031df01.pphosted.com [205.220.168.131]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 6802CE69; Wed, 26 Jul 2023 06:42:36 -0700 (PDT) Received: from pps.filterd (m0279863.ppops.net [127.0.0.1]) by mx0a-0031df01.pphosted.com (8.17.1.19/8.17.1.19) with ESMTP id 36QCbnj0030980; Wed, 26 Jul 2023 13:41:48 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=6Rtbzl8f2b/zKk6//BhNizcH1rZYFH3VxZICLLh6Dx8=; b=mxZ80FXGWWM9j23yQFeq+lkp+3nMVZM40GEgEjR+txB2MVF5p2w2kduaVAtRuUq3wI+m k3nnLBK4j1trqGvPzvq28/HsiLVhBvQPkqEJlFrse9Tg/J9OR0bxb7GfazBOrYDI8eV+ +tW7TzU4yWiA9jb4SgFy9jOF6y4NPes71M0pyHkssFo00avEbN1YUj4OjlcP5s4raKJJ iy9l62a1qOgC3SLpnRf68YDTJ4xmwkaUJv2qGKupPFfMqpIIcyaggzAi14j+j2WCfg6a bMEKAgwLUyiPUmyK1dCYg5HtYVJiHmIhPSTn1LWgIbfw1p9NMP4h3Wz3ZOSRKFH7M1fc sw== Received: from apblrppmta02.qualcomm.com (blr-bdr-fw-01_GlobalNAT_AllZones-Outside.qualcomm.com [103.229.18.19]) by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 3s336t056m-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Wed, 26 Jul 2023 13:41:48 +0000 Received: from pps.filterd (APBLRPPMTA02.qualcomm.com [127.0.0.1]) by APBLRPPMTA02.qualcomm.com (8.17.1.5/8.17.1.5) with ESMTP id 36QDfiAf017634; Wed, 26 Jul 2023 13:41:44 GMT Received: from pps.reinject (localhost [127.0.0.1]) by APBLRPPMTA02.qualcomm.com (PPS) with ESMTPS id 3s086kxdvp-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO); Wed, 26 Jul 2023 13:41:44 +0000 Received: from APBLRPPMTA02.qualcomm.com (APBLRPPMTA02.qualcomm.com [127.0.0.1]) by pps.reinject (8.17.1.5/8.17.1.5) with ESMTP id 36QDfhMf017626; Wed, 26 Jul 2023 13:41:43 GMT Received: from hu-maiyas-hyd.qualcomm.com (hu-nitirawa-hyd.qualcomm.com [10.213.109.152]) by APBLRPPMTA02.qualcomm.com (PPS) with ESMTP id 36QDfhSO017622; Wed, 26 Jul 2023 13:41:43 +0000 Received: by hu-maiyas-hyd.qualcomm.com (Postfix, from userid 2342877) id 0E343572B96; Wed, 26 Jul 2023 19:11:43 +0530 (+0530) From: Nitin Rawat <quic_nitirawa@quicinc.com> To: powen.kao@mediatek.com, bvanassche@acm.org, alim.akhtar@samsung.com, adrian.hunter@intel.com, jejb@linux.ibm.com, stanley.chu@mediatek.com, asutoshd@codeaurora.org, quic_cang@quicinc.com, mani@kernel.org, martin.petersen@oracle.com, beanhuo@micron.com, ebiggers@google.com, agross@kernel.org, Arthur.Simchaev@wdc.com, konrad.dybcio@linaro.org Cc: quic_ziqichen@quicinc.com, quic_nguyenb@quicinc.com, quic_narepall@quicinc.com, linux-scsi@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-msm@vger.kernel.org, Nitin Rawat <quic_nitirawa@quicinc.com> Subject: [PATCH V2 1/2] scsi: ufs: core: Export ufshcd_is_hba_active Date: Wed, 26 Jul 2023 19:11:39 +0530 Message-Id: <20230726134140.7180-2-quic_nitirawa@quicinc.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20230726134140.7180-1-quic_nitirawa@quicinc.com> References: <20230726134140.7180-1-quic_nitirawa@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-ORIG-GUID: OT4HI2Lz54zOy1GXtAAefMxLy5IjnK3S X-Proofpoint-GUID: OT4HI2Lz54zOy1GXtAAefMxLy5IjnK3S X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.254,Aquarius:18.0.957,Hydra:6.0.591,FMLib:17.11.176.26 definitions=2023-07-26_06,2023-07-26_01,2023-05-22_02 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 phishscore=0 spamscore=0 clxscore=1015 mlxlogscore=954 adultscore=0 lowpriorityscore=0 suspectscore=0 priorityscore=1501 bulkscore=0 impostorscore=0 mlxscore=0 malwarescore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2306200000 definitions=main-2307260121 X-Spam-Status: No, score=-2.5 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, RCVD_IN_DNSWL_LOW,SPF_HELO_NONE,SPF_NONE,T_SCC_BODY_TEXT_LINE, URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: <linux-kernel.vger.kernel.org> X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1772494134164678152 X-GMAIL-MSGID: 1772494134164678152 |
Series |
Fix hibern8 enter failure during host reset
|
|
Commit Message
Nitin Rawat
July 26, 2023, 1:41 p.m. UTC
Export ufshcd_is_hba_active() to allow vendor driver modules
to check the state of host controller.
Signed-off-by: Nitin Rawat <quic_nitirawa@quicinc.com>
---
drivers/ufs/core/ufshcd.c | 3 ++-
include/ufs/ufshcd.h | 1 +
2 files changed, 3 insertions(+), 1 deletion(-)
--
2.17.1
Comments
On Wed, Jul 26, 2023 at 07:11:39PM +0530, Nitin Rawat wrote: > Export ufshcd_is_hba_active() to allow vendor driver modules > to check the state of host controller. > > Signed-off-by: Nitin Rawat <quic_nitirawa@quicinc.com> Acked-by: Manivannan Sadhasivam <mani@kernel.org> - Mani > --- > drivers/ufs/core/ufshcd.c | 3 ++- > include/ufs/ufshcd.h | 1 + > 2 files changed, 3 insertions(+), 1 deletion(-) > > diff --git a/drivers/ufs/core/ufshcd.c b/drivers/ufs/core/ufshcd.c > index 983fae84d9e8..962aa5c1fe69 100644 > --- a/drivers/ufs/core/ufshcd.c > +++ b/drivers/ufs/core/ufshcd.c > @@ -995,10 +995,11 @@ static inline void ufshcd_hba_start(struct ufs_hba *hba) > * > * Returns true if and only if the controller is active. > */ > -static inline bool ufshcd_is_hba_active(struct ufs_hba *hba) > +bool ufshcd_is_hba_active(struct ufs_hba *hba) > { > return ufshcd_readl(hba, REG_CONTROLLER_ENABLE) & CONTROLLER_ENABLE; > } > +EXPORT_SYMBOL_GPL(ufshcd_is_hba_active); > > u32 ufshcd_get_local_unipro_ver(struct ufs_hba *hba) > { > diff --git a/include/ufs/ufshcd.h b/include/ufs/ufshcd.h > index 6dc11fa0ebb1..ef04c3363be8 100644 > --- a/include/ufs/ufshcd.h > +++ b/include/ufs/ufshcd.h > @@ -1398,6 +1398,7 @@ int ufshcd_wb_toggle_buf_flush(struct ufs_hba *hba, bool enable); > int ufshcd_suspend_prepare(struct device *dev); > int __ufshcd_suspend_prepare(struct device *dev, bool rpm_ok_for_spm); > void ufshcd_resume_complete(struct device *dev); > +bool ufshcd_is_hba_active(struct ufs_hba *hba); > > /* Wrapper functions for safely calling variant operations */ > static inline int ufshcd_vops_init(struct ufs_hba *hba) > -- > 2.17.1 >
diff --git a/drivers/ufs/core/ufshcd.c b/drivers/ufs/core/ufshcd.c index 983fae84d9e8..962aa5c1fe69 100644 --- a/drivers/ufs/core/ufshcd.c +++ b/drivers/ufs/core/ufshcd.c @@ -995,10 +995,11 @@ static inline void ufshcd_hba_start(struct ufs_hba *hba) * * Returns true if and only if the controller is active. */ -static inline bool ufshcd_is_hba_active(struct ufs_hba *hba) +bool ufshcd_is_hba_active(struct ufs_hba *hba) { return ufshcd_readl(hba, REG_CONTROLLER_ENABLE) & CONTROLLER_ENABLE; } +EXPORT_SYMBOL_GPL(ufshcd_is_hba_active); u32 ufshcd_get_local_unipro_ver(struct ufs_hba *hba) { diff --git a/include/ufs/ufshcd.h b/include/ufs/ufshcd.h index 6dc11fa0ebb1..ef04c3363be8 100644 --- a/include/ufs/ufshcd.h +++ b/include/ufs/ufshcd.h @@ -1398,6 +1398,7 @@ int ufshcd_wb_toggle_buf_flush(struct ufs_hba *hba, bool enable); int ufshcd_suspend_prepare(struct device *dev); int __ufshcd_suspend_prepare(struct device *dev, bool rpm_ok_for_spm); void ufshcd_resume_complete(struct device *dev); +bool ufshcd_is_hba_active(struct ufs_hba *hba); /* Wrapper functions for safely calling variant operations */ static inline int ufshcd_vops_init(struct ufs_hba *hba)