Received: by 2002:a05:6358:3188:b0:123:57c1:9b43 with SMTP id q8csp3185047rwd; Fri, 16 Jun 2023 13:35:37 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ6LAUXusOSNBtdwCVIvnJheHqbZg13PIwNdi1abp03DTQgKTTvlFImSvEm9e5C0isRceNVB X-Received: by 2002:a05:6870:4516:b0:1a6:bdeb:c295 with SMTP id e22-20020a056870451600b001a6bdebc295mr251882oao.0.1686947736922; Fri, 16 Jun 2023 13:35:36 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1686947736; cv=none; d=google.com; s=arc-20160816; b=0Awb8kCKJ0ZSfy3C89k0XKRkXzUR2wcrxLqH9w9W5n2s4QqPXD0ULxWUXWcsV6m5Gl 520TE/3N6pFIxVrWuBvTcBrPY8EgDCn+OH+avwTUhZdjAk29a7q40clN3u67FCwMAVjx JzGJLe+El4yF3YAKukzo+wz4o5gGY4JzGyCTrKODQUQSAAYaBwGo8hDN8EWkEi6KyNs8 rVdSFDgjMwwHplBN4YTcOD3MI8fWNMTzAW7PyXHGk9pfsQO8ePPGWPBjUjWM2R+/psVy IoN8ohGcEmg1xYRMCReIdwkdzAn1vPorAg3Q0JZroHEQOmberCKjczaVC1+fLFCboZyj JMfw== 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-disposition:mime-version :message-id:subject:cc:to:from:date:dkim-signature; bh=lNpHG6MM9jOfEy+BQiWGK7iahTxDMVm1f07oGakXku8=; b=pRG6DAM1BeL7/tHusErqrxM1ko1SdvaTh4bcBSOiadwGbAh1f5Ssd5ZEqSTDY/bP7Z UNhYhthyyH/zLBZ0h+S7YX9OIgldzZYwV5orTjfBCkGUeOVlmT/YaOLnFQmn5LMW7PRO ZqbvkAr1bV0WKaRJ5VZ5OcpHcv9zEtyOdZpqZBp1/t7/+jtCdDiCuDqbhL8MUd7RWUAp mXHsgRDaOwcmI0on6r8JrTJrxnSsnc0oxdGtFy77IbU9/FHUMo1k/hrWtQeRMyc7jBft Vg56j9l0ENXHVJ8KNOPcJmqIjOGBsrzq8c3u9E34AWAn8rx1sNfKpaNTDJgMc/VIn93d MRzA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=pqbxAH6I; 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=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id bv132-20020a632e8a000000b0054f96f7bcf3si9660242pgb.105.2023.06.16.13.35.24; Fri, 16 Jun 2023 13:35:36 -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=@kernel.org header.s=k20201202 header.b=pqbxAH6I; 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=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233194AbjFPU3J (ORCPT + 99 others); Fri, 16 Jun 2023 16:29:09 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:53708 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231403AbjFPU3H (ORCPT ); Fri, 16 Jun 2023 16:29:07 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [IPv6:2604:1380:4641:c500::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 121C635A6; Fri, 16 Jun 2023 13:29:04 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id 8CFCD62C92; Fri, 16 Jun 2023 20:29:03 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 7D28CC433C0; Fri, 16 Jun 2023 20:29:02 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1686947343; bh=gvd+AZX4jPfWnZ3uCqLoz9KHdUprTUE9ZWgZSJAJEeU=; h=Date:From:To:Cc:Subject:In-Reply-To:From; b=pqbxAH6IMfvevBErMdfzPcFXUr9ietWlKM3lyqdp4aPvp6tq4RWgXVgk+W5QTwneX lqr8Dib4Y8DezbaOcYxo0DAOlWTIFJv6+2epCmW/a/pXxl7GIoo45bpvrHqxNWY53J irIJLGlmwP9G/lkjjdpMAzDaKemBNRb++f+W4xpE+FGy3vln+rtp53lFK7iO60oGuG PLBOLpxnn+poJcE7cIz1Kwt/+CAGwSUrl+zPFN5wE6rq9xRqIPxFXb868VtHKy62dD 81lYxVYRzhAJz93dz9AVo1z+WxEFFm0KWEL6f4dS94AkiCBFGeEYU4ltvUEFfjcgVM 7MQ6QjOsNzgiQ== Date: Fri, 16 Jun 2023 15:29:00 -0500 From: Bjorn Helgaas To: "Maciej W. Rozycki" Cc: linux-pci@vger.kernel.org, linux-kernel@vger.kernel.org, Eric Dumazet , Oliver O'Halloran , Stefan Roese , Leon Romanovsky , linux-rdma@vger.kernel.org, Jakub Kicinski , Paolo Abeni , Jim Wilson , Nicholas Piggin , Alex Williamson , Bjorn Helgaas , Mika Westerberg , David Abdurachmanov , linuxppc-dev@lists.ozlabs.org, Mahesh J Salgaonkar , "David S. Miller" , Lukas Wunner , netdev@vger.kernel.org, Pali =?iso-8859-1?Q?Roh=E1r?= , Saeed Mahameed Subject: Re: [PATCH v9 00/14] pci: Work around ASMedia ASM2824 PCIe link training failures Message-ID: <20230616202900.GA1540115@bhelgaas> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-Spam-Status: No, score=-4.4 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_MED, 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 Fri, Jun 16, 2023 at 01:27:52PM +0100, Maciej W. Rozycki wrote: > On Thu, 15 Jun 2023, Bjorn Helgaas wrote: > As per my earlier remark: > > > I think making a system halfway-fixed would make little sense, but with > > the actual fix actually made last as you suggested I think this can be > > split off, because it'll make no functional change by itself. > > I am not perfectly happy with your rearrangement to fold the !PCI_QUIRKS > stub into the change carrying the actual workaround and then have the > reset path update with a follow-up change only, but I won't fight over it. > It's only one tree revision that will be in this halfway-fixed state and > I'll trust your judgement here. Thanks for raising this. Here's my thought process: 12 PCI: Provide stub failed link recovery for device probing and hot plug 13 PCI: Add failed link recovery for device reset events 14 PCI: Work around PCIe link training failures Patch 12 [1] adds calls to pcie_failed_link_retrain(), which does nothing and returns false. Functionally, it's a no-op, but the structure is important later. Patch 13 [2] claims to request failed link recovery after resets, but actually doesn't do anything yet because pcie_failed_link_retrain() is still a no-op, so this was a bit confusing. Patch 14 [3] implements pcie_failed_link_retrain(), so the recovery mentioned in 12 and 13 actually happens. But this patch doesn't add the call to pcie_failed_link_retrain(), so it's a little bit hard to connect the dots. I agree that as I rearranged it, the workaround doesn't apply in all cases simultaneously. Maybe not ideal, but maybe not terrible either. Looking at it again, maybe it would have made more sense to move the pcie_wait_for_link_delay() change to the last patch along with the pci_dev_wait() change. I dunno. Bjorn [1] 12 https://lore.kernel.org/r/alpine.DEB.2.21.2306111619570.64925@angie.orcam.me.uk [2] 13 https://lore.kernel.org/r/alpine.DEB.2.21.2306111631050.64925@angie.orcam.me.uk [3] 14 https://lore.kernel.org/r/alpine.DEB.2.21.2305310038540.59226@angie.orcam.me.uk