[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20220520102031.xd54d4dcnbhomxdi@mobilestation>
Date: Fri, 20 May 2022 13:20:31 +0300
From: Serge Semin <fancer.lancer@...il.com>
To: Rob Herring <robh@...nel.org>
Cc: Serge Semin <Sergey.Semin@...kalelectronics.ru>,
Jingoo Han <jingoohan1@...il.com>,
Gustavo Pimentel <gustavo.pimentel@...opsys.com>,
Bjorn Helgaas <bhelgaas@...gle.com>,
Lorenzo Pieralisi <lorenzo.pieralisi@....com>,
Krzysztof WilczyĆski <kw@...ux.com>,
Alexey Malahov <Alexey.Malahov@...kalelectronics.ru>,
Pavel Parkhomenko <Pavel.Parkhomenko@...kalelectronics.ru>,
Frank Li <Frank.Li@....com>,
Manivannan Sadhasivam <manivannan.sadhasivam@...aro.org>,
linux-pci@...r.kernel.org, devicetree@...r.kernel.org,
linux-kernel@...r.kernel.org
Subject: Re: [PATCH v2 08/17] PCI: dwc: Add host de-initialization callback
On Mon, May 16, 2022 at 03:48:28PM -0500, Rob Herring wrote:
> On Wed, May 04, 2022 at 12:46:29AM +0300, Serge Semin wrote:
> > Seeing the platform-specific DW PCIe host-initialization is performed from
> > within the generic dw_pcie_host_init() method by means of the dedicated
> > dw_pcie_ops.host_init() callback, there must be declared an antagonist
> > which would perform the corresponding cleanups. Let's add such callback
> > then. It will be called in the dw_pcie_host_deinit() method and in the
> > cleanup-on-error path in the dw_pcie_host_init() function.
>
> I'm not really a fan of .host_init() to begin with as it isn't really
> clear by the name when it is supposed to be called and what init to do.
> The drv probe -> dw_pcie_host_init -> drv .host_init() -> return to drv
> sequence isn't great either. I'd rather see more fine grained and well
> defined hooks. So I'm hesitant to add a host_deinit()...
What you say is a matter of another change. This patch just fixes the
already defined init-hook interface. Indeed the initializations
performed in the framework of the init-method need to be cleaned up in
case of the PCIe host probe procedure failure. I can't fix the DW PCIe
platform drivers since they may have some specifics I am not aware of,
but at least the interface needs to be provided for the new drivers.
One such low-level driver is submitted for review in this patchset.
What you suggest is a lot of additional work including preliminary
design settling discussions and consequent review. Alas I don't have
time for this anymore especially seeing the need for such finer grained
hooking isn't justified by neither the current platform drivers nor
the driver submitted by me. Sorry I can't fulfill your request.
-Sergey
>
> Rob
Powered by blists - more mailing lists