Skip to content

PCI: Propagate errors for optional resources

Thierry Reding linux-pci linux-rockchip 1 version Applied

Status from this message: Applied to pci/misc for v5.4, thanks !

Get series with b4
b4 am [email protected]

Versions newest first

  1. v2 Latest6 patches 1 replyApplied

Changes in v2 from the cover letter

- add Rockchip PCI patch which was previously separate
- addressed Bjorn's comments regarding commit message
- collected Reviewed-by, Tested-by and Acked-by tags

Patches in v2 Applied

#Subject and filesSizeRepliesApplied
1/6PCI: rockchip: Propagate errors for optional regulatorsdrivers/pci/controller/pcie-rockchip-host.c+8 -80 replies
2/6PCI: exynos: Propagate errors for optional PHYsdrivers/pci/controller/dwc/pci-exynos.c+1 -10 replies
3/6PCI: imx6: Propagate errors for optional regulatorsdrivers/pci/controller/dwc/pci-imx6.c+2 -20 replies
4/6PCI: armada8x: Propagate errors for optional PHYsdrivers/pci/controller/dwc/pcie-armada8k.c+3 -40 replies
5/6PCI: histb: Propagate errors for optional regulatorsdrivers/pci/controller/dwc/pcie-histb.c+2 -20 replies
6/6PCI: iproc: Propagate errors for optional PHYsdrivers/pci/controller/pcie-iproc-platform.c+3 -60 replies

Reviews trailers per patch

All 6 patches have a Reviewed-by or Acked-by.

PatchAndrew MurrayHeiko StuebnerShawn Lin
1/6R-b R-b T-b A-b
2/6R-b
3/6R-b
4/6R-b
5/6R-b
6/6R-b

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes. Scroll the table sideways for all 3 reviewers.

Read the v2 thread

Cover letter [PATCH v2 0/6] PCI: Propagate errors for optional resources

From: Thierry Reding <[email protected]>

A common pattern exists among several PCI host controller drivers. Some of the resources that they support are optional, and the way that the drivers handle these resources is by propagating -EPROBE_DEFER and keep going without the resource otherwise. However, there can be several reasons for failing to obtain a resource (e.g. out of memory). Currently all of these reasons will cause the drivers to consider the optional resource to not be there. However, if the resource was in fact required in the specific case and requesting it failed because of some other reason, the drivers would still happily continue and cause potentially hard to find problems.

Instead of rolling all error codes into one, reverse the check and only handle -ENODEV as meaning "resource was not specified". Fatal errors in that case will cause the driver to fail to probe rather than continuing as if nothing had happened.

Changes in v2:
- add Rockchip PCI patch which was previously separate
- addressed Bjorn's comments regarding commit message
- collected Reviewed-by, Tested-by and Acked-by tags

Thierry

Thierry Reding (6):
PCI: rockchip: Propagate errors for optional regulators
PCI: exynos: Propagate errors for optional PHYs
PCI: imx6: Propagate errors for optional regulators
PCI: armada8x: Propagate errors for optional PHYs
PCI: histb: Propagate errors for optional regulators
PCI: iproc: Propagate errors for optional PHYs

 drivers/pci/controller/dwc/pci-exynos.c      |  2 +-
 drivers/pci/controller/dwc/pci-imx6.c        |  4 ++--
 drivers/pci/controller/dwc/pcie-armada8k.c   |  7 +++----
 drivers/pci/controller/dwc/pcie-histb.c      |  4 ++--
 drivers/pci/controller/pcie-iproc-platform.c |  9 +++------
 drivers/pci/controller/pcie-rockchip-host.c  | 16 ++++++++--------
 6 files changed, 19 insertions(+), 23 deletions(-)
Signature · 1 line
2.22.0