Re: [PATCH v3 2/4] platform/chrome: cros_ec_typec: Use Thunderbolt 3 cable discover mode VDO in USB4 mode

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

 



Hi Prashant,

On Fri, Nov 20, 2020 at 04:07:00AM -0800, Prashant Malani wrote:
> On Fri, Nov 20, 2020 at 01:22:18PM +0200, Heikki Krogerus wrote:
> > IMO safer bet for now would be to just claim that the cable is always
> > TBT3 cable until we have access to information that can really tell us
> > is the cable USB4 or TBT3.
> 
> Which brings us back to v1 of the patch :S
> 
> That still leaves my underlying concern that we'll be telling the Mux
> implementation that a TBT3 cable is connected when in fact it's a USB4
> active cable.

No matter what we do with these values, it does not change the fact
that we do not know is the cable USB4 or TBT3 at the moment. What ever
we do, we are guessing things.

Can you please explain your concern again? What can happen if we use
USB4 cable but claim that it is TBT3 to the mux?

> How about we don't set the TBT_MODE bit at all ?

Let's not come up with values that are not defined in the spec for
this field (or any other). Even though it is unlikely, we can not rule
out the possibility that one day value of 0x0000 is defined for that
field.

I'm strongly against this kind of "modifications". It would mean that
the member tbt_cable_vdo does not actually contain TBT3 Cable VDO, but
instead it has to be considered as driver or subsystem specific data.

> IMO it's equally bad as setting it always, but with the additional
> advantage:
> 
> - USB4 active cable case : you are covered (since if we unilaterally set
> TBT_MODE then the Active USB4 cable case never gets executed in
> pmc_usb_mux_usb4() in drivers/usb/typec/mux/intel_pmc_mux.c Patch 3/4)
> 
> - Bidirectional LSRX non-rounded TBT: Still supported since
>   the code path in the Intel Mux agent is the same.

This case will not work. The tbt_cable_vdo member is now 0, which to
the mux driver means that the cable is USB4 cable (and that is what it
really must mean to the mux driver - any mux driver). The mux driver
will therefore enable unidirectional SBU communication even though it
is actually bidirectional, and also rounded data rates even though the
cable supports only non-rounded data rates.

> I understand neither of the options are ideal, but WDYT?

I may be missing something, but I'm still going to say that let's just
claim that the cable is always TBT3 for now in this driver. That is
the only safe bet that we have.


thanks,

-- 
heikki



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

  Powered by Linux