lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <CAPTae5KO2cAgCWVOPB+D+bMtDRaH=LhoASKYdAM2_J31Q6ehGA@mail.gmail.com>
Date:   Tue, 3 Aug 2021 12:22:18 -0700
From:   Badhri Jagan Sridharan <badhri@...gle.com>
To:     Guenter Roeck <linux@...ck-us.net>
Cc:     Kyle Tso <kyletso@...gle.com>,
        Heikki Krogerus <heikki.krogerus@...ux.intel.com>,
        Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
        USB <linux-usb@...r.kernel.org>,
        LKML <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH] usb: typec: tcpm: Keep other events when receiving FRS
 and Sourcing_vbus events

On Tue, Aug 3, 2021 at 6:48 AM Guenter Roeck <linux@...ck-us.net> wrote:
>
> On 8/3/21 2:13 AM, Kyle Tso wrote:
> > When receiving FRS and Sourcing_Vbus events from low-level drivers, keep
> > other events which come a bit earlier so that they will not be ignored
> > in the event handler.
> >
> > Fixes: 8dc4bd073663 ("usb: typec: tcpm: Add support for Sink Fast Role SWAP(FRS)")
> > Cc: Badhri Jagan Sridharan <badhri@...gle.com>
> > Signed-off-by: Kyle Tso <kyletso@...gle.com>
>
> Reviewed-by: Guenter Roeck <linux@...ck-us.net>
Reviewed-by: Badhri Jagan Sridharan <badhri@...gle.com>
>
> > ---
> >   drivers/usb/typec/tcpm/tcpm.c | 4 ++--
> >   1 file changed, 2 insertions(+), 2 deletions(-)
> >
> > diff --git a/drivers/usb/typec/tcpm/tcpm.c b/drivers/usb/typec/tcpm/tcpm.c
> > index 5b22a1c931a9..b9bb63d749ec 100644
> > --- a/drivers/usb/typec/tcpm/tcpm.c
> > +++ b/drivers/usb/typec/tcpm/tcpm.c
> > @@ -5369,7 +5369,7 @@ EXPORT_SYMBOL_GPL(tcpm_pd_hard_reset);
> >   void tcpm_sink_frs(struct tcpm_port *port)
> >   {
> >       spin_lock(&port->pd_event_lock);
> > -     port->pd_events = TCPM_FRS_EVENT;
> > +     port->pd_events |= TCPM_FRS_EVENT;
> >       spin_unlock(&port->pd_event_lock);
> >       kthread_queue_work(port->wq, &port->event_work);
> >   }
> > @@ -5378,7 +5378,7 @@ EXPORT_SYMBOL_GPL(tcpm_sink_frs);
> >   void tcpm_sourcing_vbus(struct tcpm_port *port)
> >   {
> >       spin_lock(&port->pd_event_lock);
> > -     port->pd_events = TCPM_SOURCING_VBUS;
> > +     port->pd_events |= TCPM_SOURCING_VBUS;
> >       spin_unlock(&port->pd_event_lock);
> >       kthread_queue_work(port->wq, &port->event_work);
> >   }
> >
>

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ