All of lore.kernel.org
 help / color / mirror / Atom feed
From: Lukas Wunner <lukas@wunner.de>
To: Sinan Kaya <okaya@kernel.org>
Cc: Alex_Gagniuc@Dellteam.com, mr.nuke.me@gmail.com,
	keith.busch@intel.com, linux-pci@vger.kernel.org,
	Austin.Bolen@dell.com, Stuart.Hayes@dell.com,
	Narendra.K@dell.com, Christopher.Arzola@dell.com,
	David.Chalfant@dell.com
Subject: Re: Should a PCIe Link Down event set the PCI_DEV_DISCONNECTED bit?
Date: Sun, 29 Jul 2018 14:09:01 +0200	[thread overview]
Message-ID: <20180729120901.GA8489@wunner.de> (raw)
In-Reply-To: <29894244-e682-9394-c408-bd989fb4716a@kernel.org>

On Sat, Jul 28, 2018 at 05:26:57PM -0700, Sinan Kaya wrote:
> On 7/28/2018 11:31 AM, Lukas Wunner wrote:
> >The knowledge whether a surprise removal or a safe removal is at hand
> >does exist further up in the call stack:  A surprise removal is
> >initiated by pciehp_handle_presence_or_link_change(), a safe removal by
> >pciehp_handle_disable_request().
> 
> Can you also check if platform supports surprise link down error
> reporting (Link Capabilities Register) and reports a surprise link
> down event in AER Uncorrectable Error Status Register for the
> hotplug code to make it more reliable?

We read the Link Capabilities register in pcie_init() to determine if
Data Link Layer Link Active Reporting is supported.  (That's a feature
added in the PCIe r1.1 Base Spec.  Old devices that strictly adhere to
PCIe r1.0 don't support it.)

We could likewise cache the Surprise Down Error Reporting Capable bit
in struct controller.  But I don't quite understand yet how and when
you want it to be used by pciehp?  If the link goes down, pciehp doesn't
care whether that's caused by a fatal error or removal by the user.
It seems correct to me to also remove devices on a fatal error, after all
they're no longer accessible until the error is cleared (IIUC).
Do you agree or disagree?

Thanks,

Lukas

  reply	other threads:[~2018-07-29 13:39 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-07-26 22:38 Should a PCIe Link Down event set the PCI_DEV_DISCONNECTED bit? Alex G.
2018-07-26 23:00 ` Rajat Jain
2018-07-27  0:04   ` Alex_Gagniuc
2018-07-27  7:18 ` Lukas Wunner
2018-07-27 15:52   ` Alex_Gagniuc
2018-07-27 17:05     ` Lukas Wunner
2018-07-27 17:51       ` Alex_Gagniuc
2018-07-27 18:17         ` Sinan Kaya
2018-07-27 18:23           ` Alex_Gagniuc
2018-07-27 18:34             ` Sinan Kaya
2018-07-28 18:31         ` Lukas Wunner
2018-07-29  0:26           ` Sinan Kaya
2018-07-29 12:09             ` Lukas Wunner [this message]
2018-07-29 16:59               ` Sinan Kaya
2018-07-30 13:28           ` David Laight
2018-07-30 13:54             ` Lukas Wunner
2018-07-30 16:06               ` David Laight
2018-07-30 21:38           ` Alex_Gagniuc
2018-07-31  9:28             ` Lukas Wunner
2018-07-31 16:35               ` Alex_Gagniuc
2018-08-01  8:58                 ` David Laight
2018-08-01 19:06                   ` Alex_Gagniuc

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=20180729120901.GA8489@wunner.de \
    --to=lukas@wunner.de \
    --cc=Alex_Gagniuc@Dellteam.com \
    --cc=Austin.Bolen@dell.com \
    --cc=Christopher.Arzola@dell.com \
    --cc=David.Chalfant@dell.com \
    --cc=Narendra.K@dell.com \
    --cc=Stuart.Hayes@dell.com \
    --cc=keith.busch@intel.com \
    --cc=linux-pci@vger.kernel.org \
    --cc=mr.nuke.me@gmail.com \
    --cc=okaya@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.