Received: by 2002:a05:6358:9144:b0:117:f937:c515 with SMTP id r4csp9349665rwr; Thu, 11 May 2023 13:39:47 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ4LcENEd8cteWyp5xcpq22RqPTkv8n7ZkhNw1OkAAKXvc4JRuC3mgeuu7MlAWfiBX0F5xNB X-Received: by 2002:a05:6a20:160a:b0:103:558c:513 with SMTP id l10-20020a056a20160a00b00103558c0513mr8542060pzj.57.1683837587017; Thu, 11 May 2023 13:39:47 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1683837587; cv=none; d=google.com; s=arc-20160816; b=BpgRK6eb8GmWR4IVLUKOzF4iGnIVg/fGmNQfcfQ6YBAq7AsgO3hOK3yd8sxiWbnLPq d3LQZ17N5oUd6mwADj46SyfEuXiN73YIlpFWfkct73xfvtskq8pYBChc6RH9N1OqEWzK Yezmff1R3+S/Wc9R7SxZORxiZENULJAyqQ+9rGA/NraV0CkNY58vKTvca8lqfX1Z9LEi Kr4vAXwA8GskVqhf+aF+rsJq9oaTSG7RZsunh7HGFtl6bi6kA+QUacQl/5VfKe7GZQBh uAtPZa5FYFFyPj7os7NnSfKtI31q9M1eyOzzN5rB0zRXydxQRtjg31JNOXYr6TV45J+s tpCg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:in-reply-to:from :references:cc:to:content-language:subject:user-agent:mime-version :date:message-id:dkim-signature; bh=4Gv59x7GRc5rw9NVZjRlpFcBsJGKMNlvZ+8b/lko974=; b=ENGdlSyc5uEtlotIqkBbZ+93AgczXBtvCG4sK8UyH5CXQEa2H2r84xp08pmguPXKI5 LFdwAwEvqcf4XvEvFRPsthk9sGLYxhBDHrkkhF/mzl63jXmYLn+26faFpwcHRUpvhZ73 CU1JQbI3rMZ7+4ZLM6TqbbPHZ29lg260rEdxPIFTgMaE9akF7bxFHAOi+zx0+dVOyPLZ iWjC6vNZ+nI2ndsyKkxu9N5iTmmyKNsZ5MJ6FcYdOxnkSMWIMQIEWFXXNt1f/vQZ/lmJ f1wduZHxxLMaWWYTZ4G2WBaREwcL3V5V4urdg+Mkr/2y3z9I8PzdI/I3vy42byHJ754p v3vQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20221208 header.b=U9jwxYVW; 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=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id k26-20020aa7999a000000b0064a35829154si1123016pfh.343.2023.05.11.13.39.35; Thu, 11 May 2023 13:39:46 -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=@gmail.com header.s=20221208 header.b=U9jwxYVW; 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=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S238958AbjEKULk (ORCPT + 99 others); Thu, 11 May 2023 16:11:40 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:56296 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S238053AbjEKULj (ORCPT ); Thu, 11 May 2023 16:11:39 -0400 Received: from mail-ed1-x530.google.com (mail-ed1-x530.google.com [IPv6:2a00:1450:4864:20::530]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id ABD9310EC; Thu, 11 May 2023 13:11:38 -0700 (PDT) Received: by mail-ed1-x530.google.com with SMTP id 4fb4d7f45d1cf-50b8d2eed3dso13816445a12.0; Thu, 11 May 2023 13:11:38 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1683835897; x=1686427897; h=content-transfer-encoding:in-reply-to:from:references:cc:to :content-language:subject:user-agent:mime-version:date:message-id :from:to:cc:subject:date:message-id:reply-to; bh=4Gv59x7GRc5rw9NVZjRlpFcBsJGKMNlvZ+8b/lko974=; b=U9jwxYVWRvc7c3eyMw7CX12GG4sKAyEyzAA+PJAODX5/yYAfX1SZB6hQe0nKAaCeFT AyDl2k49B8BGm9h8XkL+n/41aza9gqD034iCxh/JMFGOWPLRO3pBKMYyzG0l9gzVoqyy a7RR/FOuXjKHjkYBCtoGnqCtwsGAPY61QqgQYEYvoKHaBzjM6JBeLGAvQGCuc9OjVhB9 BlR33EQUKnNPcvMtAj9yBRE8D9cKZuqHHDz2Uax0Atza+WtlcnM6ZqQUq/bbFz60Ans0 BFwaugWAg4Vl7GbCno+D3aSO8YmnZt2SKJcSPWNHi0DvG9r570qW6hSdBGkhp7SF00Rf Qejg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1683835897; x=1686427897; h=content-transfer-encoding:in-reply-to:from:references:cc:to :content-language:subject:user-agent:mime-version:date:message-id :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=4Gv59x7GRc5rw9NVZjRlpFcBsJGKMNlvZ+8b/lko974=; b=XgGjgwKM7U8W2s/TLMeZ4c5rHnn3JrAvwl+sxdqJl+/sVHk6OMFfiF14yQG013byod 4S7BFZmx7j/IyhD23iAgfqta5vWcW/DGYyI9t+lof130Wf7Ijvg1PIp0z+uyTIpoivAc iOrIhyfuDEyxja1OJDECu8B0Ok0G6tHraLxBkuPph0UAxS94A9tpaN+Hy3j4N1ZiGGr4 ZD5l97TsqsZZdAOSFV7vPDwOQ27urIs57KSAdqN0pVdkd0Mtes815jyfL1lqlYR7eSac Qvu8ag9CkI53T2bn7xZTjQSvX36SyWYRwTGHCNs1ezRa9IOw++WmWtvbcjYCKLx/TKp/ yG2Q== X-Gm-Message-State: AC+VfDwFHC+EC7zFwXy1ysFuwbNe/g0fJTNkSlXce1aWmUn8Yw4UHdfa aQ9znDY4gqS4uDbJveJD4PoPHwmlMg4= X-Received: by 2002:a17:906:7949:b0:969:ffcb:1eb4 with SMTP id l9-20020a170906794900b00969ffcb1eb4mr9552168ejo.2.1683835896960; Thu, 11 May 2023 13:11:36 -0700 (PDT) Received: from ?IPV6:2a01:c23:c58e:b900:c905:524d:7524:40e1? (dynamic-2a01-0c23-c58e-b900-c905-524d-7524-40e1.c23.pool.telefonica.de. [2a01:c23:c58e:b900:c905:524d:7524:40e1]) by smtp.googlemail.com with ESMTPSA id jz10-20020a17090775ea00b00965ef79ae14sm4398958ejc.189.2023.05.11.13.11.36 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Thu, 11 May 2023 13:11:36 -0700 (PDT) Message-ID: Date: Thu, 11 May 2023 22:11:32 +0200 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:102.0) Gecko/20100101 Thunderbird/102.11.0 Subject: Re: [PATCH 14/17] r8169: Use pcie_lnkctl_clear_and_set() for changing LNKCTL Content-Language: en-US To: Lukas Wunner , =?UTF-8?Q?Ilpo_J=c3=a4rvinen?= Cc: 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 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> <20230511201025.GC31598@wunner.de> From: Heiner Kallweit In-Reply-To: <20230511201025.GC31598@wunner.de> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-4.0 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_ENVFROM_END_DIGIT, FREEMAIL_FROM,NICE_REPLY_A,RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS, 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 11.05.2023 22:10, Lukas Wunner wrote: > 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/ Thanks for the link!