Received: by 2002:a05:7412:b995:b0:f9:9502:5bb8 with SMTP id it21csp6664831rdb; Tue, 2 Jan 2024 09:05:58 -0800 (PST) X-Google-Smtp-Source: AGHT+IG99+lGqG0R3plJb60fMsKnjpX267LnJm2CaskXGcMtdY21PvACdW5kS741DZVG28jluKzj X-Received: by 2002:a17:903:11d2:b0:1d4:7628:37ee with SMTP id q18-20020a17090311d200b001d4762837eemr6299702plh.121.1704215157898; Tue, 02 Jan 2024 09:05:57 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1704215157; cv=none; d=google.com; s=arc-20160816; b=FCVs3ApP4xkT76vyQ+9NUHlUJwCY7ZVqv3wohNm4WgDWerj3yH/DMbRZmx9ct6bqsS LgAvffOmAjgjMSRTPNeo8wU3u2ijw/gfyWQeO3UF/ounimT3HMpXkEOgY0vkDI1WQf01 iHHeaoTEbxIvuqEvJENO6tBZ+lMWjPa7A1/hawCyUmC2JT1mN0N46ef/pwlr9w2HMI/E OB8mHvbz59hXFgadZwAmwt3JXeuQY4+eGEel12LpOrnXGfkbu4UXbVcvV/qMrbEPbJIR /gSmoAF9p8CKpv1H00O6aVjkO8DTiNVLs2obzPA/fYGPIXd+68DfIQqRaUhsG6ePD+Jk 8xjg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=in-reply-to:content-transfer-encoding:content-disposition :mime-version:list-unsubscribe:list-subscribe:list-id:precedence :references:message-id:subject:cc:to:from:date:dkim-signature; bh=RTdxFGMp/pW37tvuvZjaYcHIiHBMeWkBC0HxUVGNdG8=; fh=sZNQqa1IsHCHVG6KPqK3uHHKZC6mpp2c1tjhEmf4ajQ=; b=yaXJfM2HWwhNMOP7HfTr8GG2A7Y8MC6NLl0MQKpj9rEPS56DE7WHEh5Ih+2kyII/KN puIl+VgjY89CFfFuNjBmdDMzovkD50CrcAkB0Jcztd9mC8cKbXcSLoHR+eYybLsm8z4o KZnSduV+KEwBLsU1KMoo4M0JVgtOVw1P+02Q/hHdmqbkMDZKnBu+vabgiuuk4e5gdXPO hSs6GAaMzt4T2Fa/LRq54jihe6cRrzH6CSUugNXhnPqPn6zj5GC0ggOlhGI1d/atd7TO oFMJMB4ZjvvaxbOpPqk9O9vl/IaPHgCrUHB4uYQSzxD+MH6BoyTbKcQzAqToCw45vbnA NAug== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=Y4kAblgj; spf=pass (google.com: domain of linux-kernel+bounces-14629-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-14629-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [2604:1380:45e3:2400::1]) by mx.google.com with ESMTPS id g5-20020a170902934500b001cfd0495291si20487576plp.524.2024.01.02.09.05.57 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 02 Jan 2024 09:05:57 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-14629-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) client-ip=2604:1380:45e3:2400::1; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=Y4kAblgj; spf=pass (google.com: domain of linux-kernel+bounces-14629-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-14629-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by sv.mirrors.kernel.org (Postfix) with ESMTPS id 8C011283C3C for ; Tue, 2 Jan 2024 17:05:57 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id EA4B415491; Tue, 2 Jan 2024 17:05:48 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="Y4kAblgj" X-Original-To: linux-kernel@vger.kernel.org Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 211AC14F95; Tue, 2 Jan 2024 17:05:47 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 852C1C433C8; Tue, 2 Jan 2024 17:05:42 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1704215147; bh=ALfFTnYOzFxt2eedYpxx3aMSnv8osOGB3dsTiOOMln4=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=Y4kAblgjzJnK7EHbBBctR+s+BfA646q3sfa9WvMw+cLW/R61ewdYFsC2DzbvHEmhb udrKXqm37dVG70e6j/rIi3eL4pj2/Wu+VagnHIvMYbYzORqXYZFWYtBgd8FwNobriA 2DgGt5zK5slNqXRoew5wiAQg5a3V576E6VsNhWXcAgOrX5U8OVfkE62p8oEges3Gb7 Qu5fsJM8RDp69AhqTUEVu0EmYrF/esZ1bNPFTuYx+iDWFiPmDF2Z/hfn5UfAFWqGWZ UHLvdTt/QG4Rm1yukCZTaJD+ovSSTZ3k5cloem5oUO6OAM+MU7zqHjNQN3GWrhN776 rPpDBY9+O2X4A== Date: Tue, 2 Jan 2024 22:35:29 +0530 From: Manivannan Sadhasivam To: Konrad Dybcio Cc: Bjorn Andersson , Lorenzo Pieralisi , Krzysztof =?utf-8?Q?Wilczy=C5=84ski?= , Rob Herring , Bjorn Helgaas , Philipp Zabel , Stanimir Varbanov , Andrew Murray , Vinod Koul , Marijn Suijten , linux-arm-msm@vger.kernel.org, linux-pci@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH 3/4] PCI: qcom: Read back PARF_LTSSM register Message-ID: <20240102170529.GE4917@thinkpad> References: <20231227-topic-8280_pcie-v1-0-095491baf9e4@linaro.org> <20231227-topic-8280_pcie-v1-3-095491baf9e4@linaro.org> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <20231227-topic-8280_pcie-v1-3-095491baf9e4@linaro.org> On Wed, Dec 27, 2023 at 11:17:21PM +0100, Konrad Dybcio wrote: > To ensure write completion, read the PARF_LTSSM register after setting > the LTSSM enable bit before polling for "link up". > > Signed-off-by: Konrad Dybcio I'd consider this as a bug since if the LTSSM write gets cached in Write Buffer, then the polling time becomes wrong in dw_pcie_wait_for_link(), leading to false link_up failure. Although both of the write/read (LTSSM in qcom_pcie_2_3_2_ltssm_enable(), and PCI_EXP_LNKSTA in qcom_pcie_link_up()) belong to PCIe domain, they belong to different regions (PARF, DBI). So I'm not sure we can safely ignore the write completion issue. So, Reviewed-by: Manivannan Sadhasivam - Mani > --- > drivers/pci/controller/dwc/pcie-qcom.c | 1 + > 1 file changed, 1 insertion(+) > > diff --git a/drivers/pci/controller/dwc/pcie-qcom.c b/drivers/pci/controller/dwc/pcie-qcom.c > index a02dc197c495..3d77269e70da 100644 > --- a/drivers/pci/controller/dwc/pcie-qcom.c > +++ b/drivers/pci/controller/dwc/pcie-qcom.c > @@ -540,6 +540,7 @@ static void qcom_pcie_2_3_2_ltssm_enable(struct qcom_pcie *pcie) > val = readl(pcie->parf + PARF_LTSSM); > val |= LTSSM_EN; > writel(val, pcie->parf + PARF_LTSSM); > + readl(pcie->parf + PARF_LTSSM); > } > > static int qcom_pcie_get_resources_2_3_2(struct qcom_pcie *pcie) > > -- > 2.43.0 > -- மணிவண்ணன் சதாசிவம்