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 Received: from lists.ozlabs.org (lists.ozlabs.org [112.213.38.117]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id E5EB7C7115B for ; Thu, 19 Jun 2025 19:29:39 +0000 (UTC) Received: from boromir.ozlabs.org (localhost [127.0.0.1]) by lists.ozlabs.org (Postfix) with ESMTP id 4bNVzk3kZpz2xck; Fri, 20 Jun 2025 05:29:38 +1000 (AEST) Authentication-Results: lists.ozlabs.org; arc=none smtp.remote-ip=23.155.224.40 ARC-Seal: i=1; a=rsa-sha256; d=lists.ozlabs.org; s=201707; t=1750361378; cv=none; b=Bw9VGCbOeRedS1Zr5uOy6R066q5nO+0GuBta+Puq1skOBChc41TUNlkbn3ocBoguOsEEUeDqnxllukfxyVzm4e4rHjmmtE8PET1JR8yOcxyyUhtzVLru12jwrgu+lK4bftXu7immH3+sPR2K8mjtgHaRWwuf8Afgk0KVzZXM9o1fiDDVBrx2IQgt3S9hydlHe/FP2pD6I6cVuUuIvykGEojG340wLP+H6F9IiefQusL5Ipc3wdaL5F7YtkNn0DAmPaVgm1x00cSh4X9bHXoEeReD7wPAeGM9bBDcT7XR/ISm1kw1iXdrFonw/cAv74OgsjFiJDQ/8Q1pL43/QjArDg== ARC-Message-Signature: i=1; a=rsa-sha256; d=lists.ozlabs.org; s=201707; t=1750361378; c=relaxed/relaxed; bh=fv7jthCvgTDyikGnfNvnPJOjHiDNeeJUYLlc2LyLdGU=; h=Date:From:To:Cc:Message-ID:In-Reply-To:References:Subject: MIME-Version:Content-Type; b=fPpUSL6/x7ciTZ/oktJHAVkRW25V2TjBJRryeAqab1ILojMxiu2cT0+3JrvQ6orbyxuc0TQMXwgxgDE5MmoCy+wAykvBL02JTw1Is3ZRaSH2teom5eARRbCJnZmd+vwC/SOjQEAJ7avXR98qzex6C3S0rpTwAfz1Rh4EQd2j0HQtrWJ0P1vLRN+ZUXh4BqxQJ5P6QliaoHvvsYDu4R6VSmVkX1FbmLUG/7gcbViJ5tYgnUzoZx+clEX25A7EkyFu2SqQUXWbaIr//HEqTjmMTZKsP7LKuNM7/UnTpi/JHfgQ1buWrv5nbPbWQbX9QyMyzjJDkyJXJSV3Eoi8WZu/6Q== ARC-Authentication-Results: i=1; lists.ozlabs.org; dmarc=pass (p=quarantine dis=none) header.from=raptorengineering.com; dkim=pass (1024-bit key; secure) header.d=raptorengineering.com header.i=@raptorengineering.com header.a=rsa-sha256 header.s=B8E824E6-0BE2-11E6-931D-288C65937AAD header.b=okERvjuA; dkim-atps=neutral; spf=pass (client-ip=23.155.224.40; helo=raptorengineering.com; envelope-from=tpearson@raptorengineering.com; receiver=lists.ozlabs.org) smtp.mailfrom=raptorengineering.com Authentication-Results: lists.ozlabs.org; dmarc=pass (p=quarantine dis=none) header.from=raptorengineering.com Authentication-Results: lists.ozlabs.org; dkim=pass (1024-bit key; secure) header.d=raptorengineering.com header.i=@raptorengineering.com header.a=rsa-sha256 header.s=B8E824E6-0BE2-11E6-931D-288C65937AAD header.b=okERvjuA; dkim-atps=neutral Authentication-Results: lists.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=raptorengineering.com (client-ip=23.155.224.40; helo=raptorengineering.com; envelope-from=tpearson@raptorengineering.com; receiver=lists.ozlabs.org) Received: from raptorengineering.com (mail.raptorengineering.com [23.155.224.40]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by lists.ozlabs.org (Postfix) with ESMTPS id 4bNVzj4KQ0z2xRs for ; Fri, 20 Jun 2025 05:29:37 +1000 (AEST) Received: from localhost (localhost [127.0.0.1]) by mail.rptsys.com (Postfix) with ESMTP id 697D78286F37; Thu, 19 Jun 2025 14:29:35 -0500 (CDT) Received: from mail.rptsys.com ([127.0.0.1]) by localhost (vali.starlink.edu [127.0.0.1]) (amavisd-new, port 10032) with ESMTP id kDfBiWNVoCZQ; Thu, 19 Jun 2025 14:29:34 -0500 (CDT) Received: from localhost (localhost [127.0.0.1]) by mail.rptsys.com (Postfix) with ESMTP id 146358288ADA; Thu, 19 Jun 2025 14:29:34 -0500 (CDT) DKIM-Filter: OpenDKIM Filter v2.10.3 mail.rptsys.com 146358288ADA DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=raptorengineering.com; s=B8E824E6-0BE2-11E6-931D-288C65937AAD; t=1750361374; bh=fv7jthCvgTDyikGnfNvnPJOjHiDNeeJUYLlc2LyLdGU=; h=Date:From:To:Message-ID:MIME-Version; b=okERvjuAVQE1NnPz1/LUszGYbnc5gBPXxzMF/eE18zXf4SW1rBeNA4wyL1j0oKjDa W6bZSSgPBwrq3qJ9bIJynpJMhpB4Z1Q5RKuGisW1Dl37Bb/cTDuruGZO1O1Gh7oTxz L+3VGPCQNIt2BAp4ZlaDBcLhNjM891lKExnTfaqo= X-Virus-Scanned: amavisd-new at rptsys.com Received: from mail.rptsys.com ([127.0.0.1]) by localhost (vali.starlink.edu [127.0.0.1]) (amavisd-new, port 10026) with ESMTP id R2rVL0rBaTqR; Thu, 19 Jun 2025 14:29:33 -0500 (CDT) Received: from vali.starlink.edu (localhost [127.0.0.1]) by mail.rptsys.com (Postfix) with ESMTP id A74768286F37; Thu, 19 Jun 2025 14:29:33 -0500 (CDT) Date: Thu, 19 Jun 2025 14:29:33 -0500 (CDT) From: Timothy Pearson To: Bjorn Helgaas Cc: linuxppc-dev , linux-kernel , linux-pci , Madhavan Srinivasan , Michael Ellerman , christophe leroy , Naveen N Rao , Bjorn Helgaas , Shawn Anastasio , Lukas Wunner Message-ID: <1155677312.1313623.1750361373491.JavaMail.zimbra@raptorengineeringinc.com> In-Reply-To: <20250618201722.GA1220739@bhelgaas> References: <20250618201722.GA1220739@bhelgaas> Subject: Re: [PATCH v2 2/6] pci/hotplug/pnv_php: Work around switches with broken X-Mailing-List: linuxppc-dev@lists.ozlabs.org List-Id: List-Help: List-Owner: List-Post: List-Archive: , List-Subscribe: , , List-Unsubscribe: Precedence: list MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-Mailer: Zimbra 8.5.0_GA_3042 (ZimbraWebClient - GC137 (Linux)/8.5.0_GA_3042) Thread-Topic: pci/hotplug/pnv_php: Work around switches with broken Thread-Index: QJ8OUVEQgO1djYf5DjG5ikGLe2LBIQ== ----- Original Message ----- > From: "Bjorn Helgaas" > To: "Timothy Pearson" > Cc: "linuxppc-dev" , "linux-kernel" , "linux-pci" > , "Madhavan Srinivasan" , "Michael Ellerman" , > "christophe leroy" , "Naveen N Rao" , "Bjorn Helgaas" > , "Shawn Anastasio" , "Lukas Wunner" > Sent: Wednesday, June 18, 2025 3:17:22 PM > Subject: Re: [PATCH v2 2/6] pci/hotplug/pnv_php: Work around switches with broken > On Wed, Jun 18, 2025 at 02:50:04PM -0500, Timothy Pearson wrote: >> ----- Original Message ----- >> > From: "Bjorn Helgaas" >> > To: "Timothy Pearson" >> > Cc: "linuxppc-dev" , "linux-kernel" >> > , "linux-pci" >> > , "Madhavan Srinivasan" , >> > "Michael Ellerman" , >> > "christophe leroy" , "Naveen N Rao" >> > , "Bjorn Helgaas" >> > , "Shawn Anastasio" , >> > "Lukas Wunner" >> > Sent: Wednesday, June 18, 2025 2:44:00 PM >> > Subject: Re: [PATCH v2 2/6] pci/hotplug/pnv_php: Work around switches with >> > broken >> >> > [+cc Lukas, pciehp expert] >> > >> > On Wed, Jun 18, 2025 at 11:56:54AM -0500, Timothy Pearson wrote: >> >> presence detection >> > >> > (subject/commit wrapping seems to be on all of these patches) >> > >> >> The Microsemi Switchtec PM8533 PFX 48xG3 [11f8:8533] PCIe switch system >> >> was observed to incorrectly assert the Presence Detect Set bit in its >> >> capabilities when tested on a Raptor Computing Systems Blackbird system, >> >> resulting in the hot insert path never attempting a rescan of the bus >> >> and any downstream devices not being re-detected. >> > >> > Seems like this switch supports standard PCIe hotplug? Quite a bit of >> > this driver looks similar to things in pciehp. Is there some reason >> > we can't use pciehp directly? Maybe pciehp could work if there were >> > hooks for the PPC-specific bits? >> >> While that is a good long term goal that Raptor is willing to work >> toward, it is non-trivial and will require buy-in from other >> stakeholders (e.g. IBM). If practical, I'd like to get this series >> merged first, to fix the broken hotplug on our hardware that is >> deployed worldwide, then in parallel see what can be done to merge >> PowerNV support into pciehp. Would that work? > > Yeah, it wouldn't make sense to switch horses at this stage. > > I guess I was triggered by this patch, which seems to be a workaround > for a defect in a device that is probably also used on non-PPC > systems, and pciehp would need a similar workaround. But I guess you > go on to say that pciehp already does something similar, so it guess > it's already covered. No problem, I completely understand. To be perfectly frank the existing code quality in this driver (and the associated EEH driver) is not the best, and it's been a frustrating experience trying to hack it into semi-stable operation. I would vastly prefer to rewrite / integrate into the pciehp driver, and we have plans to do so, but that will take an unacceptable amount of time vs. trying to fix up the existing driver as a stopgap. As you mentioned, pciehp already has this fix, so we just have to deal with the duplicated code until we (Raptor) figures out how to merge PowerNV support into pciehp.