From: Gavin Shan <gwshan@linux.vnet.ibm.com>
To: Gavin Shan <gwshan@linux.vnet.ibm.com>
Cc: linux-pci@vger.kernel.org, linuxppc-dev@lists.ozlabs.org,
benh@kernel.crashing.org, mpe@ellerman.id.au
Subject: Re: [PATCH v2 0/5] PCI Hotplug Driver for PowerPC PowerNV
Date: Tue, 17 Feb 2015 13:30:19 +1100 [thread overview]
Message-ID: <20150217023019.GC17352@shangw> (raw)
In-Reply-To: <1417672488-27341-1-git-send-email-gwshan@linux.vnet.ibm.com>
On Thu, Dec 04, 2014 at 04:54:43PM +1100, Gavin Shan wrote:
Please ignore this one. I'll rebase the repost new revision later.
Thanks,
Gavin
>The series of patches depends on the OPAL firmware changes. If the firmware
>doesn't have the changes, PCI hotplug slots won't be populated properly.
>Other than that, no more problems found.
>
>A new driver "powernv-php.ko" is introduced by the patchset to support
>PCI hotplug for PowerNV platform. The device tree is scanned when the
>driver is loaded. If any PCI device node is equipped with property "ibm,
>slot-pluggable" and "ibm,reset-by-firmware", it's regarded as hotpluggable
>slot and the driver creates/registers slot for it. After that, the sysfs
>entries can be used to operate the slot.
>
>PATCH[1-4]: Necessary code changes to PPC PCI subsystem in order to
> support PCI slots for PPC PowerNV platform.
>PATCH[5] : powernv-php driver to support PCI hotplug for PowerNV
> platform.
>
>Testing
>=======
># cat /proc/cpuinfo | grep -i powernv
>platform : PowerNV
>machine : PowerNV 8286-41A
>
># pwd
>/sys/bus/pci/slots
># ls
>C10 C11 C12 C14 C15 C6 C7 C8 C9
>
># lspci -s 0003::.
>0003:00:00.0 PCI bridge: IBM Device 03dc
>0003:01:00.0 PCI bridge: PLX Technology, Inc. Device 8748 (rev ca)
>0003:02:01.0 PCI bridge: PLX Technology, Inc. Device 8748 (rev ca)
>0003:02:08.0 PCI bridge: PLX Technology, Inc. Device 8748 (rev ca)
>0003:02:09.0 PCI bridge: PLX Technology, Inc. Device 8748 (rev ca)
>0003:02:10.0 PCI bridge: PLX Technology, Inc. Device 8748 (rev ca)
>0003:02:11.0 PCI bridge: PLX Technology, Inc. Device 8748 (rev ca)
>0003:03:00.0 USB controller: Texas Instruments TUSB73x0 SuperSpeed USB 3.0 xHCI Host Controller (rev 02)
>0003:09:00.0 Ethernet controller: Broadcom Corporation NetXtreme BCM5719 Gigabit Ethernet PCIe (rev 01)
>0003:09:00.1 Ethernet controller: Broadcom Corporation NetXtreme BCM5719 Gigabit Ethernet PCIe (rev 01)
>0003:09:00.2 Ethernet controller: Broadcom Corporation NetXtreme BCM5719 Gigabit Ethernet PCIe (rev 01)
>0003:09:00.3 Ethernet controller: Broadcom Corporation NetXtreme BCM5719 Gigabit Ethernet PCIe (rev 01)
>0003:0f:00.0 Network controller: Mellanox Technologies MT27500 Family [ConnectX-3]
># pwd
>/sys/bus/pci/slots/C10
># cat address
>0003:09:00
># cat cur_bus_speed
>5.0 GT/s PCIe
># cat max_bus_speed
>8.0 GT/s PCIe
># cat power
>1
># echo 0 > power
># lspci -s 0003::.
>0003:00:00.0 PCI bridge: IBM Device 03dc
>0003:01:00.0 PCI bridge: PLX Technology, Inc. Device 8748 (rev ca)
>0003:02:01.0 PCI bridge: PLX Technology, Inc. Device 8748 (rev ca)
>0003:02:08.0 PCI bridge: PLX Technology, Inc. Device 8748 (rev ca)
>0003:02:09.0 PCI bridge: PLX Technology, Inc. Device 8748 (rev ca)
>0003:02:10.0 PCI bridge: PLX Technology, Inc. Device 8748 (rev ca)
>0003:02:11.0 PCI bridge: PLX Technology, Inc. Device 8748 (rev ca)
>0003:03:00.0 USB controller: Texas Instruments TUSB73x0 SuperSpeed USB 3.0 xHCI Host Controller (rev 02)
>0003:0f:00.0 Network controller: Mellanox Technologies MT27500 Family [ConnectX-3]
># echo 1 > power
># lspci -s 0003::.
>0003:00:00.0 PCI bridge: IBM Device 03dc
>0003:01:00.0 PCI bridge: PLX Technology, Inc. Device 8748 (rev ca)
>0003:02:01.0 PCI bridge: PLX Technology, Inc. Device 8748 (rev ca)
>0003:02:08.0 PCI bridge: PLX Technology, Inc. Device 8748 (rev ca)
>0003:02:09.0 PCI bridge: PLX Technology, Inc. Device 8748 (rev ca)
>0003:02:10.0 PCI bridge: PLX Technology, Inc. Device 8748 (rev ca)
>0003:02:11.0 PCI bridge: PLX Technology, Inc. Device 8748 (rev ca)
>0003:03:00.0 USB controller: Texas Instruments TUSB73x0 SuperSpeed USB 3.0 xHCI Host Controller (rev 02)
>0003:09:00.0 Ethernet controller: Broadcom Corporation NetXtreme BCM5719 Gigabit Ethernet PCIe (rev 01)
>0003:09:00.1 Ethernet controller: Broadcom Corporation NetXtreme BCM5719 Gigabit Ethernet PCIe (rev 01)
>0003:09:00.2 Ethernet controller: Broadcom Corporation NetXtreme BCM5719 Gigabit Ethernet PCIe (rev 01)
>0003:09:00.3 Ethernet controller: Broadcom Corporation NetXtreme BCM5719 Gigabit Ethernet PCIe (rev 01)
>0003:0f:00.0 Network controller: Mellanox Technologies MT27500 Family [ConnectX-3]
>
>Changelog
>=========
>v1 -> v2:
> * Separate powernv-php driver to support PCI hotplug for
> PowerNV platform.
> * Check if the OPAL API supported by firmware before calling
> into it, which is necessary for back-compability.
> * Separate patch for factoring pnv_pci_poll().
>
>Gavin Shan (5):
> powerpc/pci: Move pcibios_find_pci_bus() around
> powerpc/pci: Don't scan empty slot
> powerpc/powernv: Introduce pnv_pci_poll()
> powerpc/powernv: Functions to retrieve PCI slot status
> PCI/hotplug: PowerPC PowerNV PCI hotplug driver
>
> arch/powerpc/include/asm/opal.h | 4 +
> arch/powerpc/include/asm/pnv-pci.h | 3 +
> arch/powerpc/kernel/pci-hotplug.c | 39 ++-
> arch/powerpc/platforms/powernv/eeh-ioda.c | 28 +-
> arch/powerpc/platforms/powernv/opal-wrappers.S | 2 +
> arch/powerpc/platforms/powernv/pci.c | 43 +++
> arch/powerpc/platforms/powernv/pci.h | 1 +
> arch/powerpc/platforms/pseries/pci_dlpar.c | 32 ---
> drivers/pci/hotplug/Kconfig | 12 +
> drivers/pci/hotplug/Makefile | 4 +
> drivers/pci/hotplug/powernv_php.c | 126 ++++++++
> drivers/pci/hotplug/powernv_php.h | 70 +++++
> drivers/pci/hotplug/powernv_php_slot.c | 382 +++++++++++++++++++++++++
> 13 files changed, 687 insertions(+), 59 deletions(-)
> create mode 100644 drivers/pci/hotplug/powernv_php.c
> create mode 100644 drivers/pci/hotplug/powernv_php.h
> create mode 100644 drivers/pci/hotplug/powernv_php_slot.c
>
>Thanks,
>Gavin
WARNING: multiple messages have this Message-ID (diff)
From: Gavin Shan <gwshan@linux.vnet.ibm.com>
To: Gavin Shan <gwshan@linux.vnet.ibm.com>
Cc: linux-pci@vger.kernel.org, linuxppc-dev@lists.ozlabs.org
Subject: Re: [PATCH v2 0/5] PCI Hotplug Driver for PowerPC PowerNV
Date: Tue, 17 Feb 2015 13:30:19 +1100 [thread overview]
Message-ID: <20150217023019.GC17352@shangw> (raw)
In-Reply-To: <1417672488-27341-1-git-send-email-gwshan@linux.vnet.ibm.com>
On Thu, Dec 04, 2014 at 04:54:43PM +1100, Gavin Shan wrote:
Please ignore this one. I'll rebase the repost new revision later.
Thanks,
Gavin
>The series of patches depends on the OPAL firmware changes. If the firmware
>doesn't have the changes, PCI hotplug slots won't be populated properly.
>Other than that, no more problems found.
>
>A new driver "powernv-php.ko" is introduced by the patchset to support
>PCI hotplug for PowerNV platform. The device tree is scanned when the
>driver is loaded. If any PCI device node is equipped with property "ibm,
>slot-pluggable" and "ibm,reset-by-firmware", it's regarded as hotpluggable
>slot and the driver creates/registers slot for it. After that, the sysfs
>entries can be used to operate the slot.
>
>PATCH[1-4]: Necessary code changes to PPC PCI subsystem in order to
> support PCI slots for PPC PowerNV platform.
>PATCH[5] : powernv-php driver to support PCI hotplug for PowerNV
> platform.
>
>Testing
>=======
># cat /proc/cpuinfo | grep -i powernv
>platform : PowerNV
>machine : PowerNV 8286-41A
>
># pwd
>/sys/bus/pci/slots
># ls
>C10 C11 C12 C14 C15 C6 C7 C8 C9
>
># lspci -s 0003::.
>0003:00:00.0 PCI bridge: IBM Device 03dc
>0003:01:00.0 PCI bridge: PLX Technology, Inc. Device 8748 (rev ca)
>0003:02:01.0 PCI bridge: PLX Technology, Inc. Device 8748 (rev ca)
>0003:02:08.0 PCI bridge: PLX Technology, Inc. Device 8748 (rev ca)
>0003:02:09.0 PCI bridge: PLX Technology, Inc. Device 8748 (rev ca)
>0003:02:10.0 PCI bridge: PLX Technology, Inc. Device 8748 (rev ca)
>0003:02:11.0 PCI bridge: PLX Technology, Inc. Device 8748 (rev ca)
>0003:03:00.0 USB controller: Texas Instruments TUSB73x0 SuperSpeed USB 3.0 xHCI Host Controller (rev 02)
>0003:09:00.0 Ethernet controller: Broadcom Corporation NetXtreme BCM5719 Gigabit Ethernet PCIe (rev 01)
>0003:09:00.1 Ethernet controller: Broadcom Corporation NetXtreme BCM5719 Gigabit Ethernet PCIe (rev 01)
>0003:09:00.2 Ethernet controller: Broadcom Corporation NetXtreme BCM5719 Gigabit Ethernet PCIe (rev 01)
>0003:09:00.3 Ethernet controller: Broadcom Corporation NetXtreme BCM5719 Gigabit Ethernet PCIe (rev 01)
>0003:0f:00.0 Network controller: Mellanox Technologies MT27500 Family [ConnectX-3]
># pwd
>/sys/bus/pci/slots/C10
># cat address
>0003:09:00
># cat cur_bus_speed
>5.0 GT/s PCIe
># cat max_bus_speed
>8.0 GT/s PCIe
># cat power
>1
># echo 0 > power
># lspci -s 0003::.
>0003:00:00.0 PCI bridge: IBM Device 03dc
>0003:01:00.0 PCI bridge: PLX Technology, Inc. Device 8748 (rev ca)
>0003:02:01.0 PCI bridge: PLX Technology, Inc. Device 8748 (rev ca)
>0003:02:08.0 PCI bridge: PLX Technology, Inc. Device 8748 (rev ca)
>0003:02:09.0 PCI bridge: PLX Technology, Inc. Device 8748 (rev ca)
>0003:02:10.0 PCI bridge: PLX Technology, Inc. Device 8748 (rev ca)
>0003:02:11.0 PCI bridge: PLX Technology, Inc. Device 8748 (rev ca)
>0003:03:00.0 USB controller: Texas Instruments TUSB73x0 SuperSpeed USB 3.0 xHCI Host Controller (rev 02)
>0003:0f:00.0 Network controller: Mellanox Technologies MT27500 Family [ConnectX-3]
># echo 1 > power
># lspci -s 0003::.
>0003:00:00.0 PCI bridge: IBM Device 03dc
>0003:01:00.0 PCI bridge: PLX Technology, Inc. Device 8748 (rev ca)
>0003:02:01.0 PCI bridge: PLX Technology, Inc. Device 8748 (rev ca)
>0003:02:08.0 PCI bridge: PLX Technology, Inc. Device 8748 (rev ca)
>0003:02:09.0 PCI bridge: PLX Technology, Inc. Device 8748 (rev ca)
>0003:02:10.0 PCI bridge: PLX Technology, Inc. Device 8748 (rev ca)
>0003:02:11.0 PCI bridge: PLX Technology, Inc. Device 8748 (rev ca)
>0003:03:00.0 USB controller: Texas Instruments TUSB73x0 SuperSpeed USB 3.0 xHCI Host Controller (rev 02)
>0003:09:00.0 Ethernet controller: Broadcom Corporation NetXtreme BCM5719 Gigabit Ethernet PCIe (rev 01)
>0003:09:00.1 Ethernet controller: Broadcom Corporation NetXtreme BCM5719 Gigabit Ethernet PCIe (rev 01)
>0003:09:00.2 Ethernet controller: Broadcom Corporation NetXtreme BCM5719 Gigabit Ethernet PCIe (rev 01)
>0003:09:00.3 Ethernet controller: Broadcom Corporation NetXtreme BCM5719 Gigabit Ethernet PCIe (rev 01)
>0003:0f:00.0 Network controller: Mellanox Technologies MT27500 Family [ConnectX-3]
>
>Changelog
>=========
>v1 -> v2:
> * Separate powernv-php driver to support PCI hotplug for
> PowerNV platform.
> * Check if the OPAL API supported by firmware before calling
> into it, which is necessary for back-compability.
> * Separate patch for factoring pnv_pci_poll().
>
>Gavin Shan (5):
> powerpc/pci: Move pcibios_find_pci_bus() around
> powerpc/pci: Don't scan empty slot
> powerpc/powernv: Introduce pnv_pci_poll()
> powerpc/powernv: Functions to retrieve PCI slot status
> PCI/hotplug: PowerPC PowerNV PCI hotplug driver
>
> arch/powerpc/include/asm/opal.h | 4 +
> arch/powerpc/include/asm/pnv-pci.h | 3 +
> arch/powerpc/kernel/pci-hotplug.c | 39 ++-
> arch/powerpc/platforms/powernv/eeh-ioda.c | 28 +-
> arch/powerpc/platforms/powernv/opal-wrappers.S | 2 +
> arch/powerpc/platforms/powernv/pci.c | 43 +++
> arch/powerpc/platforms/powernv/pci.h | 1 +
> arch/powerpc/platforms/pseries/pci_dlpar.c | 32 ---
> drivers/pci/hotplug/Kconfig | 12 +
> drivers/pci/hotplug/Makefile | 4 +
> drivers/pci/hotplug/powernv_php.c | 126 ++++++++
> drivers/pci/hotplug/powernv_php.h | 70 +++++
> drivers/pci/hotplug/powernv_php_slot.c | 382 +++++++++++++++++++++++++
> 13 files changed, 687 insertions(+), 59 deletions(-)
> create mode 100644 drivers/pci/hotplug/powernv_php.c
> create mode 100644 drivers/pci/hotplug/powernv_php.h
> create mode 100644 drivers/pci/hotplug/powernv_php_slot.c
>
>Thanks,
>Gavin
next prev parent reply other threads:[~2015-02-17 2:31 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-12-04 5:54 [PATCH v2 0/5] PCI Hotplug Driver for PowerPC PowerNV Gavin Shan
2014-12-04 5:54 ` Gavin Shan
2014-12-04 5:54 ` [PATCH 1/5] powerpc/pci: Move pcibios_find_pci_bus() around Gavin Shan
2014-12-04 5:54 ` Gavin Shan
2014-12-04 5:54 ` [PATCH 2/5] powerpc/pci: Don't scan empty slot Gavin Shan
2014-12-04 5:54 ` Gavin Shan
2014-12-04 5:54 ` [PATCH 3/5] powerpc/powernv: Introduce pnv_pci_poll() Gavin Shan
2014-12-04 5:54 ` Gavin Shan
2015-01-09 17:43 ` Bjorn Helgaas
2015-01-09 17:43 ` Bjorn Helgaas
2015-01-13 3:16 ` Gavin Shan
2015-01-13 3:16 ` Gavin Shan
2014-12-04 5:54 ` [PATCH 4/5] powerpc/powernv: Functions to retrieve PCI slot status Gavin Shan
2014-12-04 5:54 ` Gavin Shan
2014-12-04 5:54 ` [PATCH 5/5] PCI/hotplug: PowerPC PowerNV PCI hotplug driver Gavin Shan
2014-12-04 5:54 ` Gavin Shan
2015-02-17 2:30 ` Gavin Shan [this message]
2015-02-17 2:30 ` [PATCH v2 0/5] PCI Hotplug Driver for PowerPC PowerNV Gavin Shan
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=20150217023019.GC17352@shangw \
--to=gwshan@linux.vnet.ibm.com \
--cc=benh@kernel.crashing.org \
--cc=linux-pci@vger.kernel.org \
--cc=linuxppc-dev@lists.ozlabs.org \
--cc=mpe@ellerman.id.au \
/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.