From: Sam Bobroff <sbobroff@linux.ibm.com>
To: "Oliver O'Halloran" <oohall@gmail.com>
Cc: linuxppc-dev@lists.ozlabs.org
Subject: Re: [PATCH 11/14] powerpc/eeh: Set attention indicator while recovering
Date: Tue, 17 Sep 2019 11:23:27 +1000 [thread overview]
Message-ID: <20190917012326.GH21303@tungsten.ozlabs.ibm.com> (raw)
In-Reply-To: <20190903101605.2890-12-oohall@gmail.com>
[-- Attachment #1: Type: text/plain, Size: 2535 bytes --]
On Tue, Sep 03, 2019 at 08:16:02PM +1000, Oliver O'Halloran wrote:
> I am the RAS team. Hear me roar.
>
> Roar.
>
> On a more serious note, being able to locate failed devices can be helpful.
> Set the attention indicator if the slot supports it once we've determined
> the device is present and only clear it if the device is fully recovered.
>
> Signed-off-by: Oliver O'Halloran <oohall@gmail.com>
Looks good, although I think it would be clearer if you could separate
checking the slot from raising the alert.
Reviewed-by: Sam Bobroff <sbobroff@linux.ibm.com>
> ---
> arch/powerpc/kernel/eeh_driver.c | 32 ++++++++++++++++++++++++++++++++
> 1 file changed, 32 insertions(+)
>
> diff --git a/arch/powerpc/kernel/eeh_driver.c b/arch/powerpc/kernel/eeh_driver.c
> index 0d34cc12c529..80bd157fcb45 100644
> --- a/arch/powerpc/kernel/eeh_driver.c
> +++ b/arch/powerpc/kernel/eeh_driver.c
> @@ -803,6 +803,10 @@ static bool eeh_slot_presence_check(struct pci_dev *pdev)
> if (!ops || !ops->get_adapter_status)
> return true;
>
> + /* set the attention indicator while we've got the slot ops */
> + if (ops->set_attention_status)
> + ops->set_attention_status(slot->hotplug, 1);
> +
> rc = ops->get_adapter_status(slot->hotplug, &state);
> if (rc)
> return true;
> @@ -810,6 +814,28 @@ static bool eeh_slot_presence_check(struct pci_dev *pdev)
> return !!state;
> }
>
> +static void eeh_clear_slot_attention(struct pci_dev *pdev)
> +{
> + const struct hotplug_slot_ops *ops;
> + struct pci_slot *slot;
> +
> + if (!pdev)
> + return;
> +
> + if (pdev->error_state == pci_channel_io_perm_failure)
> + return;
> +
> + slot = pdev->slot;
> + if (!slot || !slot->hotplug)
> + return;
> +
> + ops = slot->hotplug->ops;
> + if (!ops || !ops->set_attention_status)
> + return;
> +
> + ops->set_attention_status(slot->hotplug, 0);
> +}
> +
> /**
> * eeh_handle_normal_event - Handle EEH events on a specific PE
> * @pe: EEH PE - which should not be used after we return, as it may
> @@ -1098,6 +1124,12 @@ void eeh_handle_normal_event(struct eeh_pe *pe)
> * we don't want to modify the PE tree structure so we do it here.
> */
> eeh_pe_cleanup(pe);
> +
> + /* clear the slot attention LED for all recovered devices */
> + eeh_for_each_pe(pe, tmp_pe)
> + eeh_pe_for_each_dev(tmp_pe, edev, tmp)
> + eeh_clear_slot_attention(edev->pdev);
> +
> eeh_pe_state_clear(pe, EEH_PE_RECOVERING, true);
> }
>
> --
> 2.21.0
>
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 488 bytes --]
next prev parent reply other threads:[~2019-09-17 1:25 UTC|newest]
Thread overview: 34+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-09-03 10:15 EEH + hotplug fixes Oliver O'Halloran
2019-09-03 10:15 ` [PATCH 01/14] powerpc/eeh: Clean up EEH PEs after recovery finishes Oliver O'Halloran
2019-09-17 0:43 ` Sam Bobroff
2019-09-19 10:25 ` Michael Ellerman
2019-09-03 10:15 ` [PATCH 02/14] powerpc/eeh: Fix race when freeing PDNs Oliver O'Halloran
2019-09-17 0:50 ` Sam Bobroff
2019-09-03 10:15 ` [PATCH 03/14] powerpc/eeh: Make permanently failed devices non-actionable Oliver O'Halloran
2019-09-17 0:51 ` Sam Bobroff
2019-09-03 10:15 ` [PATCH 04/14] powerpc/eeh: Check slot presence state in eeh_handle_normal_event() Oliver O'Halloran
2019-09-17 1:00 ` Sam Bobroff
2019-09-17 4:20 ` Oliver O'Halloran
2019-09-03 10:15 ` [PATCH 05/14] powerpc/eeh: Defer printing stack trace Oliver O'Halloran
2019-09-17 1:04 ` Sam Bobroff
2019-09-17 1:45 ` Oliver O'Halloran
2019-09-17 3:35 ` Sam Bobroff
2019-09-17 3:38 ` Oliver O'Halloran
2019-09-03 10:15 ` [PATCH 06/14] powerpc/eeh: Remove stale CAPI comment Oliver O'Halloran
2019-09-03 14:09 ` Andrew Donnellan
2019-09-17 1:04 ` Sam Bobroff
2019-09-03 10:15 ` [PATCH 07/14] powernv/eeh: Use generic code to handle hot resets Oliver O'Halloran
2019-09-17 1:15 ` Sam Bobroff
2019-09-17 7:30 ` Oliver O'Halloran
2019-09-03 10:15 ` [PATCH 08/14] pci-hotplug/pnv_php: Add a reset_slot() callback Oliver O'Halloran
2019-09-03 10:16 ` [PATCH 09/14] pci-hotplug/pnv_php: Add support for IODA3 Power9 PHBs Oliver O'Halloran
2019-09-03 10:16 ` [PATCH 10/14] pci-hotplug/pnv_php: Add attention indicator support Oliver O'Halloran
2019-09-03 10:16 ` [PATCH 11/14] powerpc/eeh: Set attention indicator while recovering Oliver O'Halloran
2019-09-17 1:23 ` Sam Bobroff [this message]
2019-09-03 10:16 ` [PATCH 12/14] powerpc/eeh: Add debugfs interface to run an EEH check Oliver O'Halloran
2019-09-17 3:15 ` Sam Bobroff
2019-09-17 3:36 ` Oliver O'Halloran
2019-09-17 4:23 ` Oliver O'Halloran
2019-09-03 10:16 ` [PATCH 13/14] powerpc/eeh: Add a eeh_dev_break debugfs interface Oliver O'Halloran
2019-09-17 3:19 ` Sam Bobroff
2019-09-03 10:16 ` [PATCH 14/14] selftests/powerpc: Add basic EEH selftest Oliver O'Halloran
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=20190917012326.GH21303@tungsten.ozlabs.ibm.com \
--to=sbobroff@linux.ibm.com \
--cc=linuxppc-dev@lists.ozlabs.org \
--cc=oohall@gmail.com \
/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).