From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-pg1-f172.google.com (mail-pg1-f172.google.com [209.85.215.172]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 601FE5C61D for ; Thu, 14 Mar 2024 07:22:20 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.215.172 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1710400942; cv=none; b=P228Z1T2LIVcO01ScOhRXUN5bDU3gBJuFb7iOdSaMr/yT8zK6PJVl7HcDr+f7X2rOXT66U6uPpotmPU5zgVJ3I1AX571FnhM8pdPemORiCzG9CY4EZZLPeCvpOdI9H8KwMH4fzwYRZRYN4pYopZTZifxNrjIMBj6Z/8LLwbDpAo= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1710400942; c=relaxed/simple; bh=n+DhiitdzCy6PlCjUMm0H6SMuSpk93mlHftoxOwzpbs=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=ESMdi//9wNAKW3AEufyayAEuBrbvnXoOfinZ3F00ldvPhr1snFoS0QLhxu8ocqrAVRr7c6fXZRyjd5cg1ybA49Wnr/PeCdMNLAbqNJtdREQACuI6QJgf/4Qtv6yVgwTAlUnkLdxWKEyKa47+SqzbFcSWY7ey13OLhkfKZ1TZvm8= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linaro.org; spf=pass smtp.mailfrom=linaro.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b=MaCuFtT1; arc=none smtp.client-ip=209.85.215.172 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linaro.org Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linaro.org Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b="MaCuFtT1" Received: by mail-pg1-f172.google.com with SMTP id 41be03b00d2f7-5cdbc4334edso391930a12.3 for ; Thu, 14 Mar 2024 00:22:20 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1710400940; x=1711005740; darn=vger.kernel.org; h=in-reply-to:content-transfer-encoding:content-disposition :mime-version:references:message-id:subject:cc:to:from:date:from:to :cc:subject:date:message-id:reply-to; bh=2Hg0QBhHNwXtR+/hf03RzKTokT9XhPWy1qXzqNjgPKw=; b=MaCuFtT1txVGTv/VHGoD12w6G1l1lilNPoJLxc9Mk27j4Jp4utucTNyi1EL6HOWA6j MSkMPEw4ssLdo7mU9dzwbWTuxa8hmpPh1hxPQCs4tgCv/X00ByHGlkrQKfwQ7j8x/WWg tLFGtQl9FnGQ7yJapj4cA5ye1BTBUBUex34N/xMBspTE29YTDLZxveNwisQ7DUdBtjI7 jbS5QvJQollqjBeM3P0l8GF1A6BJlbyoML1JQKzZm/FG8PgrcVIB5Y3n07ZbDMWmO+vw /EBarJNjanR9EVg0u3psNGmouCfyv3Gaq0T4y70IiXbR4XH8jjZGl3oeGNVf5LfEFw/P mdlQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1710400940; x=1711005740; h=in-reply-to:content-transfer-encoding:content-disposition :mime-version:references:message-id:subject:cc:to:from:date :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=2Hg0QBhHNwXtR+/hf03RzKTokT9XhPWy1qXzqNjgPKw=; b=b3XYEU3wsjcqEgRFO748NRPtmCcrvxTIvrf1ZdpbENPzLIxx4Ksuf2bKWICgVMsl9w QZTwcYKC3oMmEswmV9EQZhkV84Yhrguvekd70HmkkvgxZQ47BecmbDJfv2HyFz1FQsju 5LCn+Po9JJ4vfS2rtpvEi32Q6YpATycZkDaftNdYDtdXyxxOyHONYyXA+fJB3I9mUJMu nUI5Bul0mKWyXH9l1NVyC2Ikc6meayOiTeH1czYdW9qEoFiAV59cZtnXaBrsdk8KgGcR AEdbQLXEAlFLvTj+gANunVH/L4Wx7K5URGZQ5C9fcMAQu5a2y8Nm50vbzW8taKTLn0UJ 8RdA== X-Forwarded-Encrypted: i=1; AJvYcCV16HGZRBHS75n3vhLNDpCop+SFR0THeemm2P3E9i7sq3JTXqqHVQL3+v4k8jZWiI/xMu1hB5rx/EasU167Hu98W/i1ZxYq5HenRs2Ykw== X-Gm-Message-State: AOJu0YzWgsjAjEJGDlmb+L0HHJAclyl+XNeAYGol830US3QT5UYdgobh rpflCo2Hx4/P/Y8eJBpVNxBYbUEyC/h+yPlXECvAF/hO7zRWOwEjaftEzTf/Aw== X-Google-Smtp-Source: AGHT+IF/X3aYAW3IYlU6wCv/eec5+n3yuANXgesmj7Xvw84faSW1oJcJKTyrIR8e5yfg2eATFcw1LQ== X-Received: by 2002:a17:902:7594:b0:1dc:cc77:5668 with SMTP id j20-20020a170902759400b001dccc775668mr937645pll.51.1710400939560; Thu, 14 Mar 2024 00:22:19 -0700 (PDT) Received: from thinkpad ([117.207.30.211]) by smtp.gmail.com with ESMTPSA id c7-20020a170902d48700b001dddeb10d83sm881090plg.223.2024.03.14.00.22.10 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 14 Mar 2024 00:22:19 -0700 (PDT) Date: Thu, 14 Mar 2024 12:52:07 +0530 From: Manivannan Sadhasivam To: Niklas Cassel Cc: Jingoo Han , Gustavo Pimentel , Lorenzo Pieralisi , Krzysztof =?utf-8?Q?Wilczy=C5=84ski?= , Rob Herring , Bjorn Helgaas , Marek Vasut , Yoshihiro Shimoda , Thierry Reding , Jonathan Hunter , Kishon Vijay Abraham I , Vidya Sagar , Vignesh Raghavendra , Richard Zhu , Lucas Stach , Shawn Guo , Sascha Hauer , Pengutronix Kernel Team , Fabio Estevam , NXP Linux Team , Minghuan Lian , Mingkai Hu , Roy Zang , Kunihiko Hayashi , Masami Hiramatsu , Kishon Vijay Abraham I , Jesper Nilsson , Srikanth Thokala , linux-pci@vger.kernel.org, linux-kernel@vger.kernel.org, linux-renesas-soc@vger.kernel.org, linux-arm-msm@vger.kernel.org, linux-tegra@vger.kernel.org, linux-omap@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linuxppc-dev@lists.ozlabs.org, linux-arm-kernel@axis.com Subject: Re: [PATCH v9 06/10] PCI: dwc: ep: Call dw_pcie_ep_init_registers() API directly from all glue drivers Message-ID: <20240314072207.GC4831@thinkpad> References: <20240304-pci-dbi-rework-v9-0-29d433d99cda@linaro.org> <20240304-pci-dbi-rework-v9-6-29d433d99cda@linaro.org> <20240308053624.GB3789@thinkpad> <20240308094947.GH3789@thinkpad> Precedence: bulk X-Mailing-List: linux-arm-msm@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: On Fri, Mar 08, 2024 at 11:22:52AM +0100, Niklas Cassel wrote: > On Fri, Mar 08, 2024 at 03:19:47PM +0530, Manivannan Sadhasivam wrote: > > > > > > @@ -467,6 +467,13 @@ static int dra7xx_add_pcie_ep(struct dra7xx_pcie *dra7xx, > > > > > > return ret; > > > > > > } > > > > > > > > > > > > + ret = dw_pcie_ep_init_registers(ep); > > > > > > + if (ret) { > > > > > > > > > > Here you are using if (ret) to error check the return from > > > > > dw_pcie_ep_init_registers(). > > > > > > > > > > > > > > > > index c0c62533a3f1..8392894ed286 100644 > > > > > > --- a/drivers/pci/controller/dwc/pci-keystone.c > > > > > > +++ b/drivers/pci/controller/dwc/pci-keystone.c > > > > > > @@ -1286,6 +1286,13 @@ static int ks_pcie_probe(struct platform_device *pdev) > > > > > > ret = dw_pcie_ep_init(&pci->ep); > > > > > > if (ret < 0) > > > > > > goto err_get_sync; > > > > > > + > > > > > > + ret = dw_pcie_ep_init_registers(&pci->ep); > > > > > > + if (ret < 0) { > > > > > > > > > > Here you are using if (ret < 0) to error check the return from > > > > > dw_pcie_ep_init_registers(). Please be consistent. > > > > > > > > > > > > > I maintained the consistency w.r.t individual drivers. Please check them > > > > individually. > > > > > > > > If I maintain consistency w.r.t this patch, then the style will change within > > > > the drivers. > > > > > > Personally, I disagree with that. > > > > > > All glue drivers should use the same way of checking dw_pcie_ep_init(), > > > depending on the kdoc of dw_pcie_ep_init(). > > > > > > If the kdoc for dw_pcie_ep_init() says returns 0 on success, > > > then I think that it is strictly more correct to do: > > > > > > ret = dw_pcie_ep_init() > > > if (ret) { > > > > > > } > > > > > > And if a glue driver doesn't look like that, then I think we should change > > > them. (Same reasoning for dw_pcie_ep_init_registers().) > > > > > > > > > If you read code that looks like: > > > ret = dw_pcie_ep_init() > > > if (ret < 0) { > > > > > > } > > > > > > then you assume that is is a function with a kdoc that says it can return 0 > > > or a positive value on success, e.g. a function that returns an index in an > > > array. > > > > > > > But if you read the same function from the individual drivers, it could present > > a different opinion because the samantics is different than others. > > Is there any glue driver where a positive result from dw_pcie_ep_init() is > considered valid? > > > > > > I'm not opposed to keeping the API semantics consistent, but we have to take > > account of the drivers style as well. > > kdoc > "driver style" > IMO, but you are the maintainer, I just offered my 50 cents :) > Those valuable 50 cents :) Looking at it again, I think you are right. We should honor the API over driver's own style. I've changed the semantics in next version, thanks! - Mani -- மணிவண்ணன் சதாசிவம் From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from lists.ozlabs.org (lists.ozlabs.org [112.213.38.117]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 563E8C54E5D for ; Thu, 14 Mar 2024 07:23:05 +0000 (UTC) Authentication-Results: lists.ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=linaro.org header.i=@linaro.org header.a=rsa-sha256 header.s=google header.b=urDwczyI; dkim-atps=neutral Received: from boromir.ozlabs.org (localhost [IPv6:::1]) by lists.ozlabs.org (Postfix) with ESMTP id 4TwJkb6W9Kz3vXB for ; Thu, 14 Mar 2024 18:23:03 +1100 (AEDT) Authentication-Results: lists.ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=linaro.org header.i=@linaro.org header.a=rsa-sha256 header.s=google header.b=urDwczyI; dkim-atps=neutral Authentication-Results: lists.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=linaro.org (client-ip=2607:f8b0:4864:20::636; helo=mail-pl1-x636.google.com; envelope-from=manivannan.sadhasivam@linaro.org; receiver=lists.ozlabs.org) Received: from mail-pl1-x636.google.com (mail-pl1-x636.google.com [IPv6:2607:f8b0:4864:20::636]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by lists.ozlabs.org (Postfix) with ESMTPS id 4TwJjp5cZfz30hQ for ; Thu, 14 Mar 2024 18:22:22 +1100 (AEDT) Received: by mail-pl1-x636.google.com with SMTP id d9443c01a7336-1dc13fb0133so4766095ad.3 for ; Thu, 14 Mar 2024 00:22:22 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1710400940; x=1711005740; darn=lists.ozlabs.org; h=in-reply-to:content-transfer-encoding:content-disposition :mime-version:references:message-id:subject:cc:to:from:date:from:to :cc:subject:date:message-id:reply-to; bh=2Hg0QBhHNwXtR+/hf03RzKTokT9XhPWy1qXzqNjgPKw=; b=urDwczyIcgEc9YsC4073IW0NXLk2o/pwOk67G8ad1ngwqimD6+k+fvuey/jQodJJbT AT3AlBOmVO1mSl28HsxdwYSDGP6BOC2/q6OAMsaDqrGgK4d89Tz4mQNv0+7yJEFjk+m/ w9L8agtQGuz93qWaSk3pjR5oUHey8J/ChopjA1lINEDxrBjOtJH13O0JOgvN5BG1zKqZ hhok/+AFZ1C/k9D6NW/Q8Iquxh2tPG9Y8XLKTdgtlNP5UR+YofsUOVO6nVwFzpkiORGJ PisZ9XZsUk/hlzIziOZyNEdq4NEetx0/zUBQdiLVd0sog/XKHlB9gKHnqoljHlE3Zgv3 CvYQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1710400940; x=1711005740; h=in-reply-to:content-transfer-encoding:content-disposition :mime-version:references:message-id:subject:cc:to:from:date :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=2Hg0QBhHNwXtR+/hf03RzKTokT9XhPWy1qXzqNjgPKw=; b=WAnMF+6J+/3VBfynblA4jTJizFPxyPl9aFn1hMYxyXcRQnIfZhkRj8gw88Q+3/0fMe ymjpCZqTIihj6CGW3HBdbZg6yE/SymaXBWm8zgDGfYfy5/uU+o9DCeUc4ZFvbs6n7d0f Awc8UW+22/0mnEahTIsRe8P/+5RjQUm+N0YgWxBgVS2G88qOXZNBGaGwtVWFfiWhda9H f0w+l2KkjGEiAGTNCmqISinWgvwCBVu3QbxHxXEsD7EL49dnNAaGXRwgbdR9LUdO5exl tbwxlaWHG8iyvFYoF6A66tFJwlFnHdIqYw5WvBH/01y+vUHaDpseVO3YCzlLvFrzVc1F MQtw== X-Forwarded-Encrypted: i=1; AJvYcCUScI3CIZACaD6WhILhBcrL4YeVn1mLzZyhy0idJUiNnEB/fHP8ebCANrABIRWp3T9ICM7tVntR+UTF5PK/yT+iz+WLXjMrayHk0KAK+w== X-Gm-Message-State: AOJu0YxqJ0M7IY5P4m45sBpjDDI7iD//SlLpO8OvbaA76pQemAHGiD7t eP2HPDiBpHUZMPYKH6GiCoOAv4DmACuprYAQa/ggBS8rskV779qM6nOOW620jg== X-Google-Smtp-Source: AGHT+IF/X3aYAW3IYlU6wCv/eec5+n3yuANXgesmj7Xvw84faSW1oJcJKTyrIR8e5yfg2eATFcw1LQ== X-Received: by 2002:a17:902:7594:b0:1dc:cc77:5668 with SMTP id j20-20020a170902759400b001dccc775668mr937645pll.51.1710400939560; Thu, 14 Mar 2024 00:22:19 -0700 (PDT) Received: from thinkpad ([117.207.30.211]) by smtp.gmail.com with ESMTPSA id c7-20020a170902d48700b001dddeb10d83sm881090plg.223.2024.03.14.00.22.10 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 14 Mar 2024 00:22:19 -0700 (PDT) Date: Thu, 14 Mar 2024 12:52:07 +0530 From: Manivannan Sadhasivam To: Niklas Cassel Subject: Re: [PATCH v9 06/10] PCI: dwc: ep: Call dw_pcie_ep_init_registers() API directly from all glue drivers Message-ID: <20240314072207.GC4831@thinkpad> References: <20240304-pci-dbi-rework-v9-0-29d433d99cda@linaro.org> <20240304-pci-dbi-rework-v9-6-29d433d99cda@linaro.org> <20240308053624.GB3789@thinkpad> <20240308094947.GH3789@thinkpad> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: X-BeenThere: linuxppc-dev@lists.ozlabs.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Linux on PowerPC Developers Mail List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Krzysztof =?utf-8?Q?Wilczy=C5=84ski?= , Vignesh Raghavendra , Kunihiko Hayashi , linux-pci@vger.kernel.org, Lorenzo Pieralisi , Minghuan Lian , Thierry Reding , Kishon Vijay Abraham I , Fabio Estevam , Marek Vasut , Kishon Vijay Abraham I , Rob Herring , Jesper Nilsson , linux-tegra@vger.kernel.org, linux-arm-kernel@axis.com, Jonathan Hunter , NXP Linux Team , Richard Zhu , Srikanth Thokala , linux-arm-msm@vger.kernel.org, Sascha Hauer , linuxppc-dev@lists.ozlabs.org, Bjorn Helgaas , linux-omap@vger.kernel.org, Mingkai Hu , linux-arm-kernel@lists.infradead.org, Roy Zang , Jingoo Han , Yoshihiro Shimoda , linux-kernel@vger.kernel.org, Vidya Sagar , linux-renesas-soc@vger.kernel.org, Masami Hiramatsu , Pengutronix Kernel Team , Gustavo Pimentel , Shawn Guo , Lucas Stach Errors-To: linuxppc-dev-bounces+linuxppc-dev=archiver.kernel.org@lists.ozlabs.org Sender: "Linuxppc-dev" On Fri, Mar 08, 2024 at 11:22:52AM +0100, Niklas Cassel wrote: > On Fri, Mar 08, 2024 at 03:19:47PM +0530, Manivannan Sadhasivam wrote: > > > > > > @@ -467,6 +467,13 @@ static int dra7xx_add_pcie_ep(struct dra7xx_pcie *dra7xx, > > > > > > return ret; > > > > > > } > > > > > > > > > > > > + ret = dw_pcie_ep_init_registers(ep); > > > > > > + if (ret) { > > > > > > > > > > Here you are using if (ret) to error check the return from > > > > > dw_pcie_ep_init_registers(). > > > > > > > > > > > > > > > > index c0c62533a3f1..8392894ed286 100644 > > > > > > --- a/drivers/pci/controller/dwc/pci-keystone.c > > > > > > +++ b/drivers/pci/controller/dwc/pci-keystone.c > > > > > > @@ -1286,6 +1286,13 @@ static int ks_pcie_probe(struct platform_device *pdev) > > > > > > ret = dw_pcie_ep_init(&pci->ep); > > > > > > if (ret < 0) > > > > > > goto err_get_sync; > > > > > > + > > > > > > + ret = dw_pcie_ep_init_registers(&pci->ep); > > > > > > + if (ret < 0) { > > > > > > > > > > Here you are using if (ret < 0) to error check the return from > > > > > dw_pcie_ep_init_registers(). Please be consistent. > > > > > > > > > > > > > I maintained the consistency w.r.t individual drivers. Please check them > > > > individually. > > > > > > > > If I maintain consistency w.r.t this patch, then the style will change within > > > > the drivers. > > > > > > Personally, I disagree with that. > > > > > > All glue drivers should use the same way of checking dw_pcie_ep_init(), > > > depending on the kdoc of dw_pcie_ep_init(). > > > > > > If the kdoc for dw_pcie_ep_init() says returns 0 on success, > > > then I think that it is strictly more correct to do: > > > > > > ret = dw_pcie_ep_init() > > > if (ret) { > > > > > > } > > > > > > And if a glue driver doesn't look like that, then I think we should change > > > them. (Same reasoning for dw_pcie_ep_init_registers().) > > > > > > > > > If you read code that looks like: > > > ret = dw_pcie_ep_init() > > > if (ret < 0) { > > > > > > } > > > > > > then you assume that is is a function with a kdoc that says it can return 0 > > > or a positive value on success, e.g. a function that returns an index in an > > > array. > > > > > > > But if you read the same function from the individual drivers, it could present > > a different opinion because the samantics is different than others. > > Is there any glue driver where a positive result from dw_pcie_ep_init() is > considered valid? > > > > > > I'm not opposed to keeping the API semantics consistent, but we have to take > > account of the drivers style as well. > > kdoc > "driver style" > IMO, but you are the maintainer, I just offered my 50 cents :) > Those valuable 50 cents :) Looking at it again, I think you are right. We should honor the API over driver's own style. I've changed the semantics in next version, thanks! - Mani -- மணிவண்ணன் சதாசிவம் From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 3676CC5475B for ; Thu, 14 Mar 2024 07:22:39 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:In-Reply-To:MIME-Version:References: Message-ID:Subject:Cc:To:From:Date:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=PhAmFgA+PIOCVDCh7gVZtbMRVQpZSkJNyN1t+BYfDKc=; b=r+Fz7Qhpc6v9ZL CiQ/00CvK85KwqCdNDB5yylIj0+5nI9ZA98LRIaggi9vPQ0SjqL3zDlrE7f088+Qu4hanWZ9ya0rn EyYEiqZLiO5YhonLa6o8moyG+iLMKH6nLFB6Uf6lGWr4CZfD9GEG8QnPgR6cW9VwDJ173qq13JzSR ExhJQPP/b03ka9SUzGCyipC/DL6dgyTyl0XKkcHGSWQVlFEGI4cgBD6zFfl/AdO0EnL2Mx9uG1QVM flpxOcgKTs9udDCCfW3JlBNiWYb8cEQOvDH7xaJor0V+r0h3ba2JiDd26VVhORPbprgraTcvV8EwY gBCeI9TSIR2q38CZwwBQ==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1rkfQ2-0000000DNTU-1hOa; Thu, 14 Mar 2024 07:22:26 +0000 Received: from mail-pl1-x632.google.com ([2607:f8b0:4864:20::632]) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1rkfPx-0000000DNPs-0wPV for linux-arm-kernel@lists.infradead.org; Thu, 14 Mar 2024 07:22:22 +0000 Received: by mail-pl1-x632.google.com with SMTP id d9443c01a7336-1dc29f1956cso4450075ad.0 for ; Thu, 14 Mar 2024 00:22:20 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1710400940; x=1711005740; darn=lists.infradead.org; h=in-reply-to:content-transfer-encoding:content-disposition :mime-version:references:message-id:subject:cc:to:from:date:from:to :cc:subject:date:message-id:reply-to; bh=2Hg0QBhHNwXtR+/hf03RzKTokT9XhPWy1qXzqNjgPKw=; b=Ukuji4zVYIuK/EszWWv47cy+bw6I/Nj/bY7J2zfTfdy9LrESGjpEGGTNvXVcg+trde b9VuqjEhxPr2RbxbSb6/JGCD1YE5wBTld1UVokl31b43a1NM8NPteivt11uHZVm6tBdj BTM+X/2EgQWSCIP7FCLucUE0ZYdjVIW7WWo0tX/0MofXQq9eeJe3RqJP6E7UwTUSc04o /N+x5O+jgGatV8gR75fCHbyDxfnsg7p6pgfDzRezXH/ynH4kJkADtv2hn6vZhD0z8M+U mKStIdDtixN4z+nKtEy7L9W+hQTEWUqHenTIAfnYJRwIIRSPQtakqxl70LTHHqDwQl+h cWag== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1710400940; x=1711005740; h=in-reply-to:content-transfer-encoding:content-disposition :mime-version:references:message-id:subject:cc:to:from:date :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=2Hg0QBhHNwXtR+/hf03RzKTokT9XhPWy1qXzqNjgPKw=; b=E5bC3YYFi3C01B7n/OAAn/piuk55+S9K2Xxt9KN0FWtWD6c9dArfz/jhzEvlUBUxwg tQnLFdv6m8s1Wp6EZZV7H3D6g/NIDgykyWplQf0I1U2lXKnBrfcwjdUnX8mAfu+QD0Cg CFZRQt0lpYkUVORWSE/IbY7TiDxFcsSP85R9IyPgoOIgb+GffPn5HeC6tcWBCW9xCTHd nhi8928MmTLkzl4UdymEj2lw1QuJbVeIDAvq2Za90qL/TdBk9teWWKcxqxCHq8D99N7+ yS4eyknaLB3nmgFU+/7GUQWigggQJ5mgjzRoLk9G7PO+bdavesnSvwN7BLqaathuoA8v p7cg== X-Forwarded-Encrypted: i=1; AJvYcCWDCMMrskVbg9cfu/D+Hf2O9nKo5uajkSt38fTPw58XzagSfLxwUTuCVNZnyOE0q2jPqGklJmbCUyFtttZiu937GSsJQs5AU5cBHNWpdS17K5OF7SY= X-Gm-Message-State: AOJu0YwuGSDhHfWmao800NnNlPOmIjMhKLMORDQMXwtRCtyvVDE28jBW wJU60eJC+w8txwdbPphJtXaPeL7GC+baSZNQj6xm71j90F27C8+rN/yiVa1CbQ== X-Google-Smtp-Source: AGHT+IF/X3aYAW3IYlU6wCv/eec5+n3yuANXgesmj7Xvw84faSW1oJcJKTyrIR8e5yfg2eATFcw1LQ== X-Received: by 2002:a17:902:7594:b0:1dc:cc77:5668 with SMTP id j20-20020a170902759400b001dccc775668mr937645pll.51.1710400939560; Thu, 14 Mar 2024 00:22:19 -0700 (PDT) Received: from thinkpad ([117.207.30.211]) by smtp.gmail.com with ESMTPSA id c7-20020a170902d48700b001dddeb10d83sm881090plg.223.2024.03.14.00.22.10 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 14 Mar 2024 00:22:19 -0700 (PDT) Date: Thu, 14 Mar 2024 12:52:07 +0530 From: Manivannan Sadhasivam To: Niklas Cassel Cc: Jingoo Han , Gustavo Pimentel , Lorenzo Pieralisi , Krzysztof =?utf-8?Q?Wilczy=C5=84ski?= , Rob Herring , Bjorn Helgaas , Marek Vasut , Yoshihiro Shimoda , Thierry Reding , Jonathan Hunter , Kishon Vijay Abraham I , Vidya Sagar , Vignesh Raghavendra , Richard Zhu , Lucas Stach , Shawn Guo , Sascha Hauer , Pengutronix Kernel Team , Fabio Estevam , NXP Linux Team , Minghuan Lian , Mingkai Hu , Roy Zang , Kunihiko Hayashi , Masami Hiramatsu , Kishon Vijay Abraham I , Jesper Nilsson , Srikanth Thokala , linux-pci@vger.kernel.org, linux-kernel@vger.kernel.org, linux-renesas-soc@vger.kernel.org, linux-arm-msm@vger.kernel.org, linux-tegra@vger.kernel.org, linux-omap@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linuxppc-dev@lists.ozlabs.org, linux-arm-kernel@axis.com Subject: Re: [PATCH v9 06/10] PCI: dwc: ep: Call dw_pcie_ep_init_registers() API directly from all glue drivers Message-ID: <20240314072207.GC4831@thinkpad> References: <20240304-pci-dbi-rework-v9-0-29d433d99cda@linaro.org> <20240304-pci-dbi-rework-v9-6-29d433d99cda@linaro.org> <20240308053624.GB3789@thinkpad> <20240308094947.GH3789@thinkpad> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240314_002221_410772_F0F9A8C2 X-CRM114-Status: GOOD ( 33.75 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: base64 Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org T24gRnJpLCBNYXIgMDgsIDIwMjQgYXQgMTE6MjI6NTJBTSArMDEwMCwgTmlrbGFzIENhc3NlbCB3 cm90ZToKPiBPbiBGcmksIE1hciAwOCwgMjAyNCBhdCAwMzoxOTo0N1BNICswNTMwLCBNYW5pdmFu bmFuIFNhZGhhc2l2YW0gd3JvdGU6Cj4gPiA+ID4gPiA+IEBAIC00NjcsNiArNDY3LDEzIEBAIHN0 YXRpYyBpbnQgZHJhN3h4X2FkZF9wY2llX2VwKHN0cnVjdCBkcmE3eHhfcGNpZSAqZHJhN3h4LAo+ ID4gPiA+ID4gPiAgCQlyZXR1cm4gcmV0Owo+ID4gPiA+ID4gPiAgCX0KPiA+ID4gPiA+ID4gIAo+ ID4gPiA+ID4gPiArCXJldCA9IGR3X3BjaWVfZXBfaW5pdF9yZWdpc3RlcnMoZXApOwo+ID4gPiA+ ID4gPiArCWlmIChyZXQpIHsKPiA+ID4gPiA+IAo+ID4gPiA+ID4gSGVyZSB5b3UgYXJlIHVzaW5n IGlmIChyZXQpIHRvIGVycm9yIGNoZWNrIHRoZSByZXR1cm4gZnJvbQo+ID4gPiA+ID4gZHdfcGNp ZV9lcF9pbml0X3JlZ2lzdGVycygpLgo+ID4gPiA+ID4gCj4gPiA+ID4gPiAKPiA+ID4gPiA+ID4g aW5kZXggYzBjNjI1MzNhM2YxLi44MzkyODk0ZWQyODYgMTAwNjQ0Cj4gPiA+ID4gPiA+IC0tLSBh L2RyaXZlcnMvcGNpL2NvbnRyb2xsZXIvZHdjL3BjaS1rZXlzdG9uZS5jCj4gPiA+ID4gPiA+ICsr KyBiL2RyaXZlcnMvcGNpL2NvbnRyb2xsZXIvZHdjL3BjaS1rZXlzdG9uZS5jCj4gPiA+ID4gPiA+ IEBAIC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