public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Jonathan Cameron <Jonathan.Cameron@Huawei.com>
To: Dan Williams <dan.j.williams@intel.com>
Cc: Gregory Price <gourry@gourry.net>, <linux-pci@vger.kernel.org>,
	<linux-cxl@vger.kernel.org>, <linux-kernel@vger.kernel.org>,
	<bhelgaas@google.com>, <dave@stgolabs.net>,
	<dave.jiang@intel.com>, <vishal.l.verma@intel.com>,
	<lukas@wunner.de>
Subject: Re: [PATCH] pci/doe: add a 1 second retry window to pci_doe
Date: Mon, 16 Sep 2024 10:15:57 +0100	[thread overview]
Message-ID: <20240916101557.00007b3a@Huawei.com> (raw)
In-Reply-To: <66e51febbab99_ae212949d@dwillia2-mobl3.amr.corp.intel.com.notmuch>

On Fri, 13 Sep 2024 22:32:28 -0700
Dan Williams <dan.j.williams@intel.com> wrote:

> [ add linux-pci and Lukas ]
> 
> Gregory Price wrote:
> > Depending on the device, sometimes firmware clears the busy flag
> > later than expected.  This can cause the device to appear busy when
> > calling multiple commands in quick sucession. Add a 1 second retry
> > window to all doe commands that end with -EBUSY.  
> 
> I would have expected this to be handled as part of finishing off
> pci_doe_recv_resp() not retrying on a new submission.
> 
> It also occurs to me that instead of warning "another entity is sending conflicting
> requests" message, the doe core should just ensure that it is the only
> agent using the mailbox. Something like hold the PCI config lock over
> DOE transactions. Then it will remove ambiguity of "conflicting agent"
> vs "device is slow to clear BUSY".
> 

I believe we put that dance in to not fail too horribly
if a firmware was messing with the DOE behind our backs rather than
another OS level actor was messing with it.

We wouldn't expect firmware to be using a DOE that Linux wants, but
the problem is the discovery protocol which the firmware might run
to find the DOE it does want to use.

My memory might be wrong though as this was a while back.

Jonathan

  reply	other threads:[~2024-09-16  9:16 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-09-13 18:32 [PATCH] pci/doe: add a 1 second retry window to pci_doe Gregory Price
2024-09-14  5:32 ` Dan Williams
2024-09-16  9:15   ` Jonathan Cameron [this message]
2024-10-01 15:13     ` Gregory Price
2024-10-01 15:47       ` Lukas Wunner
2024-10-01 16:04         ` Gregory Price
2024-10-04 11:32         ` Jonathan Cameron

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=20240916101557.00007b3a@Huawei.com \
    --to=jonathan.cameron@huawei.com \
    --cc=bhelgaas@google.com \
    --cc=dan.j.williams@intel.com \
    --cc=dave.jiang@intel.com \
    --cc=dave@stgolabs.net \
    --cc=gourry@gourry.net \
    --cc=linux-cxl@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-pci@vger.kernel.org \
    --cc=lukas@wunner.de \
    --cc=vishal.l.verma@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