linux-pci.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v2 0/6] PCI: Propagate errors for optional resources
@ 2019-08-29 10:53 Thierry Reding
  2019-08-29 10:53 ` [PATCH v2 1/6] PCI: rockchip: Propagate errors for optional regulators Thierry Reding
                   ` (6 more replies)
  0 siblings, 7 replies; 8+ messages in thread
From: Thierry Reding @ 2019-08-29 10:53 UTC (permalink / raw)
  To: Lorenzo Pieralisi, Bjorn Helgaas; +Cc: Andrew Murray, linux-pci

From: Thierry Reding <treding@nvidia.com>

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(-)

-- 
2.22.0


^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2019-09-04 14:48 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-08-29 10:53 [PATCH v2 0/6] PCI: Propagate errors for optional resources Thierry Reding
2019-08-29 10:53 ` [PATCH v2 1/6] PCI: rockchip: Propagate errors for optional regulators Thierry Reding
2019-08-29 10:53 ` [PATCH v2 2/6] PCI: exynos: Propagate errors for optional PHYs Thierry Reding
2019-08-29 10:53 ` [PATCH v2 3/6] PCI: imx6: Propagate errors for optional regulators Thierry Reding
2019-08-29 10:53 ` [PATCH v2 4/6] PCI: armada8x: Propagate errors for optional PHYs Thierry Reding
2019-08-29 10:53 ` [PATCH v2 5/6] PCI: histb: Propagate errors for optional regulators Thierry Reding
2019-08-29 10:53 ` [PATCH v2 6/6] PCI: iproc: Propagate errors for optional PHYs Thierry Reding
2019-09-04 14:48 ` [PATCH v2 0/6] PCI: Propagate errors for optional resources Lorenzo Pieralisi

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).