[Bug 210425] Plugging in or unplugging power cord while system is suspended does not trigger updates

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

 



https://bugzilla.kernel.org/show_bug.cgi?id=210425

--- Comment #19 from Méven Car (meven29@xxxxxxxxx) ---
(In reply to grzegorz.alibozek from comment #12)
> (In reply to Méven Car from comment #7)
> > I have this naive patch that fix the main issue:
> > 
> > diff --git drivers/usb/typec/ucsi/ucsi.c drivers/usb/typec/ucsi/ucsi.c
> > index d0c63afaf345..a679359c98be 100644
> > --- drivers/usb/typec/ucsi/ucsi.c
> > +++ drivers/usb/typec/ucsi/ucsi.c
> > @@ -187,11 +187,22 @@ EXPORT_SYMBOL_GPL(ucsi_send_command);
> >  int ucsi_resume(struct ucsi *ucsi)
> >  {
> >         u64 command;
> > +       int ret;
> > +       int i;
> >  
> >         /* Restore UCSI notification enable mask after system resume */
> >         command = UCSI_SET_NOTIFICATION_ENABLE | ucsi->ntfy;
> >  
> > -       return ucsi_send_command(ucsi, command, NULL, 0);
> > +       ret = ucsi_send_command(ucsi, command, NULL, 0);
> > +       if (ret)
> > +               return ret;
> > +
> > +       /* update all connectors */
> > +       for (i = 0; i < ucsi->cap.num_connectors; i++) {
> > +               ucsi_connector_change(ucsi, i);
> > +       }
> > +
> > +       return ret;
> >  }
> >  EXPORT_SYMBOL_GPL(ucsi_resume);
> >  /*
> > --------------------------------------------------------------------------
> */
> > 
> > 
> > Will probably post to LKML
> 
> any update about your fix?

I was wrong, I did not test properly, or at least I am unsure.
I am not familiar with the code base and it would take a long to learn about
the API to properly find a proper solution. 

I hope a usci maintainer will have a look.

-- 
You may reply to this email to add a comment.

You are receiving this mail because:
You are watching the assignee of the bug.



[Index of Archives]     [Linux Media]     [Linux Input]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Old Linux USB Devel Archive]

  Powered by Linux