From: Johannes Thumshirn <jthumshirn@suse.de>
To: Bjorn Helgaas <helgaas@kernel.org>
Cc: Bjorn Helgaas <bhelgaas@google.com>,
linux-pci@vger.kernel.org, linux-kernel@vger.kernel.org,
Alexander Graf <agraf@suse.de>, Hannes Reinecke <hare@suse.de>
Subject: Re: [PATCH 2/2] pci: Don't set RCB bit in LNKCTL if the upstream bridge hasn't
Date: Tue, 22 Nov 2016 08:59:59 +0100 [thread overview]
Message-ID: <20161122075959.nrubafbmxdnqyjkk@linux-x5ow.site> (raw)
In-Reply-To: <20161121165352.GM25762@bhelgaas-glaptop.roam.corp.google.com>
On Mon, Nov 21, 2016 at 10:53:52AM -0600, Bjorn Helgaas wrote:
> On Wed, Nov 16, 2016 at 12:11:58PM -0600, Bjorn Helgaas wrote:
> > Hi Johannes,
> >
> > On Wed, Nov 02, 2016 at 04:35:52PM -0600, Johannes Thumshirn wrote:
> > > The Read Completion Boundary (RCB) bit must only be set on a device or
> > > endpoint if it is set on the root complex.
> >
> > I propose the following slightly modified patch. The interesting
> > difference is that your patch only touches the _HPX "OR" mask, so it
> > refrains from *setting* RCB in some cases, but it never actually
> > *clears* it. The only time we clear RCB is when the _HPX "AND" mask
> > has RCB == 0.
> >
> > My intent below is that we completely ignore the _HPX RCB bits, and we
> > set an Endpoint's RCB if and only if the Root Port's RCB is set.
> >
> > I made an ugly ASCII table to think about the cases:
> >
> > Root EP _HPX _HPX Final Endpoint RCB state
> > Port (init) AND OR (curr) (yours) (mine)
> > 0) 0 0 0 0 0 0 0
> > 1) 0 0 0 1 1 0 0
> > 2) 0 0 1 0 0 0 0
> > 3) 0 0 1 1 1 0 0
> > 4) 0 1 0 0 0 0 0
> > 5) 0 1 0 1 1 0 0
> > 6) 0 1 1 0 1 1 0
> > 7) 0 1 1 1 1 1 0
> > 8) 1 0 0 0 0 0 1
> > 9) 1 0 0 1 1 1 1
> > A) 1 0 1 0 0 0 1
> > B) 1 0 1 1 1 1 1
> > C) 1 1 0 0 0 0 1
> > D) 1 1 0 1 1 1 1
> > E) 1 1 1 0 1 1 1
> > F) 1 1 1 1 1 1 1
> >
> > Cases 0-7 should all result in the Endpoint RCB being zero because the
> > Root Port RCB is zero. Case 1 is the bug you're fixing. Cases 3 & 5
> > are similar hypothetical bugs your patch also fixes.
> >
> > Cases 6 & 7, where firmware left the Endpoint RCB set and _HPX didn't
> > tell us to clear it, are hypothetical firmware bugs that your patch
> > wouldn't fix.
> >
> > In cases 8, A, and C, we currently leave the Endpoint RCB cleared,
> > either because firmware left it clear and _HPX didn't tell us to set
> > it (8 and A), or because firmware set it but _HPX told us to clear it
> > (C).
> >
> > One could argue that 8, A, and C should stay as they currently are, as
> > a way for _HPX to work around hardware bugs, e.g., a Root Port that
> > advertises a 128-byte RCB but doesn't actually support it. I didn't
> > bother with that and set the Endpoint's RCB to 128 in all cases when
> > the Root Port claims to support it.
> >
> > It'd be great if you could test this and comment.
> >
> > If you get a chance, collect the /proc/iomem contents, too. That's
> > not for this bug; it's because I'm curious about the
> >
> > ERST: Can not request [mem 0xb928b000-0xb928cbff] for ERST
> >
> > problem in your dmesg log.
>
> Oops, I goofed and forgot to clear RCB by default.
> Here's the fixed one.
Yep, my contact already noticed. I have heard rumors that the first two
patches worked on RHEL and the 3rd one didn't (but that's just rumors) so I
try to persuade our field engineer to spend another day testing the patches.
But please be aware this is a bit cumbersome as I don't have access to the
machine and our field engineer only has remote access as well.
Byte,
Johannes
--
Johannes Thumshirn Storage
jthumshirn@suse.de +49 911 74053 689
SUSE LINUX GmbH, Maxfeldstr. 5, 90409 Nürnberg
GF: Felix Imendörffer, Jane Smithard, Graham Norton
HRB 21284 (AG Nürnberg)
Key fingerprint = EC38 9CAB C2C4 F25D 8600 D0D0 0393 969D 2D76 0850
next prev parent reply other threads:[~2016-11-22 7:59 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-11-02 22:35 [PATCH 1/2] pci: export pcie_find_root_port Johannes Thumshirn
2016-11-02 22:35 ` [PATCH 2/2] pci: Don't set RCB bit in LNKCTL if the upstream bridge hasn't Johannes Thumshirn
2016-11-09 17:11 ` Bjorn Helgaas
2016-11-14 11:56 ` Johannes Thumshirn
2016-11-14 16:16 ` Don Dutile
2016-11-15 12:58 ` Johannes Thumshirn
2016-11-16 18:11 ` Bjorn Helgaas
2016-11-17 9:57 ` Johannes Thumshirn
2016-11-21 16:53 ` Bjorn Helgaas
2016-11-22 7:59 ` Johannes Thumshirn [this message]
2016-11-22 10:56 ` Johannes Thumshirn
2016-11-22 16:01 ` Myron Stowe
2016-11-23 17:31 ` Bjorn Helgaas
2016-11-23 19:49 ` 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=20161122075959.nrubafbmxdnqyjkk@linux-x5ow.site \
--to=jthumshirn@suse.de \
--cc=agraf@suse.de \
--cc=bhelgaas@google.com \
--cc=hare@suse.de \
--cc=helgaas@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-pci@vger.kernel.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).