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 X-Spam-Level: X-Spam-Status: No, score=-2.2 required=3.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,USER_AGENT_SANE_1 autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 98375C433DF for ; Fri, 10 Jul 2020 09:18:10 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 7F80B2077D for ; Fri, 10 Jul 2020 09:18:10 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727074AbgGJJSJ (ORCPT ); Fri, 10 Jul 2020 05:18:09 -0400 Received: from foss.arm.com ([217.140.110.172]:33802 "EHLO foss.arm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726288AbgGJJSI (ORCPT ); Fri, 10 Jul 2020 05:18:08 -0400 Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id D8DDC31B; Fri, 10 Jul 2020 02:18:07 -0700 (PDT) Received: from e121166-lin.cambridge.arm.com (e121166-lin.cambridge.arm.com [10.1.196.255]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id 6E09B3F68F; Fri, 10 Jul 2020 02:18:06 -0700 (PDT) Date: Fri, 10 Jul 2020 10:18:00 +0100 From: Lorenzo Pieralisi To: Pali =?iso-8859-1?Q?Roh=E1r?= Cc: Thomas Petazzoni , Andrew Murray , Bjorn Helgaas , Marek =?iso-8859-1?Q?Beh=FAn?= , Remi Pommarel , Tomasz Maciej Nowak , Xogium , linux-pci@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH v3] PCI: aardvark: Don't touch PCIe registers if no card connected Message-ID: <20200710091800.GA3419@e121166-lin.cambridge.arm.com> References: <20200528143141.29956-1-pali@kernel.org> <20200702083036.12230-1-pali@kernel.org> <20200709113509.GB19638@e121166-lin.cambridge.arm.com> <20200709122208.rmfeuu6zgbwh3fr5@pali> <20200709144701.GA21760@e121166-lin.cambridge.arm.com> <20200709150959.wq6zfkcy4m6hvvpl@pali> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <20200709150959.wq6zfkcy4m6hvvpl@pali> User-Agent: Mutt/1.9.4 (2018-02-28) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, Jul 09, 2020 at 05:09:59PM +0200, Pali Rohár wrote: [...] > > I understand that but the bridge bus resource can be trimmed to just > > contain the root bus because that's the only one where there is a > > chance you can enumerate a device. > > It is possible to register only root bridge without endpoint? It is possible to register the root bridge with a trimmed IORESOURCE_BUS so that you don't enumerate anything other than the root port. > > I would like to get Bjorn's opinion on this, I don't like these "link is > > up" checks in config accessors (they are racy and honestly it is a > > run-time check that does not make much sense, either it is always > > true/false or it is inevitably racy) > > It is runtime check, but does not have to be always true/false. I have > tested more Compex wifi cards and under certain conditions they > "disappear" from the bus during usage. I would be very grateful if you could describe what happens in HW when these conditions trigger - I would like to understand if this issue is aardvark specific or it isn't. > So I think it still make sense to do this "fast" check as it is only > optimization. I will merge this patch but I'd also like to understand the underlying issue better. Thanks, Lorenzo 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 X-Spam-Level: X-Spam-Status: No, score=-2.3 required=3.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_NONE, SPF_PASS,USER_AGENT_SANE_1 autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 0942DC433E0 for ; Fri, 10 Jul 2020 09:19:34 +0000 (UTC) Received: from merlin.infradead.org (merlin.infradead.org [205.233.59.134]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id C37752077D for ; Fri, 10 Jul 2020 09:19:33 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="RxWq6Oty" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org C37752077D Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=arm.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=merlin.20170209; h=Sender:Content-Transfer-Encoding: Content-Type:Cc:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:In-Reply-To:MIME-Version:References:Message-ID: Subject: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=aWdQu/yM4jMqr/uI/lD52U6NQ4mIb/cGPJjTcFGIAHM=; b=RxWq6OtyL2FDMm0HuQLcDDqsZ xW8TgRvK9Z/D1PcnPODJhmoiL3LbbF+ae1wjC1q4Iq9Ns6kPlUvbh6mZ+A67/tqf/P7mU/905Qzjd YnbmomP6iAgz6ohTZzX1C6lARH7H2rKCE1RgTd+S6REkRbPlQ816v2/RbcrFE2CUrvkPv8voza80e CJ89Sq33JuAnVXIPCeOHgMNn7slJxgaiDEh0WI5ocqQELFXLLS64WEy4sjcGFMCRN6l6fNMyp1qeF v7MTDgheGHykuJzLw01umcmcDrz0Url1+AvU7rYzC+u/sQCmjn2Upgh6il+6lYKQixPalbGzjTTyZ dcGySdEcA==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1jtpAa-0001Ix-IL; Fri, 10 Jul 2020 09:18:12 +0000 Received: from foss.arm.com ([217.140.110.172]) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1jtpAY-0001IU-6q for linux-arm-kernel@lists.infradead.org; Fri, 10 Jul 2020 09:18:10 +0000 Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id D8DDC31B; Fri, 10 Jul 2020 02:18:07 -0700 (PDT) Received: from e121166-lin.cambridge.arm.com (e121166-lin.cambridge.arm.com [10.1.196.255]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id 6E09B3F68F; Fri, 10 Jul 2020 02:18:06 -0700 (PDT) Date: Fri, 10 Jul 2020 10:18:00 +0100 From: Lorenzo Pieralisi To: Pali =?iso-8859-1?Q?Roh=E1r?= Subject: Re: [PATCH v3] PCI: aardvark: Don't touch PCIe registers if no card connected Message-ID: <20200710091800.GA3419@e121166-lin.cambridge.arm.com> References: <20200528143141.29956-1-pali@kernel.org> <20200702083036.12230-1-pali@kernel.org> <20200709113509.GB19638@e121166-lin.cambridge.arm.com> <20200709122208.rmfeuu6zgbwh3fr5@pali> <20200709144701.GA21760@e121166-lin.cambridge.arm.com> <20200709150959.wq6zfkcy4m6hvvpl@pali> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <20200709150959.wq6zfkcy4m6hvvpl@pali> User-Agent: Mutt/1.9.4 (2018-02-28) X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20200710_051810_315995_9E18AA9F X-CRM114-Status: GOOD ( 17.88 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Tomasz Maciej Nowak , linux-pci@vger.kernel.org, Xogium , linux-kernel@vger.kernel.org, Marek =?iso-8859-1?Q?Beh=FAn?= , Remi Pommarel , Thomas Petazzoni , Bjorn Helgaas , linux-arm-kernel@lists.infradead.org, Andrew Murray Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org On Thu, Jul 09, 2020 at 05:09:59PM +0200, Pali Roh=E1r wrote: [...] > > I understand that but the bridge bus resource can be trimmed to just > > contain the root bus because that's the only one where there is a > > chance you can enumerate a device. > = > It is possible to register only root bridge without endpoint? It is possible to register the root bridge with a trimmed IORESOURCE_BUS so that you don't enumerate anything other than the root port. > > I would like to get Bjorn's opinion on this, I don't like these "link is > > up" checks in config accessors (they are racy and honestly it is a > > run-time check that does not make much sense, either it is always > > true/false or it is inevitably racy) > = > It is runtime check, but does not have to be always true/false. I have > tested more Compex wifi cards and under certain conditions they > "disappear" from the bus during usage. I would be very grateful if you could describe what happens in HW when these conditions trigger - I would like to understand if this issue is aardvark specific or it isn't. > So I think it still make sense to do this "fast" check as it is only > optimization. I will merge this patch but I'd also like to understand the underlying issue better. Thanks, Lorenzo _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel