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

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Thu, Aug 29, 2019 at 12:53:13PM +0200, Thierry Reding wrote:
> From: Thierry Reding <treding@xxxxxxxxxx>
> 
> 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(-)

Applied to pci/misc for v5.4, thanks !

Lorenzo



[Index of Archives]     [DMA Engine]     [Linux Coverity]     [Linux USB]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Greybus]

  Powered by Linux