Re: [PATCH 03/20] thunderbolt: Identify USB4 v2 routers

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

 



On Wed, May 31, 2023 at 03:00:22PM +0300, Yehezkel Bernat wrote:
> On Wed, May 31, 2023 at 12:06 PM Mika Westerberg
> <mika.westerberg@xxxxxxxxxxxxxxx> wrote:
> >
> > diff --git a/drivers/thunderbolt/tb.h b/drivers/thunderbolt/tb.h
> > index 2bda2816ff47..e27fcdf50581 100644
> > --- a/drivers/thunderbolt/tb.h
> > +++ b/drivers/thunderbolt/tb.h
> > @@ -955,7 +955,8 @@ static inline bool tb_switch_is_tiger_lake(const struct tb_switch *sw)
> >   */
> >  static inline bool tb_switch_is_usb4(const struct tb_switch *sw)
> >  {
> > -       return sw->config.thunderbolt_version == USB4_VERSION_1_0;
> > +       return FIELD_GET(USB4_VERSION_MAJOR_MASK,
> > +                        sw->config.thunderbolt_version) > 0;
> 
> Does it make sense to reuse the function below i.e. `return
> usb4_switch_version(sw) > 0;`?

Yes, I think it does. I'll change this.



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

  Powered by Linux