Skip to content

Commit 8af4fad

Browse files
committed
Merge tag 'pci-v7.0-fixes-5' of git://git.kernel.org/pub/scm/linux/kernel/git/pci/pci
Pull pci fixes from Bjorn Helgaas: - Remove power-off from pwrctrl drivers since this is now done directly by the PCI controller drivers (Chen-Yu Tsai) - Fix pwrctrl device node leak (Felix Gu) - Document a TLP header decoder for AER log messages (Lukas Wunner) * tag 'pci-v7.0-fixes-5' of git://git.kernel.org/pub/scm/linux/kernel/git/pci/pci: Documentation: PCI: Document PCIe TLP Header decoder for AER messages PCI/pwrctrl: Fix pci_pwrctrl_is_required() device node leak PCI/pwrctrl: Do not power off on pwrctrl device removal
2 parents 83ce1c7 + 05f643d commit 8af4fad

4 files changed

Lines changed: 13 additions & 14 deletions

File tree

Documentation/PCI/pcieaer-howto.rst

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -85,6 +85,16 @@ In the example, 'Requester ID' means the ID of the device that sent
8585
the error message to the Root Port. Please refer to PCIe specs for other
8686
fields.
8787

88+
The 'TLP Header' is the prefix/header of the TLP that caused the error
89+
in raw hex format. To decode the TLP Header into human-readable form
90+
one may use tlp-tool:
91+
92+
https://github.com/mmpg-x86/tlp-tool
93+
94+
Example usage::
95+
96+
curl -L https://git.kernel.org/linus/2ca1c94ce0b6 | rtlp-tool --aer
97+
8898
AER Ratelimits
8999
--------------
90100

drivers/pci/pwrctrl/core.c

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -299,8 +299,10 @@ static bool pci_pwrctrl_is_required(struct device_node *np)
299299
struct device_node *remote __free(device_node) =
300300
of_graph_get_remote_port_parent(endpoint);
301301
if (remote) {
302-
if (of_pci_supply_present(remote))
302+
if (of_pci_supply_present(remote)) {
303+
of_node_put(endpoint);
303304
return true;
305+
}
304306
}
305307
}
306308
}

drivers/pci/pwrctrl/pci-pwrctrl-pwrseq.c

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -68,13 +68,6 @@ static int pwrseq_pwrctrl_power_off(struct pci_pwrctrl *pwrctrl)
6868
return pwrseq_power_off(pwrseq->pwrseq);
6969
}
7070

71-
static void devm_pwrseq_pwrctrl_power_off(void *data)
72-
{
73-
struct pwrseq_pwrctrl *pwrseq = data;
74-
75-
pwrseq_pwrctrl_power_off(&pwrseq->pwrctrl);
76-
}
77-
7871
static int pwrseq_pwrctrl_probe(struct platform_device *pdev)
7972
{
8073
const struct pwrseq_pwrctrl_pdata *pdata;
@@ -101,11 +94,6 @@ static int pwrseq_pwrctrl_probe(struct platform_device *pdev)
10194
return dev_err_probe(dev, PTR_ERR(pwrseq->pwrseq),
10295
"Failed to get the power sequencer\n");
10396

104-
ret = devm_add_action_or_reset(dev, devm_pwrseq_pwrctrl_power_off,
105-
pwrseq);
106-
if (ret)
107-
return ret;
108-
10997
pwrseq->pwrctrl.power_on = pwrseq_pwrctrl_power_on;
11098
pwrseq->pwrctrl.power_off = pwrseq_pwrctrl_power_off;
11199

drivers/pci/pwrctrl/slot.c

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,6 @@ static void devm_slot_pwrctrl_release(void *data)
6363
{
6464
struct slot_pwrctrl *slot = data;
6565

66-
slot_pwrctrl_power_off(&slot->pwrctrl);
6766
regulator_bulk_free(slot->num_supplies, slot->supplies);
6867
}
6968

0 commit comments

Comments
 (0)