* [PATCH] powerpc/powernv: document cxl dependency on special case in pnv_eeh_reset()
@ 2016-07-22 7:16 Andrew Donnellan
2016-07-25 0:13 ` Gavin Shan
2017-05-03 22:18 ` Michael Ellerman
0 siblings, 2 replies; 3+ messages in thread
From: Andrew Donnellan @ 2016-07-22 7:16 UTC (permalink / raw)
To: linuxppc-dev; +Cc: gwshan, imunsie
pnv_eeh_reset() has special handling for PEs whose primary bus is the root
bus or the bus immediately underneath the root port.
The cxl bi-modal card support added in b0b5e5918ad1 ("cxl: Add
cxl_check_and_switch_mode() API to switch bi-modal cards") relies on this
behaviour when hot-resetting the CAPI adapter following a mode switch.
Document this in pnv_eeh_reset() so we don't accidentally break it.
Suggested-by: Gavin Shan <gwshan@linux.vnet.ibm.com>
Signed-off-by: Andrew Donnellan <andrew.donnellan@au1.ibm.com>
---
Gavin requested that I add this comment a few weeks ago but I didn't get
around to including it in b0b5e5918ad1. Sorry Gavin!
---
arch/powerpc/platforms/powernv/eeh-powernv.c | 7 +++++++
1 file changed, 7 insertions(+)
diff --git a/arch/powerpc/platforms/powernv/eeh-powernv.c b/arch/powerpc/platforms/powernv/eeh-powernv.c
index 86544ea..3af854e 100644
--- a/arch/powerpc/platforms/powernv/eeh-powernv.c
+++ b/arch/powerpc/platforms/powernv/eeh-powernv.c
@@ -1094,6 +1094,13 @@ static int pnv_eeh_reset(struct eeh_pe *pe, int option)
if (pe->type & EEH_PE_VF)
return pnv_eeh_reset_vf_pe(pe, option);
+ /*
+ * If dealing with the root bus (or the bus underneath the
+ * root port), we reset the bus underneath the root port.
+ *
+ * The cxl driver depends on this behaviour for bi-modal card
+ * switching.
+ */
if (pci_is_root_bus(bus) ||
pci_is_root_bus(bus->parent))
return pnv_eeh_root_reset(hose, option);
--
Andrew Donnellan OzLabs, ADL Canberra
andrew.donnellan@au1.ibm.com IBM Australia Limited
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH] powerpc/powernv: document cxl dependency on special case in pnv_eeh_reset()
2016-07-22 7:16 [PATCH] powerpc/powernv: document cxl dependency on special case in pnv_eeh_reset() Andrew Donnellan
@ 2016-07-25 0:13 ` Gavin Shan
2017-05-03 22:18 ` Michael Ellerman
1 sibling, 0 replies; 3+ messages in thread
From: Gavin Shan @ 2016-07-25 0:13 UTC (permalink / raw)
To: Andrew Donnellan; +Cc: linuxppc-dev, gwshan, imunsie
On Fri, Jul 22, 2016 at 05:16:35PM +1000, Andrew Donnellan wrote:
>pnv_eeh_reset() has special handling for PEs whose primary bus is the root
>bus or the bus immediately underneath the root port.
>
>The cxl bi-modal card support added in b0b5e5918ad1 ("cxl: Add
>cxl_check_and_switch_mode() API to switch bi-modal cards") relies on this
>behaviour when hot-resetting the CAPI adapter following a mode switch.
>Document this in pnv_eeh_reset() so we don't accidentally break it.
>
>Suggested-by: Gavin Shan <gwshan@linux.vnet.ibm.com>
>Signed-off-by: Andrew Donnellan <andrew.donnellan@au1.ibm.com>
>
Reviewed-by: Gavin Shan <gwshan@linux.vnet.ibm.com>
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: powerpc/powernv: document cxl dependency on special case in pnv_eeh_reset()
2016-07-22 7:16 [PATCH] powerpc/powernv: document cxl dependency on special case in pnv_eeh_reset() Andrew Donnellan
2016-07-25 0:13 ` Gavin Shan
@ 2017-05-03 22:18 ` Michael Ellerman
1 sibling, 0 replies; 3+ messages in thread
From: Michael Ellerman @ 2017-05-03 22:18 UTC (permalink / raw)
To: Andrew Donnellan, linuxppc-dev; +Cc: gwshan, imunsie
On Fri, 2016-07-22 at 07:16:35 UTC, Andrew Donnellan wrote:
> pnv_eeh_reset() has special handling for PEs whose primary bus is the root
> bus or the bus immediately underneath the root port.
>
> The cxl bi-modal card support added in b0b5e5918ad1 ("cxl: Add
> cxl_check_and_switch_mode() API to switch bi-modal cards") relies on this
> behaviour when hot-resetting the CAPI adapter following a mode switch.
> Document this in pnv_eeh_reset() so we don't accidentally break it.
>
> Suggested-by: Gavin Shan <gwshan@linux.vnet.ibm.com>
> Signed-off-by: Andrew Donnellan <andrew.donnellan@au1.ibm.com>
> Reviewed-by: Gavin Shan <gwshan@linux.vnet.ibm.com>
Applied to powerpc next, thanks.
https://git.kernel.org/powerpc/c/b7da1230532984fc00962b2c8be94a
cheers
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2017-05-03 22:18 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-07-22 7:16 [PATCH] powerpc/powernv: document cxl dependency on special case in pnv_eeh_reset() Andrew Donnellan
2016-07-25 0:13 ` Gavin Shan
2017-05-03 22:18 ` Michael Ellerman
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).