[PATCH v4 0/2] PCI hotplug driver fixes

Krishna Kumar posted 2 patches 1 year, 5 months ago
arch/powerpc/include/asm/ppc-pci.h |  4 ++++
arch/powerpc/kernel/pci-hotplug.c  |  5 ++---
arch/powerpc/kernel/pci_dn.c       | 32 ++++++++++++++++++++++++++++++
drivers/pci/hotplug/pnv_php.c      |  3 +--
4 files changed, 39 insertions(+), 5 deletions(-)
[PATCH v4 0/2] PCI hotplug driver fixes
Posted by Krishna Kumar 1 year, 5 months ago
The fix of Powerpc hotplug driver (drivers/pci/hotplug/pnv_php.c)
addresses below two issues.

1. Kernel Crash during hot unplug of bridge/switch slot.

2. Bridge Support Enablement - Previously, when we do a hot-unplug
operation on a bridge slot, all the ports and devices behind the
bridge-ports would be hot-unplugged/offline, but when we do a hot-plug
operation on the same bridge slot, all the ports and devices behind the
bridge would not get hot-plugged/online. In this case, Only the first
port of the bridge gets enabled and the remaining port/devices remain
unplugged/offline.  After the fix, The hot-unplug and hot-plug
operations on the slot associated with the bridge started behaving
correctly and became in sync. Now, after the hot plug operation on the
same slot, all the bridge ports and devices behind the bridge become
hot-plugged/online/restored in the same manner as it was before the
hot-unplug operation.



Krishna Kumar (2):
  pci/hotplug/pnv_php: Fix hotplug driver crash on Powernv
  powerpc: hotplug driver bridge support

 arch/powerpc/include/asm/ppc-pci.h |  4 ++++
 arch/powerpc/kernel/pci-hotplug.c  |  5 ++---
 arch/powerpc/kernel/pci_dn.c       | 32 ++++++++++++++++++++++++++++++
 drivers/pci/hotplug/pnv_php.c      |  3 +--
 4 files changed, 39 insertions(+), 5 deletions(-)

Changelog:
==========

v4: 1st July 2024
  - Changed the description and corrected the typo in patch1
  - Added Acked-by and Tested-by tag in patch1
  - Added Tested-by tag in patch2

v3: 24 June 2024
  - Removed the DPC keyword from description in cover letter and
    patch2

v2: 14 May 2024
  - Used of_property_read_u32() in place of of_get_property() and
    of_read_number(). [patch2]
  - Removed some unnecessary variable and changed the function return
    type from void* to void. [patch2]
  - Removed the export declaration of
    pci_traverse_sibling_nodes_and_scan_slot() as its not needed.
    [patch2]


-- 
2.45.0

Re: [PATCH v4 0/2] PCI hotplug driver fixes
Posted by Michael Ellerman 1 year, 5 months ago
On Mon, 01 Jul 2024 13:15:05 +0530, Krishna Kumar wrote:
> The fix of Powerpc hotplug driver (drivers/pci/hotplug/pnv_php.c)
> addresses below two issues.
> 
> 1. Kernel Crash during hot unplug of bridge/switch slot.
> 
> 2. Bridge Support Enablement - Previously, when we do a hot-unplug
> operation on a bridge slot, all the ports and devices behind the
> bridge-ports would be hot-unplugged/offline, but when we do a hot-plug
> operation on the same bridge slot, all the ports and devices behind the
> bridge would not get hot-plugged/online. In this case, Only the first
> port of the bridge gets enabled and the remaining port/devices remain
> unplugged/offline.  After the fix, The hot-unplug and hot-plug
> operations on the slot associated with the bridge started behaving
> correctly and became in sync. Now, after the hot plug operation on the
> same slot, all the bridge ports and devices behind the bridge become
> hot-plugged/online/restored in the same manner as it was before the
> hot-unplug operation.
> 
> [...]

Applied to powerpc/next.

[1/2] pci/hotplug/pnv_php: Fix hotplug driver crash on Powernv
      https://git.kernel.org/powerpc/c/335e35b748527f0c06ded9eebb65387f60647fda
[2/2] powerpc: hotplug driver bridge support
      https://git.kernel.org/powerpc/c/20ce0c247b2500cb7060cb115274ba71abda2626

cheers