Hey, On Tue, Nov 02, 2021 at 11:39:12PM +0530, Manivannan Sadhasivam wrote: > On Tue, Nov 02, 2021 at 05:55:34PM +0100, Aleksander Morgado wrote: > > > > > > [ 7.189547] mhi mhi0: Transitioning from PM state: Linkdown or > > > > > > Error Fatal Detect to: SYS ERROR Process > > > > > > > > > > Hmm, I think the use of sync_power_up might be causing the issue here as it > > > > > forces the MHI state to fatal error. > > > > > > > > > > Ignore the previous diff and try the below one: > > > > > > > > > > diff --git a/drivers/bus/mhi/pci_generic.c b/drivers/bus/mhi/pci_generic.c > > > > > index 59a4896a8030..b1e8c7de4e54 100644 > > > > > --- a/drivers/bus/mhi/pci_generic.c > > > > > +++ b/drivers/bus/mhi/pci_generic.c > > > > > @@ -637,7 +637,7 @@ static void mhi_pci_recovery_work(struct work_struct *work) > > > > > if (err) > > > > > goto err_try_reset; > > > > > > > > > > - err = mhi_sync_power_up(mhi_cntrl); > > > > > + err = mhi_async_power_up(mhi_cntrl); > > > > > > Doh! Sorry, I modified the wrong function. Here is the correct one: > > > > > > diff --git a/drivers/bus/mhi/pci_generic.c b/drivers/bus/mhi/pci_generic.c > > > index 59a4896a8030..1e3c74bfbe34 100644 > > > --- a/drivers/bus/mhi/pci_generic.c > > > +++ b/drivers/bus/mhi/pci_generic.c > > > @@ -743,7 +743,7 @@ static int mhi_pci_probe(struct pci_dev *pdev, const struct pci_device_id *id) > > > goto err_unregister; > > > } > > > > > > - err = mhi_sync_power_up(mhi_cntrl); > > > + err = mhi_async_power_up(mhi_cntrl); > > > if (err) { > > > dev_err(&pdev->dev, "failed to power up MHI controller\n"); > > > goto err_unprepare; > > > > > > Let's see how it goes :) > > > > > > > Oh, wow, what a difference a single extra byte in the correct place makes! :D > > > > This looks waaaaay better; I've rebooted the board at least 10 times > > now and all of them worked nicely, at least just the process to probe > > the device and get the control and net ports exposed looks very > > reliable now. I'll test the setup with ModemManager in the next days > > and see how everything goes. Thank you very much! > > > > That's great to hear! Let me know how your testing goes with ModemManager. I'll > then submit a patch to fix the pci-generic driver. > Can you please test the attached patch? We had an internal discussion and came to a conclusion that the device is not handling the SYS_ERR case during host bootup. So we need to adjust the SYS_ERR logic handling in host to workaround it. Thanks, Mani > Thanks, > Mani