From: Alex Williamson <alex.williamson@redhat.com>
To: Bharat Bhushan <bharat.bhushan@nxp.com>
Cc: Bjorn Helgaas <bhelgaas@google.com>,
Bjorn Helgaas <helgaas@kernel.org>,
"linux-pci@vger.kernel.org" <linux-pci@vger.kernel.org>,
Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
"bharatb.yadav@gmail.com" <bharatb.yadav@gmail.com>,
David Daney <david.daney@cavium.com>,
"jglauber@cavium.com" <jglauber@cavium.com>,
"mbroemme@libmpq.org" <mbroemme@libmpq.org>,
"chrisrblake93@gmail.com" <chrisrblake93@gmail.com>
Subject: Re: [PATCH] PCI: Mark NXP LS1088 to avoid bus reset bus
Date: Thu, 29 Nov 2018 22:56:06 -0700 [thread overview]
Message-ID: <20181129225606.328f7386@x1.home> (raw)
In-Reply-To: <VI1PR04MB4845D4ED02E38246E71DD1A49AD30@VI1PR04MB4845.eurprd04.prod.outlook.com>
On Fri, 30 Nov 2018 05:29:47 +0000
Bharat Bhushan <bharat.bhushan@nxp.com> wrote:
> Hi,
>
> > -----Original Message-----
> > From: Bjorn Helgaas <bhelgaas@google.com>
> > Sent: Thursday, November 29, 2018 1:46 AM
> > To: Bharat Bhushan <bharat.bhushan@nxp.com>
> > Cc: alex.williamson@redhat.com; Bjorn Helgaas <helgaas@kernel.org>; linux-
> > pci@vger.kernel.org; Linux Kernel Mailing List <linux-
> > kernel@vger.kernel.org>; bharatb.yadav@gmail.com; David Daney
> > <david.daney@cavium.com>; jglauber@cavium.com;
> > mbroemme@libmpq.org; chrisrblake93@gmail.com
> > Subject: Re: [PATCH] PCI: Mark NXP LS1088 to avoid bus reset bus
> >
> > On Tue, Nov 27, 2018 at 10:32 PM Bharat Bhushan
> > <bharat.bhushan@nxp.com> wrote:
> >
> > > > -----Original Message-----
> > > > From: Alex Williamson <alex.williamson@redhat.com>
> > > > Sent: Tuesday, November 27, 2018 9:39 PM
> > > > To: Bjorn Helgaas <helgaas@kernel.org>
> > > > Cc: Bharat Bhushan <bharat.bhushan@nxp.com>;
> > > > linux-pci@vger.kernel.org; linux-kernel@vger.kernel.org;
> > > > bharatb.yadav@gmail.com; David Daney <david.daney@cavium.com>;
> > Jan
> > > > Glauber <jglauber@cavium.com>; Maik Broemme
> > <mbroemme@libmpq.org>;
> > > > Chris Blake <chrisrblake93@gmail.com>
> > > > Subject: Re: [PATCH] PCI: Mark NXP LS1088 to avoid bus reset bus
> > > >
> > > > On Tue, 27 Nov 2018 09:33:56 -0600
> > > > Bjorn Helgaas <helgaas@kernel.org> wrote:
> >
> > > > > 4) Is there a hardware erratum for this? If so, please include
> > > > > the URL here.
> > >
> > > No h/w errata as of now.
> >
> > Does that mean (a) the HW folks agree this is a hardware problem but they
> > haven't written an erratum, (b) there is an erratum but it isn't public, (c) we
> > don't have any concrete evidence of a hardware problem, but things just
> > don't work if we do a bus reset, (d) something else?
>
> I will say it is (c) - not concluded to be hardware h/w issue.
>
> >
> > > In pci_reset_secondary_bus() I have tried to increase the delay after reset
> > but not helped.
> > > Do I need to add delay at some other place as well?
> >
> > No, I think the place you tried should be enough.
> >
> > You should also be able to exercise this from user-space by using "setpci" to
> > set and clear the Secondary Bus Reset bit in the Bridge Control register. Then
> > you can also use setpci to read/write config space of the NIC. The kernel
> > would normally read the Vendor and Device IDs as the first access to the
> > device during enumeration. You also might be able to learn something by
> > using "lspci -vv" on the bridge before and after the reset to see if it logs any
> > AER bits (if it supports AER) or the other standard error logging bits.
>
> I tried below sequence for Secondary bus reset and device config space show 0xff
>
> root@localhost:~# lspci -x
> 0002:00:00.0 PCI bridge: Freescale Semiconductor Inc Device 80c0 (rev 10)
> 00: 57 19 c0 80 07 01 10 00 10 00 04 06 08 00 01 00
> 10: 00 00 00 00 00 00 00 00 00 01 ff 00 01 01 00 00
> 20: 00 40 00 40 f1 ff 01 00 00 00 00 00 00 00 00 00
> 30: 00 00 00 00 40 00 00 00 00 00 00 40 63 01 00 00
>
> 0002:01:00.0 Ethernet controller: Intel Corporation 82574L Gigabit Network Connection
> 00: 86 80 d3 10 06 04 10 00 00 00 00 02 10 00 00 00
> 10: 00 00 0c 40 00 00 00 40 01 00 00 00 00 00 0e 40
> 20: 00 00 00 00 00 00 00 00 00 00 00 00 86 80 1f a0
> 30: 00 00 24 40 c8 00 00 00 00 00 00 00 63 01 00 00
>
> root@localhost:~# setpci -s 0002:00:00.0 0x3e.b=0x40
> root@localhost:~# setpci -s 0002:00:00.0 0x3e.b=0x00
>
> root@localhost:~# lspci -x
> 0002:00:00.0 PCI bridge: Freescale Semiconductor Inc Device 80c0 (rev 10)
> 00: 57 19 c0 80 07 01 10 00 10 00 04 06 08 00 01 00
> 10: 00 00 00 00 00 00 00 00 00 01 ff 00 01 01 00 00
> 20: 00 40 00 40 f1 ff 01 00 00 00 00 00 00 00 00 00
> 30: 00 00 00 00 40 00 00 00 00 00 00 40 63 01 00 00
Just for curiosity sake, what if you re-write the secondary and
subordinate bus registers here:
# setpci -s 0002:00:00.0 0x19.b=0x01
# setpci -s 0002:00:00.0 0x1a.b=0xff
IIRC the users that debugged the AMD bus reset issue re-wrote the
entire 64 bytes of the bridge config header and then further narrowed
the issue down to the two registers above. If one bridge
implementation can have such an issue, maybe others do too. Perhaps
there's common IP in use. Are you able to test other endpoints besides
this e1000e device with this setpci technique? Thanks,
Alex
> 0002:01:00.0 Ethernet controller: Intel Corporation 82574L Gigabit Network Connection (rev ff)
> 00: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
> 10: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
> 20: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
> 30: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
>
> Thanks
> -Bharat
>
>
next prev parent reply other threads:[~2018-11-30 5:56 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-11-27 8:46 [PATCH] PCI: Mark NXP LS1088 to avoid bus reset bus Bharat Bhushan
2018-11-27 15:33 ` Bjorn Helgaas
2018-11-27 16:08 ` Alex Williamson
2018-11-28 4:31 ` Bharat Bhushan
2018-11-28 20:15 ` Bjorn Helgaas
2018-11-30 5:29 ` Bharat Bhushan
2018-11-30 5:56 ` Alex Williamson [this message]
2018-11-30 6:24 ` Bharat Bhushan
2018-11-30 16:19 ` Alex Williamson
2018-12-03 11:01 ` Bharat Bhushan
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=20181129225606.328f7386@x1.home \
--to=alex.williamson@redhat.com \
--cc=bharat.bhushan@nxp.com \
--cc=bharatb.yadav@gmail.com \
--cc=bhelgaas@google.com \
--cc=chrisrblake93@gmail.com \
--cc=david.daney@cavium.com \
--cc=helgaas@kernel.org \
--cc=jglauber@cavium.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-pci@vger.kernel.org \
--cc=mbroemme@libmpq.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).