linux-pci.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Bjorn Helgaas <helgaas@kernel.org>
To: Jian-Hong Pan <jian-hong@endlessm.com>
Cc: Heiner Kallweit <hkallweit1@gmail.com>,
	Thomas Gleixner <tglx@linutronix.de>,
	David Miller <davem@davemloft.net>,
	Realtek linux nic maintainers <nic_swsd@realtek.com>,
	netdev@vger.kernel.org,
	Linux Kernel <linux-kernel@vger.kernel.org>,
	Linux Upstreaming Team <linux@endlessm.com>,
	linux-pci@vger.kernel.org, marc.zyngier@arm.com, hch@lst.de
Subject: Re: [PATCH] r8169: don't use MSI-X on RTL8106e
Date: Thu, 23 Aug 2018 08:38:05 -0500	[thread overview]
Message-ID: <20180823133805.GE154536@bhelgaas-glaptop.roam.corp.google.com> (raw)
In-Reply-To: <CAPpJ_edz3H81EqRSg5jeOXoULt7AKwcTpNFL6Ntt8rhQBPFBFQ@mail.gmail.com>

On Thu, Aug 23, 2018 at 06:46:28PM +0800, Jian-Hong Pan wrote:
> > On 22.08.2018 13:44, Thomas Gleixner wrote:
> >> Can you please do the following:
> 
> Tested on ASUS X441AUR equipped with RTL8106e.
> This is the laptop whose ethernet does not come back after resume, if
> it does not fallback to MSI.
> ...

> dev@endless:~$ sudo lspci -xnnvvs 02:00.0
> ...
> 00: ec 10 36 81 07 04 10 00 07 00 00 02 10 00 00 00
> 10: 01 e0 00 00 00 00 00 00 04 00 10 ef 00 00 00 00
> 20: 0c 00 00 e0 00 00 00 00 00 00 00 00 43 10 0f 20
> 30: 00 00 00 00 40 00 00 00 00 00 00 00 ff 01 00 00
> 
> After comparing, there is no difference between before suspend and
> after resume.

It'd be better to compare the hex data directly and ignore the lspci
decoding, since lspci doesn't decode everything.  You only dumped the
first 0x40 bytes of config space, and all capabilities, including the
MSI and MSI-X capabilities, are past that:

> Capabilities: [50] MSI: Enable- Count=1/1 Maskable- 64bit+
> Capabilities: [b0] MSI-X: Enable+ Count=4 Masked-
> Vector table: BAR=4 offset=00000000
> PBA: BAR=4 offset=00000800

In addition, some of the MSI-X information for this device is in BAR
4.  "lspci -xxx" will dump all config space, and you can use a tool
like http://cmp.felk.cvut.cz/~pisa/linux/rdwrmem.c or
https://github.com/billfarrow/pcimem to dump the BAR contents.

  reply	other threads:[~2018-08-23 17:07 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <20180815062110.16155-1-jian-hong@endlessm.com>
     [not found] ` <20180816.122131.604270853620318143.davem@davemloft.net>
     [not found]   ` <458efbf9-5971-653a-e7cd-8c56ba055648@gmail.com>
     [not found]     ` <20180816.123958.750435252621963789.davem@davemloft.net>
     [not found]       ` <ac30d4e6-6411-09e6-1205-96e3e8e29f6f@gmail.com>
2018-08-20 18:44         ` [PATCH] r8169: don't use MSI-X on RTL8106e Bjorn Helgaas
2018-08-20 20:46           ` Heiner Kallweit
2018-08-21 19:31             ` David Miller
2018-08-21 20:48               ` Heiner Kallweit
2018-08-22 11:44                 ` Thomas Gleixner
2018-08-22 19:49                   ` Heiner Kallweit
2018-08-23 10:46                     ` Jian-Hong Pan
2018-08-23 13:38                       ` Bjorn Helgaas [this message]
2018-08-27 10:46                         ` Jian-Hong Pan
2018-08-21  8:28           ` Marc Zyngier
2018-08-21 20:54             ` Heiner Kallweit

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=20180823133805.GE154536@bhelgaas-glaptop.roam.corp.google.com \
    --to=helgaas@kernel.org \
    --cc=davem@davemloft.net \
    --cc=hch@lst.de \
    --cc=hkallweit1@gmail.com \
    --cc=jian-hong@endlessm.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-pci@vger.kernel.org \
    --cc=linux@endlessm.com \
    --cc=marc.zyngier@arm.com \
    --cc=netdev@vger.kernel.org \
    --cc=nic_swsd@realtek.com \
    --cc=tglx@linutronix.de \
    /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).