linux-pci.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Sinan Kaya <okaya@kernel.org>
To: Lukas Wunner <lukas@wunner.de>
Cc: linux-pci@vger.kernel.org, Bjorn Helgaas <bhelgaas@google.com>,
	Andy Shevchenko <andy.shevchenko@gmail.com>,
	Mika Westerberg <mika.westerberg@linux.intel.com>,
	open list <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH v8 2/2] PCI: pciehp: Mask AER surprise link down error if hotplug is enabled
Date: Mon, 20 Aug 2018 13:43:22 -0400	[thread overview]
Message-ID: <38fd0d0a-6d60-c8db-f155-e6078260513b@kernel.org> (raw)
In-Reply-To: <20180820082150.r4q47ppqqclaschd@wunner.de>

On 8/20/2018 4:21 AM, Lukas Wunner wrote:
> On Fri, Aug 17, 2018 at 11:51:10PM -0700, Sinan Kaya wrote:
>> +static int pciehp_control_surprise_error(struct controller *ctrl, bool enable)
> 
> The return value isn't checked, so this could return void.
> 

Sure, I can do that.

> 
>> @@ -280,6 +303,9 @@ static int pciehp_probe(struct pcie_device *dev)
>>   
>>   	pciehp_check_presence(ctrl);
>>   
>> +	/* We want exclusive control of link down events in hotplug driver */
>> +	pciehp_control_surprise_error(ctrl, false);
>> +
>>   	return 0;
> 
> Hm, if the platform firmware hasn't granted native hotplug control to OSPM,
> or if some other hotplug driver than pciehp is used, shouldn't surprise down
> be ignored by error recovery as well?  If yes, the mask would have to be set
> in generic code somewhere in drivers/pci/probe.c I guess, based on the
> is_hotplug_bridge bit in struct pci_dev.

I could move this code if we know that is_hotplug_bridge flag is set
regardless of OS hotplug driver control or not.


> 
> (Interestingly, PCI_ERR_UNCOR_MASK is already changed in probe.c by
> program_hpp_type2().  That seems to be ACPI-specific code, which kind
> of begs the question why it's not in pci-acpi.c?)

Yes, you can tell the OS what AER mask to set following hotplug
insertion via ACPI HPP table especially if you remove a hotplug bridge.
This is used during ACPI hotplug.

> 
> Thanks,
> 
> Lukas
> 

  reply	other threads:[~2018-08-20 21:00 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-08-18  6:51 [PATCH v8 1/2] PCI: pciehp: Ignore link events when there is a fatal error pending Sinan Kaya
2018-08-18  6:51 ` [PATCH v8 2/2] PCI: pciehp: Mask AER surprise link down error if hotplug is enabled Sinan Kaya
2018-08-19 23:23   ` Sinan Kaya
2018-08-20  0:20   ` kbuild test robot
2018-08-20  8:21   ` Lukas Wunner
2018-08-20 17:43     ` Sinan Kaya [this message]
2018-08-20  9:22 ` [PATCH v8 1/2] PCI: pciehp: Ignore link events when there is a fatal error pending Lukas Wunner
2018-08-20 16:59   ` Sinan Kaya
2018-08-20 17:22     ` Lukas Wunner

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=38fd0d0a-6d60-c8db-f155-e6078260513b@kernel.org \
    --to=okaya@kernel.org \
    --cc=andy.shevchenko@gmail.com \
    --cc=bhelgaas@google.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-pci@vger.kernel.org \
    --cc=lukas@wunner.de \
    --cc=mika.westerberg@linux.intel.com \
    --subject='Re: [PATCH v8 2/2] PCI: pciehp: Mask AER surprise link down error if hotplug is enabled' \
    /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

This is a public inbox, see mirroring instructions
on how to clone and mirror all data and code used for this inbox