public inbox for linux-pci@vger.kernel.org
 help / color / mirror / Atom feed
From: Lukas Wunner <lukas@wunner.de>
To: Sathyanarayanan Kuppuswamy  <sathyanarayanan.kuppuswamy@linux.intel.com>
Cc: Bjorn Helgaas <helgaas@kernel.org>,
	linux-pci@vger.kernel.org,
	Alex Williamson <alex.williamson@redhat.com>,
	Amey Narkhede <ameynarkhede03@gmail.com>,
	Keith Busch <kbusch@kernel.org>, Ashok Raj <ashok.raj@intel.com>,
	Ravi Kishore Koppuravuri <ravi.kishore.koppuravuri@intel.com>,
	Mika Westerberg <mika.westerberg@linux.intel.com>
Subject: Re: [PATCH] PCI/DPC: Add Software Trigger as reset method
Date: Wed, 30 Nov 2022 08:37:28 +0100	[thread overview]
Message-ID: <20221130073728.GB8198@wunner.de> (raw)
In-Reply-To: <b201a410-8593-6718-f76a-ea27ee5ab930@linux.intel.com>

On Tue, Nov 29, 2022 at 08:27:43AM -0800, Sathyanarayanan Kuppuswamy wrote:
> On 11/28/22 11:35 PM, Lukas Wunner wrote:
> > Add DPC Software Trigger as a reset method to be used for silicon
> > validation among other things:
> > 
> >   # echo dpc_sw_trigger > reset_method
> >   # echo 1 > reset
> > 
> > After validating DPC, the default reset_method(s) may be reinstated:
> > 
> >   # echo default > reset_method
> > 
> > Writing the DPC Control Register requires that control was granted by
> > firmware, so expose the reset_method only if DPC is native.  (And AER,
> > which must always be granted or denied in unison per PCI Firmware Spec
> > r3.3 table 4-5.)
> > 
> > The reset attribute in sysfs is meant to reset a single PCI Function,
> > but DPC resets the entire hierarchy below the parent.  So only expose
> > the reset method on PCI Functions without siblings or children.
> > Checking for that may happen both *before* the PCI Function has been
> > added to the bus list (via pci_device_add() -> pci_init_capabilities())
> > and *after* (via reset_method_store()), hence differentiate between
> > those two cases on reset probing.
> 
> Does this mean you want to only allow this reset method for DPC capable
> ports without any devices attached to it? If yes, why not use other
> reset methods available?

This reset method is allowed if the DPC-capable port has a single child
device and that child has no siblings or descendants.  

And the reset is performed by echoing 1 to the single child's reset
attribute in sysfs.

Those are the same semantics as the Secondary Bus Reset method.

Thanks,

Lukas

  reply	other threads:[~2022-11-30  7:37 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-11-29  7:35 [PATCH] PCI/DPC: Add Software Trigger as reset method Lukas Wunner
2022-11-29 13:09 ` Ashok Raj
2022-11-29 15:44 ` Mika Westerberg
2022-11-29 16:27 ` Sathyanarayanan Kuppuswamy
2022-11-30  7:37   ` Lukas Wunner [this message]
2022-11-29 16:36 ` Keith Busch
2022-11-30  7:30   ` Lukas Wunner
2022-12-06 17:11 ` Bjorn Helgaas

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20221130073728.GB8198@wunner.de \
    --to=lukas@wunner.de \
    --cc=alex.williamson@redhat.com \
    --cc=ameynarkhede03@gmail.com \
    --cc=ashok.raj@intel.com \
    --cc=helgaas@kernel.org \
    --cc=kbusch@kernel.org \
    --cc=linux-pci@vger.kernel.org \
    --cc=mika.westerberg@linux.intel.com \
    --cc=ravi.kishore.koppuravuri@intel.com \
    --cc=sathyanarayanan.kuppuswamy@linux.intel.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox