Received: by 2002:a05:6358:7058:b0:131:369:b2a3 with SMTP id 24csp152076rwp; Wed, 12 Jul 2023 11:04:01 -0700 (PDT) X-Google-Smtp-Source: APBJJlFPArU7bcICV9NK55Gkrb9m6lECWRkLP65/utkhDy+iR1r10MNeQ8xlSKUjtztE00JKrwpQ X-Received: by 2002:a17:90a:8804:b0:25b:be3a:e6ae with SMTP id s4-20020a17090a880400b0025bbe3ae6aemr17846748pjn.18.1689185040741; Wed, 12 Jul 2023 11:04:00 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1689185040; cv=none; d=google.com; s=arc-20160816; b=r6zEvWh5FoN45bX57VeheqiTgS8u5mlvye8sy/zcpmBn7T01Q64mjfQqL9FtxkF1AQ 9UgTGQuUBkRnc/+pvNjnEl5WKLSRUiyiCOvcPONojRJt6Xc0S6eVjuaW3holH6Y5auJf SgYO7eHQWAIT31WaQqfzlxVwRsh0DdxhYsoo9bgaclAwz7z5Z98aAtsxjkLyLmGnhWpt 3vhat/7URGr61Z9LrDwWwA7Z8DyvxCAhQCCrXFnrb2sp/ORdLgqCvJuw1W8mnplT5DET kDPCBekZbOhf9DFWilx8DZEyiSXiiRptL1PPpVXRfQu6W/wx1wOGLeVelIj2A6UtoOHH 5KaQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-transfer-encoding :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:dkim-signature; bh=pG+mh8+91Lqxt1AwYL13LCohu/84x786utKIEjcfvxI=; fh=bouJKi9cHwx+e8LvXKMlUg2qeDgwBegwvQgWSqZgt/Y=; b=NMbqIsP/sK/QHUcDWtSlCsZQGYIDAt0xaFDjRqVE2mKJLewZEV6OtzN2e9Dmxz1M2t wq3DKG/+GZV4VP1O+7Amz87OdVGtUKKgE3vx0fqSdE4Z15Og+KJl9vLEbTkPJGSMDOUa QeX8eSpBio+/oSw+gJqYddVlKnEuVl8fshQICdT1tSkM+gzGBvEekQpdsRP2l6h3BQAO yxHyEUVICpljmW1b2srevm766+MKm2cE6TpaoJ6uE7QHK337+Nkk9lYXIm3y6QMBdnVL l1t5FJgOm0imeEk1fRhvlLkOaj10n9d/1WAdB7U/RkPKAATmD6kBwmzrA2R0MN5pwppe 6+2Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@google.com header.s=20221208 header.b=PcS3MqWh; 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=REJECT sp=REJECT dis=NONE) header.from=google.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id m16-20020a63fd50000000b0053b8c98d14bsi3609116pgj.859.2023.07.12.11.03.48; Wed, 12 Jul 2023 11:04:00 -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=@google.com header.s=20221208 header.b=PcS3MqWh; 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=REJECT sp=REJECT dis=NONE) header.from=google.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231260AbjGLRqG (ORCPT + 99 others); Wed, 12 Jul 2023 13:46:06 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:47250 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230207AbjGLRqF (ORCPT ); Wed, 12 Jul 2023 13:46:05 -0400 Received: from mail-pf1-x42a.google.com (mail-pf1-x42a.google.com [IPv6:2607:f8b0:4864:20::42a]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 9B76FE8 for ; Wed, 12 Jul 2023 10:46:04 -0700 (PDT) Received: by mail-pf1-x42a.google.com with SMTP id d2e1a72fcca58-666eec46206so6459920b3a.3 for ; Wed, 12 Jul 2023 10:46:04 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20221208; t=1689183964; x=1691775964; 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=pG+mh8+91Lqxt1AwYL13LCohu/84x786utKIEjcfvxI=; b=PcS3MqWhgV95HZbZ06H2dHpBcbNA4q8G8B6AsNEJX5e5tsZ4hDMCb/erYX8X19QQbL pplQCKNlvhh2dEUFUGem9dm42LUlwNyQFTHJ2BhCjJUuToVO2Bvpb5dU24+12jLuj4HB Mw2mnQG3V3+YA12vjm/lX24wvjVwawK0YWVq8KYJaCjzoarD/uv5AiLfFBs3Zp/PH+6e nggAzUZ8Xz3v79rLHuEAQyyoxtLCytzdyEGzcRYeIOC2GKWM9tz9CViT8cwMmJn06/0b mlnCyBMWdwe0wMXcgF5wcYDtbd404y5PZ1AzQ1zS5///pZsEdQyHxwAULNxiCeS5nPmW yQXA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1689183964; x=1691775964; 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=pG+mh8+91Lqxt1AwYL13LCohu/84x786utKIEjcfvxI=; b=UpBMKinfrSR7vMF1haH5m/bkWwPpfT4QNmQXXtjVEjGnMBIvYwrtJ01dQuHEAWuTs2 ACoK9YfSWr/uZwfHPoDdDqEhMoFFNTf+aCkI6ropuz+pMHAPrubEOuiUvcR/+ez2dt4S YHycUP3b9dfJdL3dZBH0t/tUFrxCU/8XHqN07GxNR2wfC0T/e5zK34OH7AJFLh/Svj7R NDLHH31YBT13A3uL0H3CPlXfRtQItxu8cWGsaEm0Cc4QUJzbnmfPnU7vip7lc1jTyO8x 33OrosC+3q+vpaaVRIcyH2p8/v2786qg2cPj25aI9Kr6OVKtV192KMhnjjrP72q/unKd 6Xpg== X-Gm-Message-State: ABy/qLZ+djA3KplbhNXoUNow8M5POv9olNIyd6fVc3y6g/fvwHIvdEAv YYyzkII6tRyLyMESB1R5RDsI9Q== X-Received: by 2002:a05:6a20:1589:b0:12c:6268:cd31 with SMTP id h9-20020a056a20158900b0012c6268cd31mr23998436pzj.47.1689183963926; Wed, 12 Jul 2023 10:46:03 -0700 (PDT) Received: from google.com (41.183.143.34.bc.googleusercontent.com. [34.143.183.41]) by smtp.gmail.com with ESMTPSA id k11-20020aa790cb000000b00675701f456csm3884000pfk.54.2023.07.12.10.46.01 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 12 Jul 2023 10:46:03 -0700 (PDT) Date: Wed, 12 Jul 2023 23:15:54 +0530 From: Ajay Agarwal To: Johan Hovold , Krzysztof =?utf-8?Q?Wilczy=C5=84ski?= , Manivannan Sadhasivam Cc: Lorenzo Pieralisi , Jingoo Han , Gustavo Pimentel , Rob Herring , Bjorn Helgaas , linux-pci@vger.kernel.org, linux-kernel@vger.kernel.org, Bjorn Andersson , Sajid Dalvi Subject: Re: [PATCH] Revert "PCI: dwc: Wait for link up only if link is started" Message-ID: References: <20230706082610.26584-1-johan+linaro@kernel.org> <20230706125811.GD4808@thinkpad> <20230710170608.GA346178@rocinante> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: X-Spam-Status: No, score=-17.6 required=5.0 tests=BAYES_00,DKIMWL_WL_MED, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF, ENV_AND_HDR_SPF_MATCH,FSL_HELO_FAKE,RCVD_IN_DNSWL_BLOCKED, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE,USER_IN_DEF_DKIM_WL, USER_IN_DEF_SPF_WL 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: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Jul 11, 2023 at 08:52:23AM +0200, Johan Hovold wrote: > On Tue, Jul 11, 2023 at 02:06:08AM +0900, Krzysztof WilczyƄski wrote: > > > > > > > > Finally, note that the intel-gw driver is the only driver currently not > > > > > > > providing a start_link callback and instead starts the link in its > > > > > > > host_init callback, and which may avoid an additional one-second timeout > > > > > > > during probe by making the link-up wait conditional. If anyone cares, > > > > > > > that can be done in a follow-up patch with a proper motivation. > > > The whole conversation above about the intel-gw driver: would something > > need to be addressed here? Or can I pick the suggested fix? > > No, it's just another indication that the offending commit was confused. > > All mainline drivers already start the link before that > wait-for-link-up, so the commit in question makes very little sense. > That's why I prefer reverting it, so as to not pollute the git logs > (e.g. for git blame) with misleading justifications. Johan, Mani, I am developing a PCIe driver which will not have the start_link callback defined. Instead, the link will be coming up much later based on some other trigger. So my driver will not attempt the LTSSM training on probe. So even if the probe is made asynchronous, it will still end up wasting 1 second of time. > > > > > My apologies for adding this regression in some of the SOCs. > > > > May I suggest to keep my patch and make the following change instead? > > > > This shall keep the existing behavior as is, and save the boot time > > > > for drivers that do not define the start_link()? > > [...] > > > > > I just realized that Fabio pushed exactly the same patch as I suggested > > > here: > > > https://lore.kernel.org/all/20230704122635.1362156-1-festevam@gmail.com/. > > > I think it is better we take it instead of reverting my commit. > > > > Will do. I will also make sure that we have correct attributions in place. > > As I mentioned in the commit message, I think the commit should just be > reverted and if there's a valid argument to be made for a similar type > of change (without the breakage), that can be done as a follow-up with a > proper motivation. > > Johan I agree that my commit created regression in some of the existing SOCs. I should not have taken the liberty to return an error if the wait-for-link-up call fails in the probe. But my commit's message body clearly mentions the motivation behind calling dw_pcie_wait_for_link() only if the start_link is defined. Can you please re-evaluate the decision to revert my patch and pick up the suggested fix instead? Thanks Ajay