Skip to content

PCI: host-generic: Fix driver_data overwriting bugs

Marc Zyngier linux-arm-kernel linux-pci linux-riscv lkml 1 version Applied

Status from this message: This series was applied to riscv/linux.git (fixes)

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest3 patches 7 repliesApplied 3/3

Patches in v1 All 3 applied

#Subject and filesSizeRepliesApplied
1/3PCI: host-generic: Set driver_data before calling gen_pci_init()drivers/pci/controller/pci-host-common.c+2 -20 repliesApplied
2/3PCI: apple: Add tracking of probed root portsdrivers/pci/controller/pcie-apple.c+49 -41 replyApplied
3/3Revert "PCI: ecam: Allow cfg->priv to be pre-populated from the root port device"drivers/pci/ecam.c+0 -21 replyApplied

Reviews trailers per patch

2 of 3 patches have a Reviewed-by or Acked-by.

PatchGeert Uytterhoeven
1/3
2/3R-b
3/3R-b

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v1 thread

Cover letter [PATCH 0/3] PCI: host-generic: Fix driver_data overwriting bugs

Geert reports that some drivers do rely on the device driver_data field containing a pointer to the bridge structure at the point of initialising the root port, while this has been recently changed to contain some other data for the benefit of the Apple PCIe driver.

This small series builds on top of Geert previously posted (and included as a prefix for reference) fix for the Microchip driver, which breaks the Apple driver. This is basically swapping a regression for another, which isn't a massive deal at this stage, as the follow-up patch fixes things for the Apple driver by adding extra tracking.

Finally, we can revert a one-liner that glued the whole thing together, and that isn't needed anymore.

All of this is candidate for 6.16, as we have regressed the Microchip driver in -rc1, and that fixing it breaks the Apple driver.

Geert Uytterhoeven (1):
PCI: host-generic: Set driver_data before calling gen_pci_init()

Marc Zyngier (2):
PCI: apple: Add tracking of probed root ports
Revert "PCI: ecam: Allow cfg->priv to be pre-populated from the root
port device"

 drivers/pci/controller/pci-host-common.c |  4 +-
 drivers/pci/controller/pcie-apple.c      | 53 ++++++++++++++++++++++--
 drivers/pci/ecam.c                       |  2 -
 3 files changed, 51 insertions(+), 8 deletions(-)
Signature · 1 line
2.39.2