linux-pci.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Gavin Shan <gwshan@linux.vnet.ibm.com>
To: Andrew Donnellan <andrew.donnellan@au1.ibm.com>
Cc: Gavin Shan <gwshan@linux.vnet.ibm.com>,
	linuxppc-dev@lists.ozlabs.org, bhelgaas@google.com,
	linux-pci@vger.kernel.org, "# v4 . 9+" <stable@vger.kernel.org>
Subject: Re: [PATCH 2/3] pci/hotplug/pnv-php: Disable surprise hotplug capability on conflicts
Date: Thu, 16 Feb 2017 16:50:24 +1100	[thread overview]
Message-ID: <20170216055023.GA16031@gwshan> (raw)
In-Reply-To: <48c227b2-756d-a5d3-227f-58ad51dd1565@au1.ibm.com>

On Thu, Feb 16, 2017 at 03:31:48PM +1100, Andrew Donnellan wrote:
>On 16/02/17 10:22, Gavin Shan wrote:
>>The root port or PCIe switch downstream port might have been associated
>>with driver other than pnv-php. The MSI or MSIx might also have been
>>enabled by that driver (e.g. pcieport_drv). Attempt to enable MSI incurs
>>below backtrace:
>>
>> PowerPC PowerNV PCI Hotplug Driver version: 0.1
>> ------------[ cut here ]------------
>> WARNING: CPU: 19 PID: 1004 at drivers/pci/msi.c:1071 \
>>                              __pci_enable_msi_range+0x84/0x4e0
>> NIP [c000000000665c34] __pci_enable_msi_range+0x84/0x4e0
>> LR [c000000000665c24] __pci_enable_msi_range+0x74/0x4e0
>> Call Trace:
>> [c000000384d67600] [c000000000665c24] __pci_enable_msi_range+0x74/0x4e0
>> [c000000384d676e0] [d00000000aa31b04] pnv_php_register+0x564/0x5a0 [pnv_php]
>> [c000000384d677c0] [d00000000aa31658] pnv_php_register+0xb8/0x5a0 [pnv_php]
>> [c000000384d678a0] [d00000000aa31658] pnv_php_register+0xb8/0x5a0 [pnv_php]
>> [c000000384d67980] [d00000000aa31dfc] pnv_php_init+0x60/0x98 [pnv_php]
>> [c000000384d679f0] [c00000000000cfdc] do_one_initcall+0x6c/0x1d0
>> [c000000384d67ab0] [c000000000b92354] do_init_module+0x94/0x254
>> [c000000384d67b40] [c00000000019719c] load_module+0x258c/0x2c60
>> [c000000384d67d30] [c000000000197bb0] SyS_finit_module+0xf0/0x170
>> [c000000384d67e30] [c00000000000b184] system_call+0x38/0xe0
>>360aebd85a4c
>>This fixes the issue by skipping enabling the surprise hotplug
>>capability if the MSI or MSIx on the PCI slot's upstream port has
>>been enabled by other driver.
>>
>>Cc: <stable@vger.kernel.org> # v4.9+
>>Fixes: 360aebd85a4c ("drivers/pci/hotplug: Support surprise hotplug in powernv driver")
>>Signed-off-by: Gavin Shan <gwshan@linux.vnet.ibm.com>
>
>Should this print something to the kernel log to indicate that surprise
>hotplug is unavailable?
>

I don't think it's necessary as the situation can be known from lspci
and /proc/interrupts easily. Otherwise, we could add pr_warn_once()
to print the warning message for once, not on all slots.

Thanks,
Gavin

  reply	other threads:[~2017-02-16  5:51 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-02-15 23:22 [PATCH 0/3] pci/hotplug/pnv-php: More bug fixes Gavin Shan
2017-02-15 23:22 ` [PATCH 1/3] pci/hotplug/pnv-php: Remove WARN_ON() in pnv_php_put_slot() Gavin Shan
2017-02-16  4:46   ` Andrew Donnellan
2017-02-16  6:10     ` Vaibhav Jain
2017-02-19 11:33   ` [1/3] " Michael Ellerman
2017-02-15 23:22 ` [PATCH 2/3] pci/hotplug/pnv-php: Disable surprise hotplug capability on conflicts Gavin Shan
2017-02-16  4:31   ` Andrew Donnellan
2017-02-16  5:50     ` Gavin Shan [this message]
2017-02-16  6:11     ` Vaibhav Jain
2017-02-15 23:22 ` [PATCH 3/3] pci/hotplug/pnv-php: Disable MSI and PCI device properly Gavin Shan
2017-02-16  4:45   ` Andrew Donnellan
2017-02-16 14:09 ` [PATCH 0/3] pci/hotplug/pnv-php: More bug fixes Bjorn Helgaas
2017-02-16 22:38   ` Gavin Shan
2017-02-16 23:28     ` Bjorn Helgaas
2017-02-16 23:39       ` Gavin Shan
2017-02-17 11:13       ` Michael Ellerman

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=20170216055023.GA16031@gwshan \
    --to=gwshan@linux.vnet.ibm.com \
    --cc=andrew.donnellan@au1.ibm.com \
    --cc=bhelgaas@google.com \
    --cc=linux-pci@vger.kernel.org \
    --cc=linuxppc-dev@lists.ozlabs.org \
    --cc=stable@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).