Hi Mani and Johan, On 02/14/2025, Manivannan Sadhasivam wrote: > On Fri, Feb 14, 2025 at 03:32:13PM +0530, Ajay Agarwal wrote: > > On Fri, Feb 14, 2025 at 03:12:55PM +0530, Manivannan Sadhasivam wrote: > > > On Fri, Feb 14, 2025 at 10:18:27AM +0100, Johan Hovold wrote: > > > > On Fri, Feb 14, 2025 at 02:45:03PM +0530, Ajay Agarwal wrote: > > > > > > > > > Restarting this discussion for skipping the 1 sec of wait time if a > > > > > certain platform does not necessarily wish or expect to bring the link > > > > > up during probe time. I discussed with William and we think that a > > > > > module parameter can be added which if true, would lead to the skipping > > > > > of the wait time. By default, this parameter would be false, thereby > > > > > ensuring that the current behaviour to wait for the link is maintained. > > > > > > > > > > Please let me know if this is worth exploring. > > > > > > > > No, module parameters are a thing of the past (except possibly in vendor > > > > kernels). The default behaviour should just work. > > > > > > > > > > +1 > > > > > > Btw, you need to come up with a valid argument for not enabling the link during > > The argument for the link to not come up during probe is simply that the > > product does not need the link to be up during probe. The requirement is > > that the PCIe RC SW structures be prepared for link-up later, when there > > is a trigger from the userspace or the vendor kernel driver. > > > > This is the problem. You are fixing the behavior of the controller driver to > a single product line and this is not going to work if the same controller is > used in a different product. Instead you should fix the userspace. > Do you have an alternative suggestion on how to fix this in userspace without a module parameter? I'd argue that module parameters are very much still used in the upstream kernel to allow the userspace platform (Android in this case) to control driver behavior at module load time. Here are some recent examples I found on lore: https://lore.kernel.org/all/20250213142412.516309668@xxxxxxxxxxxxxxxxxxx/ https://lore.kernel.org/all/20250213180317.3205285-1-coltonlewis@xxxxxxxxxx/ By default (without any module parameter set by userspace), the driver would behave as it does today and spin for 1s on probe waiting for the link to come up. That will work for both Android and other Linux distros. We are only proposing the parameter to allow userspace to optimize boot time by skipping the link up wait time on probe when the userspace knows how to properly handle this. <snip> > Same with DWC controllers as well, probe doesn't fail even if the link did not > come up. Previously you were trying to avoid the delay while waiting for the > link up during probe (for which I also asked you to probe the controller driver > asynchronously to mitigate the delay). Is this the same case still? Async probing may work, but that is just hiding the problem we are trying to address -- unnecessarily spinning for 1s on probe. If userspace can handle bringing up the link later, then IMO it's a valid argument to allow the driver to skip the 1s delay. > > And what makes me nervous is the fact that you are trying to upstream a change > for your downstream driver, which is a big no-go. As you may know, we (Google and Linaro) are actively upstreaming Pixel 6 drivers and will be adding support for the gs101 PCIe driver in the near future. So this isn't just for a downstream driver running Android. Thanks, Will