All of lore.kernel.org
 help / color / mirror / Atom feed
From: Keith Busch <kbusch@kernel.org>
To: Bjorn Helgaas <helgaas@kernel.org>
Cc: Hariprasad Shenai <hariprasad@chelsio.com>,
	bhelgaas@google.com, linux-pci@vger.kernel.org,
	leedom@chelsio.com, nirranjan@chelsio.com
Subject: Re: [PATCH] pci: Add pci quirk to turnoff Nosnoop and Relaxed Ordering
Date: Wed, 1 Sep 2021 16:22:12 -0700	[thread overview]
Message-ID: <20210901232212.GA7334@dhcp-10-100-145-180.wdc.com> (raw)
In-Reply-To: <20210901222353.GA251391@bjorn-Precision-5520>

On Wed, Sep 01, 2021 at 05:23:53PM -0500, Bjorn Helgaas wrote:
> On Sun, Oct 18, 2015 at 07:55:04PM +0530, Hariprasad Shenai wrote:
> > Some devices violate the PCI Specification regarding echoing the Root
> > Port Transaction Layer Packet Request (TLP) No Snoop and Relaxed
> > Ordering Attributes into the TLP Response. The PCI Specification
> > "encourages" compliant Root Port implementation to drop such
> > malformed TLP Responses leading to device access timeouts. Many Root Port
> > implementations accept such malformed TLP Responses and a few more
> > strict implementations do drop them.
> > 
> > For devices which fail this part of the PCI Specification, we need to
> > traverse up the PCI Chain to the Root Port and turn off the Enable No
> > Snoop and Enable Relaxed Ordering bits in the Root Port's PCI-Express
> > Device Control register. This does affect all other devices which
> > are downstream of that Root Port.
> 
> While researching another thread about RO [1], I got concerned about
> setting RO for root ports.
> 
> Setting RO for *endpoints* makes sense: that allows (but does not
> require) the endpoint to issue writes that don't require strong
> ordering.
> 
> Setting RO for *root ports* seems more problematic.  It allows the
> root port to issue PCIe writes that don't require strong ordering.
> These would be CPU MMIO writes to devices.  But Linux currently does
> not have a way for drivers to indicate that some MMIO writes need to
> be ordered while others do not, and I think drivers assume that all
> MMIO writes are performed in order.

Is that not what writel_relaxed() is for? While it appears that most
archs just have that call the generic writel(), it does let drivers
indicate which writes are not strongly ordered.

  reply	other threads:[~2021-09-01 23:22 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-10-18 14:25 [PATCH] pci: Add pci quirk to turnoff Nosnoop and Relaxed Ordering Hariprasad Shenai
2015-10-22 22:13 ` Bjorn Helgaas
2015-10-23  0:07   ` Casey Leedom
2015-10-23  3:01     ` Bjorn Helgaas
2021-09-01 22:23 ` Bjorn Helgaas
2021-09-01 23:22   ` Keith Busch [this message]
2021-09-01 23:35     ` 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=20210901232212.GA7334@dhcp-10-100-145-180.wdc.com \
    --to=kbusch@kernel.org \
    --cc=bhelgaas@google.com \
    --cc=hariprasad@chelsio.com \
    --cc=helgaas@kernel.org \
    --cc=leedom@chelsio.com \
    --cc=linux-pci@vger.kernel.org \
    --cc=nirranjan@chelsio.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.