Received: by 2002:a05:6358:9144:b0:117:f937:c515 with SMTP id r4csp9349016rwr; Thu, 11 May 2023 13:39:01 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ4bWcsUJedTwzyXTM7FcN5UDu9li10S1aGpKO+yTZA2vtmzWb0p7mgJhGBwJnHv0kJr1xKL X-Received: by 2002:a05:6a21:918b:b0:ef:e240:b562 with SMTP id tp11-20020a056a21918b00b000efe240b562mr23362261pzb.39.1683837541415; Thu, 11 May 2023 13:39:01 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1683837541; cv=none; d=google.com; s=arc-20160816; b=WsOrn7/IYrmXdV+TJR++mFvOIbo1b7mxBCighneRsmwrPAuL++dKT6apTUWuYcFR2d lgsgAbNmnccZJJWgMVni0AxaAA1SMZ2v/7J4zWg5OoU1b28FOBDhySBQQvHe7/FNsEQO lkmp31SIh468umRHCfF6t5bp5aQHVKPobvtXg8U1nrrEInLolyyMZXWaQJpKWHsI8xdz bP+yASkd/yuWRFv4vL5QjXdKAZOu+MZLhovy0Pm/mWwPfbsPBE3jbrQjbomlZ79gShLo T0j8yinP3zcPuEH7PVsDQl9r6t16YlhkmrA0jSKUhMefr2emxhRnjHgiBSyCaLEqvHw1 eDVw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:user-agent:in-reply-to:content-transfer-encoding :content-disposition:mime-version:references:message-id:subject:cc :to:from:date; bh=Uq4u1SrHDAUgkqas8bv5e3LYb37t5HbVmx/nNqs3mug=; b=sSwp+93LRt6m5fI54ST+L82LMZdQL9BFohzdJOQlEixBVDYk6Npo4InSwu8AHzvXsE x09UUY6P75I6TeQHXyERQwzuY0iLoNoWWCe6GCRevkBVyzXQUNoNZKrKHwELTK9yljzh YIk6zLrhgGSWSFKZSTEWz1WxtnU8gQefD0ngRHCgCPQN5qZiGN4STJPwj1lakXg2dL6W ttKvNHdgPGeQP5NtKoCyHbCkIleWunY0kW/W46/QX+i658b3peWFeS1xciKewmrjqL1I qCRxe5Nhm1WHIGhwzwbWAwMXwwRt5uqBL05xJzgIQotYUWYoB5W51pz+QeHL0kruH5fQ 1ZSw== ARC-Authentication-Results: i=1; mx.google.com; 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 Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id t126-20020a625f84000000b00645c34972a1si8414313pfb.234.2023.05.11.13.38.48; Thu, 11 May 2023 13:39:01 -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; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S239214AbjEKUQw (ORCPT + 99 others); Thu, 11 May 2023 16:16:52 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:58874 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S238053AbjEKUQv (ORCPT ); Thu, 11 May 2023 16:16:51 -0400 X-Greylist: delayed 378 seconds by postgrey-1.37 at lindbergh.monkeyblade.net; Thu, 11 May 2023 13:16:48 PDT Received: from bmailout2.hostsharing.net (bmailout2.hostsharing.net [83.223.78.240]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 33CD9E76; Thu, 11 May 2023 13:16:47 -0700 (PDT) Received: from h08.hostsharing.net (h08.hostsharing.net [IPv6:2a01:37:1000::53df:5f1c:0]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "*.hostsharing.net", Issuer "RapidSSL Global TLS RSA4096 SHA256 2022 CA1" (verified OK)) by bmailout2.hostsharing.net (Postfix) with ESMTPS id C65682800B3CA; Thu, 11 May 2023 22:10:25 +0200 (CEST) Received: by h08.hostsharing.net (Postfix, from userid 100393) id B8BDE23C8; Thu, 11 May 2023 22:10:25 +0200 (CEST) Date: Thu, 11 May 2023 22:10:25 +0200 From: Lukas Wunner To: Ilpo =?iso-8859-1?Q?J=E4rvinen?= Cc: Heiner Kallweit , linux-pci@vger.kernel.org, Bjorn Helgaas , Rob Herring , Lorenzo Pieralisi , Krzysztof Wilczy?ski , nic_swsd@realtek.com, "David S. Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , Netdev , LKML Subject: Re: [PATCH 14/17] r8169: Use pcie_lnkctl_clear_and_set() for changing LNKCTL Message-ID: <20230511201025.GC31598@wunner.de> References: <20230511131441.45704-1-ilpo.jarvinen@linux.intel.com> <20230511131441.45704-15-ilpo.jarvinen@linux.intel.com> <98b3b70a-86c0-78c0-b734-0764bb5a21fc@gmail.com> <985b617-c5d7-dce3-318b-f2f8412beed3@linux.intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <985b617-c5d7-dce3-318b-f2f8412beed3@linux.intel.com> User-Agent: Mutt/1.10.1 (2018-07-13) X-Spam-Status: No, score=-2.4 required=5.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,RCVD_IN_DNSWL_LOW,SPF_HELO_NONE,SPF_NONE, T_SCC_BODY_TEXT_LINE 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 Thu, May 11, 2023 at 11:00:02PM +0300, Ilpo J?rvinen wrote: > On Thu, 11 May 2023, Heiner Kallweit wrote: > > On 11.05.2023 15:14, Ilpo J?rvinen wrote: > > > Don't assume that only the driver would be accessing LNKCTL. ASPM > > > policy changes can trigger write to LNKCTL outside of driver's control. > > > > > > Use pcie_lnkctl_clear_and_set() which does proper locking to avoid > > > losing concurrent updates to the register value. > > > > > > > Wouldn't it be more appropriate to add proper locking to the > > underlying pcie_capability_clear_and_set_word()? > > As per discussion for the other patch, that's where this series is now > aiming to in v2. That discussion wasn't cc'ed to Heiner. For reference, this is the message Ilpo is referring to: https://lore.kernel.org/linux-pci/ZF1AjOKDVlbNFJPK@bhelgaas/