* [PATCH v1 1/2] PCI: shpchp: Use dev_printk() for OSHP-related messages
2018-06-02 5:41 [PATCH v1 0/2] PCI: shpchp: Minor fixes Bjorn Helgaas
@ 2018-06-02 5:42 ` Bjorn Helgaas
2018-06-02 18:48 ` Mika Westerberg
2018-06-03 7:58 ` Rafael J. Wysocki
2018-06-02 5:42 ` [PATCH v1 2/2] PCI: shpchp: Fix AMD POGO identification Bjorn Helgaas
2018-06-04 17:49 ` [PATCH v1 0/2] PCI: shpchp: Minor fixes Bjorn Helgaas
2 siblings, 2 replies; 8+ messages in thread
From: Bjorn Helgaas @ 2018-06-02 5:42 UTC (permalink / raw)
To: linux-pci
Cc: linux-kernel, linux-acpi, Mika Westerberg, Rafael J . Wysocki,
Len Brown, Mario.Limonciello, Michael Jamet, Yehezkel Bernat,
Andy Shevchenko, Lukas Wunner
From: Bjorn Helgaas <bhelgaas@google.com>
Use dev_printk() for messages related to requesting control of SHPC hotplug
via the OSHP method.
Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
---
drivers/pci/hotplug/acpi_pcihp.c | 13 ++++++-------
1 file changed, 6 insertions(+), 7 deletions(-)
diff --git a/drivers/pci/hotplug/acpi_pcihp.c b/drivers/pci/hotplug/acpi_pcihp.c
index 7cc50cfef9c6..597d22aeefc1 100644
--- a/drivers/pci/hotplug/acpi_pcihp.c
+++ b/drivers/pci/hotplug/acpi_pcihp.c
@@ -96,7 +96,7 @@ int acpi_get_hp_hw_control_from_firmware(struct pci_dev *pdev)
if (!handle) {
/*
* This hotplug controller was not listed in the ACPI name
- * space at all. Try to get acpi handle of parent pci bus.
+ * space at all. Try to get ACPI handle of parent PCI bus.
*/
struct pci_bus *pbus;
for (pbus = pdev->bus; pbus; pbus = pbus->parent) {
@@ -108,8 +108,8 @@ int acpi_get_hp_hw_control_from_firmware(struct pci_dev *pdev)
while (handle) {
acpi_get_name(handle, ACPI_FULL_PATHNAME, &string);
- dbg("Trying to get hotplug control for %s\n",
- (char *)string.pointer);
+ pci_info(pdev, "Requesting control of SHPC hotplug via OSHP (%s)\n",
+ (char *)string.pointer);
status = acpi_run_oshp(handle);
if (ACPI_SUCCESS(status))
goto got_one;
@@ -121,13 +121,12 @@ int acpi_get_hp_hw_control_from_firmware(struct pci_dev *pdev)
break;
}
no_control:
- dbg("Cannot get control of hotplug hardware for pci %s\n",
- pci_name(pdev));
+ pci_info(pdev, "Cannot get control of SHPC hotplug\n");
kfree(string.pointer);
return -ENODEV;
got_one:
- dbg("Gained control for hotplug HW for pci %s (%s)\n",
- pci_name(pdev), (char *)string.pointer);
+ pci_info(pdev, "Gained control of SHPC hotplug (%s)\n",
+ (char *)string.pointer);
kfree(string.pointer);
return 0;
}
^ permalink raw reply related [flat|nested] 8+ messages in thread* Re: [PATCH v1 1/2] PCI: shpchp: Use dev_printk() for OSHP-related messages
2018-06-02 5:42 ` [PATCH v1 1/2] PCI: shpchp: Use dev_printk() for OSHP-related messages Bjorn Helgaas
@ 2018-06-02 18:48 ` Mika Westerberg
2018-06-03 7:58 ` Rafael J. Wysocki
1 sibling, 0 replies; 8+ messages in thread
From: Mika Westerberg @ 2018-06-02 18:48 UTC (permalink / raw)
To: Bjorn Helgaas
Cc: linux-pci, linux-kernel, linux-acpi, Rafael J . Wysocki,
Len Brown, Mario.Limonciello, Michael Jamet, Yehezkel Bernat,
Andy Shevchenko, Lukas Wunner
On Sat, Jun 02, 2018 at 12:42:06AM -0500, Bjorn Helgaas wrote:
> From: Bjorn Helgaas <bhelgaas@google.com>
>
> Use dev_printk() for messages related to requesting control of SHPC hotplug
> via the OSHP method.
>
> Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
Reviewed-by: Mika Westerberg <mika.westerberg@linux.intel.com>
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH v1 1/2] PCI: shpchp: Use dev_printk() for OSHP-related messages
2018-06-02 5:42 ` [PATCH v1 1/2] PCI: shpchp: Use dev_printk() for OSHP-related messages Bjorn Helgaas
2018-06-02 18:48 ` Mika Westerberg
@ 2018-06-03 7:58 ` Rafael J. Wysocki
1 sibling, 0 replies; 8+ messages in thread
From: Rafael J. Wysocki @ 2018-06-03 7:58 UTC (permalink / raw)
To: Bjorn Helgaas
Cc: Linux PCI, Linux Kernel Mailing List, ACPI Devel Maling List,
Mika Westerberg, Rafael J . Wysocki, Len Brown, Mario Limonciello,
Michael Jamet, Yehezkel Bernat, Andy Shevchenko, Lukas Wunner
On Sat, Jun 2, 2018 at 7:42 AM, Bjorn Helgaas <helgaas@kernel.org> wrote:
> From: Bjorn Helgaas <bhelgaas@google.com>
>
> Use dev_printk() for messages related to requesting control of SHPC hotplug
> via the OSHP method.
>
> Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
Reviewed-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
> ---
> drivers/pci/hotplug/acpi_pcihp.c | 13 ++++++-------
> 1 file changed, 6 insertions(+), 7 deletions(-)
>
> diff --git a/drivers/pci/hotplug/acpi_pcihp.c b/drivers/pci/hotplug/acpi_pcihp.c
> index 7cc50cfef9c6..597d22aeefc1 100644
> --- a/drivers/pci/hotplug/acpi_pcihp.c
> +++ b/drivers/pci/hotplug/acpi_pcihp.c
> @@ -96,7 +96,7 @@ int acpi_get_hp_hw_control_from_firmware(struct pci_dev *pdev)
> if (!handle) {
> /*
> * This hotplug controller was not listed in the ACPI name
> - * space at all. Try to get acpi handle of parent pci bus.
> + * space at all. Try to get ACPI handle of parent PCI bus.
> */
> struct pci_bus *pbus;
> for (pbus = pdev->bus; pbus; pbus = pbus->parent) {
> @@ -108,8 +108,8 @@ int acpi_get_hp_hw_control_from_firmware(struct pci_dev *pdev)
>
> while (handle) {
> acpi_get_name(handle, ACPI_FULL_PATHNAME, &string);
> - dbg("Trying to get hotplug control for %s\n",
> - (char *)string.pointer);
> + pci_info(pdev, "Requesting control of SHPC hotplug via OSHP (%s)\n",
> + (char *)string.pointer);
> status = acpi_run_oshp(handle);
> if (ACPI_SUCCESS(status))
> goto got_one;
> @@ -121,13 +121,12 @@ int acpi_get_hp_hw_control_from_firmware(struct pci_dev *pdev)
> break;
> }
> no_control:
> - dbg("Cannot get control of hotplug hardware for pci %s\n",
> - pci_name(pdev));
> + pci_info(pdev, "Cannot get control of SHPC hotplug\n");
> kfree(string.pointer);
> return -ENODEV;
> got_one:
> - dbg("Gained control for hotplug HW for pci %s (%s)\n",
> - pci_name(pdev), (char *)string.pointer);
> + pci_info(pdev, "Gained control of SHPC hotplug (%s)\n",
> + (char *)string.pointer);
> kfree(string.pointer);
> return 0;
> }
>
> --
> To unsubscribe from this list: send the line "unsubscribe linux-acpi" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at http://vger.kernel.org/majordomo-info.html
^ permalink raw reply [flat|nested] 8+ messages in thread
* [PATCH v1 2/2] PCI: shpchp: Fix AMD POGO identification
2018-06-02 5:41 [PATCH v1 0/2] PCI: shpchp: Minor fixes Bjorn Helgaas
2018-06-02 5:42 ` [PATCH v1 1/2] PCI: shpchp: Use dev_printk() for OSHP-related messages Bjorn Helgaas
@ 2018-06-02 5:42 ` Bjorn Helgaas
2018-06-02 18:49 ` Mika Westerberg
2018-06-03 7:59 ` Rafael J. Wysocki
2018-06-04 17:49 ` [PATCH v1 0/2] PCI: shpchp: Minor fixes Bjorn Helgaas
2 siblings, 2 replies; 8+ messages in thread
From: Bjorn Helgaas @ 2018-06-02 5:42 UTC (permalink / raw)
To: linux-pci
Cc: linux-kernel, linux-acpi, Mika Westerberg, Rafael J . Wysocki,
Len Brown, Mario.Limonciello, Michael Jamet, Yehezkel Bernat,
Andy Shevchenko, Lukas Wunner
From: Bjorn Helgaas <bhelgaas@google.com>
The fix for an AMD POGO erratum related to SHPC incorrectly identified the
device. The workaround should be applied only for AMD POGO devices, but it
was instead applied to:
- all AMD bridges, and
- all devices from any vendor with device ID 0x7458
Fixes: 53044f357448 ("[PATCH] PCI Hotplug: shpchp: AMD POGO errata fix")
Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
---
drivers/pci/hotplug/shpchp_ctrl.c | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/drivers/pci/hotplug/shpchp_ctrl.c b/drivers/pci/hotplug/shpchp_ctrl.c
index bedda5bda910..1047b56e5730 100644
--- a/drivers/pci/hotplug/shpchp_ctrl.c
+++ b/drivers/pci/hotplug/shpchp_ctrl.c
@@ -585,13 +585,13 @@ static int shpchp_enable_slot (struct slot *p_slot)
ctrl_dbg(ctrl, "%s: p_slot->pwr_save %x\n", __func__, p_slot->pwr_save);
p_slot->hpc_ops->get_latch_status(p_slot, &getstatus);
- if (((p_slot->ctrl->pci_dev->vendor == PCI_VENDOR_ID_AMD) ||
- (p_slot->ctrl->pci_dev->device == PCI_DEVICE_ID_AMD_POGO_7458))
+ if ((p_slot->ctrl->pci_dev->vendor == PCI_VENDOR_ID_AMD &&
+ p_slot->ctrl->pci_dev->device == PCI_DEVICE_ID_AMD_POGO_7458)
&& p_slot->ctrl->num_slots == 1) {
- /* handle amd pogo errata; this must be done before enable */
+ /* handle AMD POGO errata; this must be done before enable */
amd_pogo_errata_save_misc_reg(p_slot);
retval = board_added(p_slot);
- /* handle amd pogo errata; this must be done after enable */
+ /* handle AMD POGO errata; this must be done after enable */
amd_pogo_errata_restore_misc_reg(p_slot);
} else
retval = board_added(p_slot);
^ permalink raw reply related [flat|nested] 8+ messages in thread* Re: [PATCH v1 2/2] PCI: shpchp: Fix AMD POGO identification
2018-06-02 5:42 ` [PATCH v1 2/2] PCI: shpchp: Fix AMD POGO identification Bjorn Helgaas
@ 2018-06-02 18:49 ` Mika Westerberg
2018-06-03 7:59 ` Rafael J. Wysocki
1 sibling, 0 replies; 8+ messages in thread
From: Mika Westerberg @ 2018-06-02 18:49 UTC (permalink / raw)
To: Bjorn Helgaas
Cc: linux-pci, linux-kernel, linux-acpi, Rafael J . Wysocki,
Len Brown, Mario.Limonciello, Michael Jamet, Yehezkel Bernat,
Andy Shevchenko, Lukas Wunner
On Sat, Jun 02, 2018 at 12:42:12AM -0500, Bjorn Helgaas wrote:
> From: Bjorn Helgaas <bhelgaas@google.com>
>
> The fix for an AMD POGO erratum related to SHPC incorrectly identified the
> device. The workaround should be applied only for AMD POGO devices, but it
> was instead applied to:
>
> - all AMD bridges, and
> - all devices from any vendor with device ID 0x7458
Good catch.
Reviewed-by: Mika Westerberg <mika.westerberg@linux.intel.com>
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH v1 2/2] PCI: shpchp: Fix AMD POGO identification
2018-06-02 5:42 ` [PATCH v1 2/2] PCI: shpchp: Fix AMD POGO identification Bjorn Helgaas
2018-06-02 18:49 ` Mika Westerberg
@ 2018-06-03 7:59 ` Rafael J. Wysocki
1 sibling, 0 replies; 8+ messages in thread
From: Rafael J. Wysocki @ 2018-06-03 7:59 UTC (permalink / raw)
To: Bjorn Helgaas
Cc: Linux PCI, Linux Kernel Mailing List, ACPI Devel Maling List,
Mika Westerberg, Rafael J . Wysocki, Len Brown, Mario Limonciello,
Michael Jamet, Yehezkel Bernat, Andy Shevchenko, Lukas Wunner
On Sat, Jun 2, 2018 at 7:42 AM, Bjorn Helgaas <helgaas@kernel.org> wrote:
> From: Bjorn Helgaas <bhelgaas@google.com>
>
> The fix for an AMD POGO erratum related to SHPC incorrectly identified the
> device. The workaround should be applied only for AMD POGO devices, but it
> was instead applied to:
>
> - all AMD bridges, and
> - all devices from any vendor with device ID 0x7458
>
> Fixes: 53044f357448 ("[PATCH] PCI Hotplug: shpchp: AMD POGO errata fix")
> Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
Reviewed-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
> ---
> drivers/pci/hotplug/shpchp_ctrl.c | 8 ++++----
> 1 file changed, 4 insertions(+), 4 deletions(-)
>
> diff --git a/drivers/pci/hotplug/shpchp_ctrl.c b/drivers/pci/hotplug/shpchp_ctrl.c
> index bedda5bda910..1047b56e5730 100644
> --- a/drivers/pci/hotplug/shpchp_ctrl.c
> +++ b/drivers/pci/hotplug/shpchp_ctrl.c
> @@ -585,13 +585,13 @@ static int shpchp_enable_slot (struct slot *p_slot)
> ctrl_dbg(ctrl, "%s: p_slot->pwr_save %x\n", __func__, p_slot->pwr_save);
> p_slot->hpc_ops->get_latch_status(p_slot, &getstatus);
>
> - if (((p_slot->ctrl->pci_dev->vendor == PCI_VENDOR_ID_AMD) ||
> - (p_slot->ctrl->pci_dev->device == PCI_DEVICE_ID_AMD_POGO_7458))
> + if ((p_slot->ctrl->pci_dev->vendor == PCI_VENDOR_ID_AMD &&
> + p_slot->ctrl->pci_dev->device == PCI_DEVICE_ID_AMD_POGO_7458)
> && p_slot->ctrl->num_slots == 1) {
> - /* handle amd pogo errata; this must be done before enable */
> + /* handle AMD POGO errata; this must be done before enable */
> amd_pogo_errata_save_misc_reg(p_slot);
> retval = board_added(p_slot);
> - /* handle amd pogo errata; this must be done after enable */
> + /* handle AMD POGO errata; this must be done after enable */
> amd_pogo_errata_restore_misc_reg(p_slot);
> } else
> retval = board_added(p_slot);
>
> --
> To unsubscribe from this list: send the line "unsubscribe linux-acpi" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at http://vger.kernel.org/majordomo-info.html
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH v1 0/2] PCI: shpchp: Minor fixes
2018-06-02 5:41 [PATCH v1 0/2] PCI: shpchp: Minor fixes Bjorn Helgaas
2018-06-02 5:42 ` [PATCH v1 1/2] PCI: shpchp: Use dev_printk() for OSHP-related messages Bjorn Helgaas
2018-06-02 5:42 ` [PATCH v1 2/2] PCI: shpchp: Fix AMD POGO identification Bjorn Helgaas
@ 2018-06-04 17:49 ` Bjorn Helgaas
2 siblings, 0 replies; 8+ messages in thread
From: Bjorn Helgaas @ 2018-06-04 17:49 UTC (permalink / raw)
To: linux-pci
Cc: linux-kernel, linux-acpi, Mika Westerberg, Rafael J . Wysocki,
Len Brown, Mario.Limonciello, Michael Jamet, Yehezkel Bernat,
Andy Shevchenko, Lukas Wunner
On Sat, Jun 02, 2018 at 12:41:59AM -0500, Bjorn Helgaas wrote:
> An AMD POGO check in shpchp incorrectly included any device with device ID
> 0x7458, no matter what the vendor.
>
> Also, use pci_info() instead of dbg() for messages related to OSHP.
> They're important enough that they should appear in dmesg.
>
> I intend to include these along with Mika's shpchp updates.
>
> ---
>
> Bjorn Helgaas (2):
> PCI: shpchp: Use dev_printk() for OSHP-related messages
> PCI: shpchp: Fix AMD POGO identification
>
>
> drivers/pci/hotplug/acpi_pcihp.c | 13 ++++++-------
> drivers/pci/hotplug/shpchp_ctrl.c | 8 ++++----
> 2 files changed, 10 insertions(+), 11 deletions(-)
I applied these with reviewed-by from Mika and Rafael to pci/hotplug for
v4.18.
^ permalink raw reply [flat|nested] 8+ messages in thread