linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "Jan Beulich" <JBeulich@suse.com>
To: "Govinda Tatti" <govinda.tatti@oracle.com>
Cc: <roger.pau@citrix.com>, <xen-devel@lists.xenproject.org>,
	<boris.ostrovsky@oracle.com>, <konrad.wilk@oracle.com>,
	"Juergen Gross" <jgross@suse.com>, <linux-kernel@vger.kernel.org>
Subject: Re: [Xen-devel] [PATCH V2] Xen/pciback: Implement PCI slot or bus reset with 'do_flr' SysFS attribute
Date: Wed, 29 Nov 2017 08:50:21 -0700	[thread overview]
Message-ID: <5A1EE54D020000780019335F@prv-mh.provo.novell.com> (raw)
In-Reply-To: <c97d2b6e-55ee-fb9a-5a86-8fad87448a67@oracle.com>

>>> On 29.11.17 at 16:37, <govinda.tatti@oracle.com> wrote:
> On 11/9/2017 2:49 AM, Jan Beulich wrote:
>>>>> On 09.11.17 at 00:06, <Govinda.Tatti@Oracle.COM> wrote:
>>> +static int pcistub_reset_dev(struct pci_dev *dev)
>>> +{
>>> +	struct xen_pcibk_dev_data *dev_data;
>>> +	bool slot = false, bus = false;
>>> +	struct pcistub_args arg = {};
>>> +
>>> +	if (!dev)
>>> +		return -EINVAL;
>>> +
>>> +	dev_dbg(&dev->dev, "[%s]\n", __func__);
>>> +
>>> +	if (!pci_probe_reset_slot(dev->slot))
>>> +		slot = true;
>>> +	else if ((!pci_probe_reset_bus(dev->bus)) &&
>>> +		 (!pci_is_root_bus(dev->bus)))
>>> +		bus = true;
>>> +
>>> +	if (!bus && !slot)
>>> +		return -EOPNOTSUPP;
>>> +
>>> +	/*
>>> +	 * Make sure all devices on this bus are owned by the
>>> +	 * PCI backend so that we can safely reset the whole bus.
>>> +	 */
>> Is that really the case when you mean to do a slot reset? It was for
>> a reason that I had asked about a missing "else" in v1 review,
>> rather than questioning the conditional around the logic.
> 
> In the case of bus or slot reset, our goal is to reset connected PCIe 
> fabric/card/endpoint.
> The connected card/endpoint can be multi-function device. So, same 
> walk-through and checking
> is needed irrespective of type of reset being used.

I don't follow: The scope of other devices/functions possibly
affected by a reset depends on the type of reset, doesn't it?

Jan

  reply	other threads:[~2017-11-29 15:50 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-11-08 23:06 [PATCH V2] Xen/pciback: Implement PCI slot or bus reset with 'do_flr' SysFS attribute Govinda Tatti
2017-11-09  8:49 ` Jan Beulich
2017-11-29 15:37   ` [Xen-devel] " Govinda Tatti
2017-11-29 15:50     ` Jan Beulich [this message]
2017-11-29 17:38       ` Govinda Tatti
2017-11-30  8:27         ` Jan Beulich
2017-11-30 14:15           ` Govinda Tatti
2017-11-30 14:46             ` Jan Beulich
2017-12-01 16:16               ` Govinda Tatti
2017-12-04 16:16                 ` Govinda Tatti
2017-12-04 16:49                   ` Jan Beulich

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=5A1EE54D020000780019335F@prv-mh.provo.novell.com \
    --to=jbeulich@suse.com \
    --cc=boris.ostrovsky@oracle.com \
    --cc=govinda.tatti@oracle.com \
    --cc=jgross@suse.com \
    --cc=konrad.wilk@oracle.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=roger.pau@citrix.com \
    --cc=xen-devel@lists.xenproject.org \
    /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;
as well as URLs for NNTP newsgroup(s).