* [PATCH linu-next v1] PCI: dw-rockchip: Enable async probe by default @ 2024-06-25 15:57 Anand Moon 2024-08-07 4:39 ` Anand Moon 2024-08-07 16:31 ` Bjorn Helgaas 0 siblings, 2 replies; 5+ messages in thread From: Anand Moon @ 2024-06-25 15:57 UTC (permalink / raw) To: Lorenzo Pieralisi, Krzysztof Wilczyński, Rob Herring, Bjorn Helgaas, Heiko Stuebner Cc: Anand Moon, linux-pci, linux-arm-kernel, linux-rockchip, linux-kernel Rockchip PCIe driver lets waits for the combo PHY link like PCIe 3.0, PCIe 2.0 and SATA 3.0 controller to be up during the probe this consumes several milliseconds during boot. Establishing a PCIe link can take a while; allow asynchronous probing so that link establishment can happen in the background while other devices are being probed. Signed-off-by: Anand Moon <linux.amoon@gmail.com> --- drivers/pci/controller/dwc/pcie-dw-rockchip.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/pci/controller/dwc/pcie-dw-rockchip.c b/drivers/pci/controller/dwc/pcie-dw-rockchip.c index 61b1acba7182..74a3e9d172a0 100644 --- a/drivers/pci/controller/dwc/pcie-dw-rockchip.c +++ b/drivers/pci/controller/dwc/pcie-dw-rockchip.c @@ -367,6 +367,7 @@ static struct platform_driver rockchip_pcie_driver = { .name = "rockchip-dw-pcie", .of_match_table = rockchip_pcie_of_match, .suppress_bind_attrs = true, + .probe_type = PROBE_PREFER_ASYNCHRONOUS, }, .probe = rockchip_pcie_probe, }; -- 2.44.0 ^ permalink raw reply related [flat|nested] 5+ messages in thread
* Re: [PATCH linu-next v1] PCI: dw-rockchip: Enable async probe by default 2024-06-25 15:57 [PATCH linu-next v1] PCI: dw-rockchip: Enable async probe by default Anand Moon @ 2024-08-07 4:39 ` Anand Moon 2024-08-07 16:31 ` Bjorn Helgaas 1 sibling, 0 replies; 5+ messages in thread From: Anand Moon @ 2024-08-07 4:39 UTC (permalink / raw) To: Lorenzo Pieralisi, Krzysztof Wilczyński, Rob Herring, Bjorn Helgaas, Heiko Stuebner Cc: linux-pci, linux-arm-kernel, linux-rockchip, linux-kernel Hi All, On Tue, 25 Jun 2024 at 21:28, Anand Moon <linux.amoon@gmail.com> wrote: > > Rockchip PCIe driver lets waits for the combo PHY link like PCIe 3.0, > PCIe 2.0 and SATA 3.0 controller to be up during the probe this > consumes several milliseconds during boot. > > Establishing a PCIe link can take a while; allow asynchronous probing so > that link establishment can happen in the background while other devices > are being probed. > > Signed-off-by: Anand Moon <linux.amoon@gmail.com> Gentle ping. Thanks -Anand ^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH linu-next v1] PCI: dw-rockchip: Enable async probe by default 2024-06-25 15:57 [PATCH linu-next v1] PCI: dw-rockchip: Enable async probe by default Anand Moon 2024-08-07 4:39 ` Anand Moon @ 2024-08-07 16:31 ` Bjorn Helgaas 2024-08-07 17:00 ` Manivannan Sadhasivam 1 sibling, 1 reply; 5+ messages in thread From: Bjorn Helgaas @ 2024-08-07 16:31 UTC (permalink / raw) To: Anand Moon Cc: Lorenzo Pieralisi, Krzysztof Wilczyński, Rob Herring, Bjorn Helgaas, Heiko Stuebner, linux-pci, linux-arm-kernel, linux-rockchip, linux-kernel On Tue, Jun 25, 2024 at 09:27:57PM +0530, Anand Moon wrote: > Rockchip PCIe driver lets waits for the combo PHY link like PCIe 3.0, > PCIe 2.0 and SATA 3.0 controller to be up during the probe this > consumes several milliseconds during boot. This needs some wordsmithing. "driver lets waits" ... I guess "lets" is not supposed to be there? I'm not sure what the relevance of "PCIe 3.0, PCIe 2.0, SATA 3.0" is. I assume the host controller driver doesn't know what downstream devices might be present, and the async probing is desirable no matter what they might be? > Establishing a PCIe link can take a while; allow asynchronous probing so > that link establishment can happen in the background while other devices > are being probed. > > Signed-off-by: Anand Moon <linux.amoon@gmail.com> > --- > drivers/pci/controller/dwc/pcie-dw-rockchip.c | 1 + > 1 file changed, 1 insertion(+) > > diff --git a/drivers/pci/controller/dwc/pcie-dw-rockchip.c b/drivers/pci/controller/dwc/pcie-dw-rockchip.c > index 61b1acba7182..74a3e9d172a0 100644 > --- a/drivers/pci/controller/dwc/pcie-dw-rockchip.c > +++ b/drivers/pci/controller/dwc/pcie-dw-rockchip.c > @@ -367,6 +367,7 @@ static struct platform_driver rockchip_pcie_driver = { > .name = "rockchip-dw-pcie", > .of_match_table = rockchip_pcie_of_match, > .suppress_bind_attrs = true, > + .probe_type = PROBE_PREFER_ASYNCHRONOUS, > }, > .probe = rockchip_pcie_probe, > }; > -- > 2.44.0 > ^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH linu-next v1] PCI: dw-rockchip: Enable async probe by default 2024-08-07 16:31 ` Bjorn Helgaas @ 2024-08-07 17:00 ` Manivannan Sadhasivam 2024-08-08 3:13 ` Anand Moon 0 siblings, 1 reply; 5+ messages in thread From: Manivannan Sadhasivam @ 2024-08-07 17:00 UTC (permalink / raw) To: Bjorn Helgaas Cc: Anand Moon, Lorenzo Pieralisi, Krzysztof Wilczyński, Rob Herring, Bjorn Helgaas, Heiko Stuebner, linux-pci, linux-arm-kernel, linux-rockchip, linux-kernel On Wed, Aug 07, 2024 at 11:31:06AM -0500, Bjorn Helgaas wrote: > On Tue, Jun 25, 2024 at 09:27:57PM +0530, Anand Moon wrote: > > Rockchip PCIe driver lets waits for the combo PHY link like PCIe 3.0, > > PCIe 2.0 and SATA 3.0 controller to be up during the probe this > > consumes several milliseconds during boot. > > This needs some wordsmithing. "driver lets waits" ... I guess "lets" > is not supposed to be there? I'm not sure what the relevance of "PCIe > 3.0, PCIe 2.0, SATA 3.0" is. I assume the host controller driver > doesn't know what downstream devices might be present, and the async > probing is desirable no matter what they might be? > Since the DWC driver is enabling link training during boot, it also waits for the link to be 'up'. But if the device is 'up', then the wait time would be usually negligible (few ms). But if there is no device, then the wait time of 1s would be evident. But here the patch is trying to avoid the few ms delay itself (which is fine). The type of endpoint might have some impact on the link training also. But async probe is always preferred. - Mani > > Establishing a PCIe link can take a while; allow asynchronous probing so > > that link establishment can happen in the background while other devices > > are being probed. > > > > Signed-off-by: Anand Moon <linux.amoon@gmail.com> > > --- > > drivers/pci/controller/dwc/pcie-dw-rockchip.c | 1 + > > 1 file changed, 1 insertion(+) > > > > diff --git a/drivers/pci/controller/dwc/pcie-dw-rockchip.c b/drivers/pci/controller/dwc/pcie-dw-rockchip.c > > index 61b1acba7182..74a3e9d172a0 100644 > > --- a/drivers/pci/controller/dwc/pcie-dw-rockchip.c > > +++ b/drivers/pci/controller/dwc/pcie-dw-rockchip.c > > @@ -367,6 +367,7 @@ static struct platform_driver rockchip_pcie_driver = { > > .name = "rockchip-dw-pcie", > > .of_match_table = rockchip_pcie_of_match, > > .suppress_bind_attrs = true, > > + .probe_type = PROBE_PREFER_ASYNCHRONOUS, > > }, > > .probe = rockchip_pcie_probe, > > }; > > -- > > 2.44.0 > > > -- மணிவண்ணன் சதாசிவம் ^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH linu-next v1] PCI: dw-rockchip: Enable async probe by default 2024-08-07 17:00 ` Manivannan Sadhasivam @ 2024-08-08 3:13 ` Anand Moon 0 siblings, 0 replies; 5+ messages in thread From: Anand Moon @ 2024-08-08 3:13 UTC (permalink / raw) To: Manivannan Sadhasivam Cc: Bjorn Helgaas, Lorenzo Pieralisi, Krzysztof Wilczyński, Rob Herring, Bjorn Helgaas, Heiko Stuebner, linux-pci, linux-arm-kernel, linux-rockchip, linux-kernel Hi Manivannan, Bjorn On Wed, 7 Aug 2024 at 22:30, Manivannan Sadhasivam <manivannan.sadhasivam@linaro.org> wrote: > > On Wed, Aug 07, 2024 at 11:31:06AM -0500, Bjorn Helgaas wrote: > > On Tue, Jun 25, 2024 at 09:27:57PM +0530, Anand Moon wrote: > > > Rockchip PCIe driver lets waits for the combo PHY link like PCIe 3.0, > > > PCIe 2.0 and SATA 3.0 controller to be up during the probe this > > > consumes several milliseconds during boot. > > > > This needs some wordsmithing. "driver lets waits" ... I guess "lets" > > is not supposed to be there? I'm not sure what the relevance of "PCIe > > 3.0, PCIe 2.0, SATA 3.0" is. I assume the host controller driver > > doesn't know what downstream devices might be present, and the async > > probing is desirable no matter what they might be? > > Ok I will improve this commit message. Rockchip DWC PCIe driver currently waits for the combo PHY link (PCIe 3.0, PCIe 2.0, and SATA 3.0) to be established during the probe, which could consume several milliseconds during boot. To optimize boot time, this commit allows asynchronous probing. This change enables the PCIe link establishment to occur in the background while other devices are being probed. > > Since the DWC driver is enabling link training during boot, it also waits for > the link to be 'up'. But if the device is 'up', then the wait time would be > usually negligible (few ms). But if there is no device, then the wait time of 1s > would be evident. > > But here the patch is trying to avoid the few ms delay itself (which is fine). > The type of endpoint might have some impact on the link training also. But async > probe is always preferred. > > - Mani > Ok, Thanks -Anand ^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2024-08-08 3:14 UTC | newest] Thread overview: 5+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2024-06-25 15:57 [PATCH linu-next v1] PCI: dw-rockchip: Enable async probe by default Anand Moon 2024-08-07 4:39 ` Anand Moon 2024-08-07 16:31 ` Bjorn Helgaas 2024-08-07 17:00 ` Manivannan Sadhasivam 2024-08-08 3:13 ` Anand Moon
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).