Thunderbolt3/USB4 cable rounded and active cable plug link training support
Subsystems (6)
v2 cover Thunderbolt3/USB4 cable rounded and active cable plug link training support
This patch series adds the support for Thunderbolt3/USB4 rounded and non-rounded frequencies cables and fixes the active cable plug link training support.
Changes in v2:
- Removed the fixes tag as there is no functional implication from patches 1/8, 2/8 and 4/8.
Utkarsh Patel (8):
usb: typec: Correct the bit values for the Thunderbolt
rounded/non-rounded cable support
platform/chrome: cros_ec_typec: Correct the Thunderbolt
rounded/non-rounded cable support
usb: typec: intel_pmc_mux: Configure Thunderbolt cable generation bits
usb: typec: Remove one bit support for the Thunderbolt
rounded/non-rounded cable
usb: typec: Use Thunderbolt 3 cable discover mode VDO in Enter_USB
message
platform/chrome: cros_ec_typec: Use Thunderbolt 3 cable discover mode
VDO in USB4 mode
usb: typec: intel_pmc_mux: Configure active cable properties for USB4
usb: typec: Remove active_link_training variable from Enter_USB
message
drivers/platform/chrome/cros_ec_typec.c | 17 +++++++++++++---- drivers/usb/typec/mux/intel_pmc_mux.c | 21 ++++++++++++++++++--- include/linux/usb/typec.h | 8 ++------ include/linux/usb/typec_tbt.h | 6 +++++- 4 files changed, 38 insertions(+), 14 deletions(-)
Signature · 1 line
2.17.1
PATCH v2 1/8 usb: typec: Correct the bit values for the Thunderbolt rounded/non-rounded cable support
Rounded and non-rounded Thunderbolt cables are represented by two bits as per USB Type-C Connector specification v2.0 section F.2.6. Corrected that in the Thunderbolt 3 cable discover mode VDO.
--
Changes in v2:
- Removed the fixes tag as there is no functional implication. --
--- include/linux/usb/typec_tbt.h | 5 +++++ 1 file changed, 5 insertions(+)
include/linux/usb/typec_tbt.h +5 -0
@@ -40,11 +40,16 @@ struct typec_thunderbolt_data {#define TBT_CABLE_USB3_PASSIVE 2#define TBT_CABLE_10_AND_20GBPS 3#define TBT_CABLE_ROUNDED BIT(19) +#define TBT_CABLE_ROUNDED_SUPPORT (_vdo_) \ + (((_vdo_) & GENMASK(20, 19)) >> 19) +#define TBT_GEN3_NON_ROUNDED 0 +#define TBT_GEN3_GEN4_ROUNDED_NON_ROUNDED 1#define TBT_CABLE_OPTICAL BIT(21)#define TBT_CABLE_RETIMER BIT(22)#define TBT_CABLE_LINK_TRAINING BIT(23)#define TBT_SET_CABLE_SPEED (_s_) (((_s_) & GENMASK(2, 0)) << 16) +#define TBT_SET_CABLE_ROUNDED (_g_) (((_g_) & GENMASK(1, 0)) << 19)/* TBT3 Device Enter Mode VDO bits */ #define TBT_ENTER_MODE_CABLE_SPEED (s) TBT_SET_CABLE_SPEED(s)
Signature · 1 line
2.17.1
Re: [PATCH v2 1/8] usb: typec: Correct the bit values for the Thunderbolt rounded/non-rounded cable support
Quoted 5 lines · Utkarsh Patel
Rounded and non-rounded Thunderbolt cables are represented by two bits as per USB Type-C Connector specification v2.0 section F.2.6. Corrected that in the Thunderbolt 3 cable discover mode VDO.
Signed-off-by Utkarsh Patel <[email protected]>
Quoted 19 lines
--
Changes in v2:
- Removed the fixes tag as there is no functional implication. ----- include/linux/usb/typec_tbt.h | 5 +++++ 1 file changed, 5 insertions(+)include/linux/usb/typec_tbt.h +3
-0@@ -40,11 +40,16 @@ struct typec_thunderbolt_data {#define TBT_CABLE_USB3_PASSIVE 2#define TBT_CABLE_10_AND_20GBPS 3#define TBT_CABLE_ROUNDED BIT(19) +#define TBT_CABLE_ROUNDED_SUPPORT (_vdo_) \ + (((_vdo_) & GENMASK(20, 19)) >> 19) +#define TBT_GEN3_NON_ROUNDED 0
include/linux/usb/typec_tbt.h struct typec_thunderbolt_data { · line 55
Quoted 10 lines
include/linux/usb/typec_tbt.h +2
-0+#define TBT_GEN3_GEN4_ROUNDED_NON_ROUNDED 1#define TBT_CABLE_OPTICAL BIT(21)#define TBT_CABLE_RETIMER BIT(22)#define TBT_CABLE_LINK_TRAINING BIT(23)#define TBT_SET_CABLE_SPEED (_s_) (((_s_) & GENMASK(2, 0)) << 16) +#define TBT_SET_CABLE_ROUNDED (_g_) (((_g_) & GENMASK(1, 0)) << 19)/* TBT3 Device Enter Mode VDO bits */ #define TBT_ENTER_MODE_CABLE_SPEED (s) TBT_SET_CABLE_SPEED(s)
thanks,
Signature · 1 line
heikki
PATCH v2 2/8 platform/chrome: cros_ec_typec: Correct the Thunderbolt rounded/non-rounded cable support
In reply to Utkarsh PatelThunderbolt rounded/non-rounded cable support is two bits value. Correcting it as per the Thunderbolt 3 cable discover mode VDO changes done in the Thunderbolt 3 alternate mode header.
--
Changes in v2:
- Removed the fixes tag as there is no functional implication. --
--- drivers/platform/chrome/cros_ec_typec.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-)
drivers/platform/chrome/cros_ec_typec.c +1 -2
@@ -438,8 +438,7 @@ static int cros_typec_enable_tbt(struct cros_typec_data *typec,if (pd_ctrl->control_flags &USB_PD_CTRL_ACTIVE_LINK_UNIDIR ) data.cable_mode |=TBT_CABLE_LINK_TRAINING ; -if (pd_ctrl->cable_gen) - data.cable_mode |=TBT_CABLE_ROUNDED ; + data.cable_mode |=TBT_SET_CABLE_ROUNDED (pd_ctrl->cable_gen);/* Enter Mode VDO */ data.enter_vdo =TBT_SET_CABLE_SPEED (pd_ctrl->cable_speed);
Signature · 1 line
2.17.1
Re: [PATCH v2 2/8] platform/chrome: cros_ec_typec: Correct the Thunderbolt rounded/non-rounded cable support
Quoted 5 lines · Utkarsh Patel
Thunderbolt rounded/non-rounded cable support is two bits value. Correcting it as per the Thunderbolt 3 cable discover mode VDO changes done in the Thunderbolt 3 alternate mode header.
Signed-off-by Utkarsh Patel <[email protected]>
Quoted 24 lines
--
Changes in v2:
- Removed the fixes tag as there is no functional implication. ----- drivers/platform/chrome/cros_ec_typec.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-)drivers/platform/chrome/cros_ec_typec.c +1
-2@@ -438,8 +438,7 @@ static int cros_typec_enable_tbt(struct cros_typec_data *typec,if (pd_ctrl->control_flags &USB_PD_CTRL_ACTIVE_LINK_UNIDIR ) data.cable_mode |=TBT_CABLE_LINK_TRAINING ; -if (pd_ctrl->cable_gen) - data.cable_mode |=TBT_CABLE_ROUNDED ; + data.cable_mode |=TBT_SET_CABLE_ROUNDED (pd_ctrl->cable_gen);/* Enter Mode VDO */ data.enter_vdo =TBT_SET_CABLE_SPEED (pd_ctrl->cable_speed);Signature · 1 line
2.17.1
thanks,
Signature · 1 line
heikki
Re: [PATCH v2 2/8] platform/chrome: cros_ec_typec: Correct the Thunderbolt rounded/non-rounded cable support
In reply to Utkarsh PatelQuoted 5 lines · Utkarsh Patel
Thunderbolt rounded/non-rounded cable support is two bits value. Correcting it as per the Thunderbolt 3 cable discover mode VDO changes done in the Thunderbolt 3 alternate mode header.
Signed-off-by Utkarsh Patel <[email protected]>
Quoted 23 lines
--
Changes in v2:
- Removed the fixes tag as there is no functional implication. ----- drivers/platform/chrome/cros_ec_typec.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-)drivers/platform/chrome/cros_ec_typec.c +1
-2@@ -438,8 +438,7 @@ static int cros_typec_enable_tbt(struct cros_typec_data *typec,if (pd_ctrl->control_flags &USB_PD_CTRL_ACTIVE_LINK_UNIDIR ) data.cable_mode |=TBT_CABLE_LINK_TRAINING ; -if (pd_ctrl->cable_gen) - data.cable_mode |=TBT_CABLE_ROUNDED ; + data.cable_mode |=TBT_SET_CABLE_ROUNDED (pd_ctrl->cable_gen);/* Enter Mode VDO */ data.enter_vdo =TBT_SET_CABLE_SPEED (pd_ctrl->cable_speed);
PATCH v2 3/8 usb: typec: intel_pmc_mux: Configure Thunderbolt cable generation bits
In reply to Utkarsh PatelThunderbolt cable generation bits received as a part of Thunderbolt 3 cable discover mode VDO needs to be configured for Thunderbolt rounded and non-rounded cable support in the Thunderbolt alternate mode.
--
Changes in v2:
- No change.
--
--- drivers/usb/typec/mux/intel_pmc_mux.c | 3 +++ 1 file changed, 3 insertions(+)
drivers/usb/typec/mux/intel_pmc_mux.c +3 -0
@@ -256,6 +256,7 @@ static int pmc_usb_mux_tbt(struct pmc_usb_port *port, struct typec_mux_state *state) { struct typec_thunderbolt_data *data = state->data; +u8 cable_rounded =TBT_CABLE_ROUNDED_SUPPORT (data->cable_mode);u8 cable_speed =TBT_CABLE_SPEED (data->cable_mode);struct altmode_req req = { };
@@ -284,6 +285,8 @@ pmc_usb_mux_tbt(struct pmc_usb_port *port, struct typec_mux_state *state) req.mode_data |=PMC_USB_ALTMODE_CABLE_SPD (cable_speed); + req.mode_data |=PMC_USB_ALTMODE_TBT_GEN (cable_rounded); +return pmc_usb_command (port, (void *)&req,sizeof (req)); }
Signature · 1 line
2.17.1
Re: [PATCH v2 3/8] usb: typec: intel_pmc_mux: Configure Thunderbolt cable generation bits
Quoted 5 lines · Utkarsh Patel
Thunderbolt cable generation bits received as a part of Thunderbolt 3 cable discover mode VDO needs to be configured for Thunderbolt rounded and non-rounded cable support in the Thunderbolt alternate mode.
Signed-off-by Utkarsh Patel <[email protected]>
Quoted 31 lines
--
Changes in v2:
- No change.
----- drivers/usb/typec/mux/intel_pmc_mux.c | 3 +++ 1 file changed, 3 insertions(+)drivers/usb/typec/mux/intel_pmc_mux.c +3
-0@@ -256,6 +256,7 @@ static int pmc_usb_mux_tbt(struct pmc_usb_port *port, struct typec_mux_state *state) { struct typec_thunderbolt_data *data = state->data; +u8 cable_rounded =TBT_CABLE_ROUNDED_SUPPORT (data->cable_mode);u8 cable_speed =TBT_CABLE_SPEED (data->cable_mode);struct altmode_req req = { };@@ -284,6 +285,8 @@ pmc_usb_mux_tbt(struct pmc_usb_port *port, struct typec_mux_state *state) req.mode_data |=PMC_USB_ALTMODE_CABLE_SPD (cable_speed); + req.mode_data |=PMC_USB_ALTMODE_TBT_GEN (cable_rounded); +return pmc_usb_command (port, (void *)&req,sizeof (req)); }Signature · 1 line
2.17.1
Signature · 1 line
heikki
PATCH v2 4/8 usb: typec: Remove one bit support for the Thunderbolt rounded/non-rounded cable
In reply to Utkarsh PatelTwo bits support for the Thunderbolt rounded/non-rounded cable has been added to the header file.
Hence, removing unused TBT_CABLE_ROUNDED definition from the header file.
--
changes in v2:
- Removed the fixes tag as there is no functional implication. --
--- include/linux/usb/typec_tbt.h | 1 - 1 file changed, 1 deletion(-)
include/linux/usb/typec_tbt.h +0 -1
@@ -39,7 +39,6 @@ struct typec_thunderbolt_data {#define TBT_CABLE_USB3_GEN1 1#define TBT_CABLE_USB3_PASSIVE 2#define TBT_CABLE_10_AND_20GBPS 3 -#define TBT_CABLE_ROUNDED BIT(19)#define TBT_CABLE_ROUNDED_SUPPORT (_vdo_) \ (((_vdo_) & GENMASK(20, 19)) >> 19)#define TBT_GEN3_NON_ROUNDED 0
Signature · 1 line
2.17.1
Re: [PATCH v2 4/8] usb: typec: Remove one bit support for the Thunderbolt rounded/non-rounded cable
Quoted 5 lines · Utkarsh Patel
Two bits support for the Thunderbolt rounded/non-rounded cable has been added to the header file.
Hence, removing unusedTBT_CABLE_ROUNDEDdefinition from the header file.Signed-off-by Utkarsh Patel <[email protected]>
Quoted 22 lines
--
changes in v2:
- Removed the fixes tag as there is no functional implication. ----- include/linux/usb/typec_tbt.h | 1 - 1 file changed, 1 deletion(-)include/linux/usb/typec_tbt.h +0
-1@@ -39,7 +39,6 @@ struct typec_thunderbolt_data {#define TBT_CABLE_USB3_GEN1 1#define TBT_CABLE_USB3_PASSIVE 2#define TBT_CABLE_10_AND_20GBPS 3 -#define TBT_CABLE_ROUNDED BIT(19)#define TBT_CABLE_ROUNDED_SUPPORT (_vdo_) \ (((_vdo_) & GENMASK(20, 19)) >> 19)#define TBT_GEN3_NON_ROUNDED 0Signature · 1 line
2.17.1
thanks,
Signature · 1 line
heikki
PATCH v2 5/8 usb: typec: Use Thunderbolt 3 cable discover mode VDO in Enter_USB message
In reply to Utkarsh PatelUSB4 also uses same cable properties as Thunderbolt 3 so use Thunderbolt 3 cable discover mode VDO to fill details such as active cable plug link training and cable rounded support.
--
Changes in v2:
- No change.
--
--- include/linux/usb/typec.h | 2 ++ 1 file changed, 2 insertions(+)
include/linux/usb/typec.h +2 -0
@@ -75,6 +75,7 @@ enum typec_orientation {/* * struct enter_usb_data - Enter_USB Message details * @eudo: Enter_USB Data Object +* @tbt_cable_vdo: TBT3 Cable Discover Mode Response * @active_link_training: Active Cable Plug Link Training * * @active_link_training is a flag that should be set with uni-directional SBRX
@@ -83,6 +84,7 @@ enum typec_orientation {*/ struct enter_usb_data {u32 eudo; +u32 tbt_cable_vdo;unsigned char active_link_training:1 ; };
Signature · 1 line
2.17.1
Heikki Krogerus
maintainerRe: [PATCH v2 5/8] usb: typec: Use Thunderbolt 3 cable discover mode VDO in Enter_USB message
Quoted 3 lines · Utkarsh Patel
USB4 also uses same cable properties as Thunderbolt 3 so use Thunderbolt 3 cable discover mode VDO to fill details such as active cable plug link training and cable rounded support.
I'm sorry, but I think that has to be explained better. We only need the Thunderbolt 3 properties when we create the USB4 connection with Thunderbolt 3 cables. With USB4 cables that information is simply not available. Claiming that USB4 uses the same properties in general is not true.
Quoted 15 lines
Suggested-by Heikki Krogerus <[email protected]>Signed-off-by Utkarsh Patel <[email protected]>--
Changes in v2:
- No change.
----- include/linux/usb/typec.h | 2 ++ 1 file changed, 2 insertions(+)include/linux/usb/typec.h +0
-0
include/linux/usb/typec.h enum typec_orientation { · line 81
Quoted 7 lines
include/linux/usb/typec.h +1
-0@@ -75,6 +75,7 @@ enum typec_orientation {/* * struct enter_usb_data - Enter_USB Message details * @eudo: Enter_USB Data Object +* @tbt_cable_vdo: TBT3 Cable Discover Mode Response * @active_link_training: Active Cable Plug Link Training * * @active_link_training is a flag that should be set with uni-directional SBRX
Please also explain the same here with a short comment. So basically, if the USB4 connection is created using TBT3 cable, then we need to supply also the TBT3 Cable VDO as part of this data. But if USB4 cable is used, then that member should not be filled at all.
include/linux/usb/typec.h enum typec_orientation { · line 89
Quoted 7 lines
include/linux/usb/typec.h +1
-0@@ -83,6 +84,7 @@ enum typec_orientation {*/ struct enter_usb_data {u32 eudo; +u32 tbt_cable_vdo;unsigned char active_link_training:1 ; };
thanks,
Signature · 1 line
heikki
RE: [PATCH v2 5/8] usb: typec: Use Thunderbolt 3 cable discover mode VDO in Enter_USB message
Hi Heikki,
Quoted 11 lines
-----Original Message-----
From: Heikki Krogerus <[email protected]>
Sent: Tuesday, November 17, 2020 4:10 AM
To: Patel, Utkarsh H <[email protected]>
Cc: [email protected]; [email protected]; [email protected]; [email protected]; Mani, Rajmohan <[email protected]>; Shaikh, Azhar <[email protected]>
Subject: Re: [PATCH v2 5/8] usb: typec: Use Thunderbolt 3 cable discover mode VDO inEnter_USBmessageOn Fri, Nov 13, 2020 at 12:25:00PM -0800, Utkarsh Patel wrote:
Quoted 8 lines
Quoted 3 lines
USB4 also uses same cable properties as Thunderbolt 3 so use Thunderbolt 3 cable discover mode VDO to fill details such as active cable plug link training and cable rounded support.
I'm sorry, but I think that has to be explained better. We only need the Thunderbolt 3 properties when we create the USB4 connection with Thunderbolt 3 cables. With USB4 cables that information is simply not available. Claiming that USB4 uses the same properties in general is not true.
Ack. I will change the commit message.
Quoted 21 lines
Quoted 21 lines
Suggested-by Heikki Krogerus <[email protected]>Signed-off-by Utkarsh Patel <[email protected]>--
Changes in v2:
- No change.
----- include/linux/usb/typec.h | 2 ++ 1 file changed, 2 insertions(+)include/linux/usb/typec.h +1
-0@@ -75,6 +75,7 @@ enum typec_orientation {/* * struct enter_usb_data - Enter_USB Message details * @eudo: Enter_USB Data Object +* @tbt_cable_vdo: TBT3 Cable Discover Mode Response * @active_link_training: Active Cable Plug Link Training
Quoted 8 lines
Quoted 3 lines
include/linux/usb/typec.h +0
-0* * @active_link_training is a flag that should be set with uni-directional SBRX
Please also explain the same here with a short comment. So basically, if the USB4 connection is created using TBT3 cable, then we need to supply also the TBT3 Cable VDO as part of this data. But if USB4 cable is used, then that member should not be filled at all.
Ack.
Quoted 11 lines
include/linux/usb/typec.h enum typec_orientation { · line 89
Quoted 8 lines
include/linux/usb/typec.h +1
-0@@ -83,6 +84,7 @@ enum typec_orientation {*/ struct enter_usb_data {u32 eudo; +u32 tbt_cable_vdo;unsigned char active_link_training:1 ; };thanks,
Quoted 2 lines
--
Heikki
Sincerely,
Utkarsh Patel.
Re: [PATCH v2 5/8] usb: typec: Use Thunderbolt 3 cable discover mode VDO in Enter_USB message
In reply to Utkarsh PatelHi Utkarsh,
Quoted 28 lines · Utkarsh Patel
USB4 also uses same cable properties as Thunderbolt 3 so use Thunderbolt 3 cable discover mode VDO to fill details such as active cable plug link training and cable rounded support.
Suggested-by Heikki Krogerus <[email protected]>Signed-off-by Utkarsh Patel <[email protected]>--
Changes in v2:
- No change.
----- include/linux/usb/typec.h | 2 ++ 1 file changed, 2 insertions(+)include/linux/usb/typec.h +1
-0@@ -75,6 +75,7 @@ enum typec_orientation {/* * struct enter_usb_data - Enter_USB Message details * @eudo: Enter_USB Data Object +* @tbt_cable_vdo: TBT3 Cable Discover Mode Response * @active_link_training: Active Cable Plug Link Training * * @active_link_training is a flag that should be set with uni-directional SBRX
include/linux/usb/typec.h enum typec_orientation { · line 87
Quoted 4 lines
include/linux/usb/typec.h +1
-0@@ -83,6 +84,7 @@ enum typec_orientation {*/ struct enter_usb_data {u32 eudo; +u32 tbt_cable_vdo;
Can we instead just include a field for the rounded cable support property , similar to what was done for active_link_training? That way this gets decoupled from whether a TBT VDO was present in the cable or not
Quoted 6 lines
include/linux/usb/typec.h +0
-0unsigned char active_link_training:1; };Signature · 1 line
2.17.1
Best regards,
-Prashant
Re: [PATCH v2 5/8] usb: typec: Use Thunderbolt 3 cable discover mode VDO in Enter_USB message
Quoted 7 lines · Prashant Malani
Hi Utkarsh,
Quoted 3 lines · Utkarsh Patel
USB4 also uses same cable properties as Thunderbolt 3 so use Thunderbolt 3 cable discover mode VDO to fill details such as active cable plug link training and cable rounded support.
On digging into the Cros EC code further, sounds like active cable link training and cable rounded are necessarily only part of cables that have a TBT cable VDO, so sounds like the approach in the patch is fine.
Sorry for the noise.
Best regards,
-Prashant
PATCH v2 6/8 platform/chrome: cros_ec_typec: Use Thunderbolt 3 cable discover mode VDO in USB4 mode
In reply to Utkarsh PatelConfigure Thunderbolt3/USB4 cable generation value by filing Thunderbolt 3 cable discover mode VDO to support rounded and non-rounded Thunderbolt3/ USB4 cables.
While we are here use Thunderbolt 3 cable discover mode VDO to fill active cable plug link training value.
--
Changes in v2:
- No change.
--
--- drivers/platform/chrome/cros_ec_typec.c | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-)
drivers/platform/chrome/cros_ec_typec.c +12 -2
@@ -514,8 +514,18 @@ static int cros_typec_enable_usb4(struct cros_typec_data *typec,else if (pd_ctrl->control_flags &USB_PD_CTRL_ACTIVE_CABLE ) data.eudo |=EUDO_CABLE_TYPE_RE_TIMER <<EUDO_CABLE_TYPE_SHIFT ; - data.active_link_training = !!(pd_ctrl->control_flags & -USB_PD_CTRL_ACTIVE_LINK_UNIDIR ); +/* +* This driver does not have access to the identity information or +* capabilities of the cable, so we don't know is it a real USB4 or +* TBT3 cable. Therefore pretending that it's always TBT3 cable by +* filling the TBT3 Cable VDO. +*/ + data.tbt_cable_vdo =TBT_MODE ; + +if (pd_ctrl->control_flags &USB_PD_CTRL_ACTIVE_LINK_UNIDIR ) + data.tbt_cable_vdo |=TBT_CABLE_LINK_TRAINING ; + + data.tbt_cable_vdo |=TBT_SET_CABLE_ROUNDED (pd_ctrl->cable_gen); port->state.alt =NULL ; port->state.data = &data;
Signature · 1 line
2.17.1
Re: [PATCH v2 6/8] platform/chrome: cros_ec_typec: Use Thunderbolt 3 cable discover mode VDO in USB4 mode
Quoted 8 lines · Utkarsh Patel
Configure Thunderbolt3/USB4 cable generation value by filing Thunderbolt 3 cable discover mode VDO to support rounded and non-rounded Thunderbolt3/ USB4 cables.
While we are here use Thunderbolt 3 cable discover mode VDO to fill active cable plug link training value.Suggested-by Heikki Krogerus <[email protected]>Signed-off-by Utkarsh Patel <[email protected]>
Quoted 35 lines
--
Changes in v2:
- No change.
----- drivers/platform/chrome/cros_ec_typec.c | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-)drivers/platform/chrome/cros_ec_typec.c +12
-2@@ -514,8 +514,18 @@ static int cros_typec_enable_usb4(struct cros_typec_data *typec,else if (pd_ctrl->control_flags &USB_PD_CTRL_ACTIVE_CABLE ) data.eudo |=EUDO_CABLE_TYPE_RE_TIMER <<EUDO_CABLE_TYPE_SHIFT ; - data.active_link_training = !!(pd_ctrl->control_flags & -USB_PD_CTRL_ACTIVE_LINK_UNIDIR ); +/* +* This driver does not have access to the identity information or +* capabilities of the cable, so we don't know is it a real USB4 or +* TBT3 cable. Therefore pretending that it's always TBT3 cable by +* filling the TBT3 Cable VDO. +*/ + data.tbt_cable_vdo =TBT_MODE ; + +if (pd_ctrl->control_flags &USB_PD_CTRL_ACTIVE_LINK_UNIDIR ) + data.tbt_cable_vdo |=TBT_CABLE_LINK_TRAINING ; + + data.tbt_cable_vdo |=TBT_SET_CABLE_ROUNDED (pd_ctrl->cable_gen); port->state.alt =NULL ; port->state.data = &data;
Re: [PATCH v2 6/8] platform/chrome: cros_ec_typec: Use Thunderbolt 3 cable discover mode VDO in USB4 mode
In reply to Utkarsh PatelQuoted 8 lines · Utkarsh Patel
Configure Thunderbolt3/USB4 cable generation value by filing Thunderbolt 3 cable discover mode VDO to support rounded and non-rounded Thunderbolt3/ USB4 cables.
While we are here use Thunderbolt 3 cable discover mode VDO to fill active cable plug link training value.Suggested-by Heikki Krogerus <[email protected]>Signed-off-by Utkarsh Patel <[email protected]>
FWIW:
Quoted 35 lines
--
Changes in v2:
- No change.
----- drivers/platform/chrome/cros_ec_typec.c | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-)drivers/platform/chrome/cros_ec_typec.c +12
-2@@ -514,8 +514,18 @@ static int cros_typec_enable_usb4(struct cros_typec_data *typec,else if (pd_ctrl->control_flags &USB_PD_CTRL_ACTIVE_CABLE ) data.eudo |=EUDO_CABLE_TYPE_RE_TIMER <<EUDO_CABLE_TYPE_SHIFT ; - data.active_link_training = !!(pd_ctrl->control_flags & -USB_PD_CTRL_ACTIVE_LINK_UNIDIR ); +/* +* This driver does not have access to the identity information or +* capabilities of the cable, so we don't know is it a real USB4 or +* TBT3 cable. Therefore pretending that it's always TBT3 cable by +* filling the TBT3 Cable VDO. +*/ + data.tbt_cable_vdo =TBT_MODE ; + +if (pd_ctrl->control_flags &USB_PD_CTRL_ACTIVE_LINK_UNIDIR ) + data.tbt_cable_vdo |=TBT_CABLE_LINK_TRAINING ; + + data.tbt_cable_vdo |=TBT_SET_CABLE_ROUNDED (pd_ctrl->cable_gen); port->state.alt =NULL ; port->state.data = &data;Signature · 1 line
2.17.1
Signature · 1 line
heikki
Re: [PATCH v2 6/8] platform/chrome: cros_ec_typec: Use Thunderbolt 3 cable discover mode VDO in USB4 mode
In reply to Utkarsh PatelHi Utkarsh,
Quoted 24 lines · Utkarsh Patel
Configure Thunderbolt3/USB4 cable generation value by filing Thunderbolt 3 cable discover mode VDO to support rounded and non-rounded Thunderbolt3/ USB4 cables.
While we are here use Thunderbolt 3 cable discover mode VDO to fill active cable plug link training value.Suggested-by Heikki Krogerus <[email protected]>Signed-off-by Utkarsh Patel <[email protected]>--
Changes in v2:
- No change.
----- drivers/platform/chrome/cros_ec_typec.c | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-)drivers/platform/chrome/cros_ec_typec.c +0
-0@@ -514,8 +514,18 @@ static int cros_typec_enable_usb4(struct cros_typec_data *typec,else if (pd_ctrl->control_flags &USB_PD_CTRL_ACTIVE_CABLE ) data.eudo |=EUDO_CABLE_TYPE_RE_TIMER <<EUDO_CABLE_TYPE_SHIFT ;
drivers/platform/chrome/cros_ec_typec.c static int cros_typec_enable_usb4(struct cros_typec_data *typec, · line 523
Quoted 10 lines
drivers/platform/chrome/cros_ec_typec.c +7
-2- data.active_link_training = !!(pd_ctrl->control_flags & -USB_PD_CTRL_ACTIVE_LINK_UNIDIR ); +/* +* This driver does not have access to the identity information or +* capabilities of the cable, so we don't know is it a real USB4 or +* TBT3 cable. Therefore pretending that it's always TBT3 cable by +* filling the TBT3 Cable VDO. +*/ + data.tbt_cable_vdo =TBT_MODE ;
Is it safe to be making this assumption unconditionally? It might work for Intel Mux agent but is it guaranteed to be safe for any other future mux implementation? In other words, what if a "true" USB4 cable is connected which doesn't have the Thunderbolt SVID alt mode?
(Pre-fetching some alternatives in case the answer is no)
You might want to check with the Cros EC team if you can repurpose a bit of the "reserved" field for specifying whether the cable is TBT or not.
Either that or see if there is a way to determine from the pd_ctrl->cable_speed whether the cable is actually TBT or not.
Failing all the above, perhaps you'll have to wait for the PD discovery stuff to make it's way through review and use that (note that there may be timing issues between the Mux update event and PD discovery complete event reaching the port driver).
Best regards,
-Prashant
Re: [PATCH v2 6/8] platform/chrome: cros_ec_typec: Use Thunderbolt 3 cable discover mode VDO in USB4 mode
Quoted 29 lines · Prashant Malani
Hi Utkarsh,
Quoted 25 lines · Utkarsh Patel
Configure Thunderbolt3/USB4 cable generation value by filing Thunderbolt 3 cable discover mode VDO to support rounded and non-rounded Thunderbolt3/ USB4 cables.
While we are here use Thunderbolt 3 cable discover mode VDO to fill active cable plug link training value.Suggested-by Heikki Krogerus <[email protected]>Signed-off-by Utkarsh Patel <[email protected]>--
Changes in v2:
- No change.
----- drivers/platform/chrome/cros_ec_typec.c | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-)drivers/platform/chrome/cros_ec_typec.c +0
-0@@ -514,8 +514,18 @@ static int cros_typec_enable_usb4(struct cros_typec_data *typec,else if (pd_ctrl->control_flags &USB_PD_CTRL_ACTIVE_CABLE ) data.eudo |=EUDO_CABLE_TYPE_RE_TIMER <<EUDO_CABLE_TYPE_SHIFT ;
Quoted 14 lines
drivers/platform/chrome/cros_ec_typec.c static int cros_typec_enable_usb4(struct cros_typec_data *typec, · line 523
Quoted 9 lines
drivers/platform/chrome/cros_ec_typec.c +7
-2- data.active_link_training = !!(pd_ctrl->control_flags & -USB_PD_CTRL_ACTIVE_LINK_UNIDIR ); +/* +* This driver does not have access to the identity information or +* capabilities of the cable, so we don't know is it a real USB4 or +* TBT3 cable. Therefore pretending that it's always TBT3 cable by +* filling the TBT3 Cable VDO. +*/ + data.tbt_cable_vdo =TBT_MODE ;Is it safe to be making this assumption unconditionally? It might work for Intel Mux agent but is it guaranteed to be safe for any other future mux implementation? In other words, what if a "true" USB4 cable is connected which doesn't have the Thunderbolt SVID alt mode?
I dug into this a bit more and can maybe articulate my concern better:
Is there a situation where both of the following are true ? :
- Cable type = EUDO_CABLE_TYPE_OPTICAL or EUDO_CABLE_TYPE_RE_TIMER
- No TBT_CABLE_LINK_TRAINING or TBT_CABLE_ROUNDED_SUPPORT defined (both these are 0).
If both the above are true, then in Patch 7/8, wouldn't we never hit the else condition (labeled "Active USB cable") and therefore not set the mode_data correctly?
Quoted 8 lines
(Pre-fetching some alternatives in case the answer is no)
You might want to check with the Cros EC team if you can repurpose a bit of the "reserved" field for specifying whether the cable is TBT or not.
Either that or see if there is a way to determine from the
pd_ctrl->cable_speedwhether the cable is actually TBT or not.
It seems link cable_gen and USB_PD_CTRL_ACTIVE_LINK_UNIDIR are reasonable proxies for whether the cable has TBT support, so perhaps we should only set tbt_cable_vdo = TBT_MODE if either of those are non-zero?
WDYT?
Best regards,
-Prashant
RE: [PATCH v2 6/8] platform/chrome: cros_ec_typec: Use Thunderbolt 3 cable discover mode VDO in USB4 mode
Hi Prashant,
Thank you for the review and feedback.
Quoted 50 lines
Quoted 22 lines · Prashant Malani
Hi Utkarsh,
Quoted 18 lines · Utkarsh Patel
Configure Thunderbolt3/USB4 cable generation value by filing Thunderbolt 3 cable discover mode VDO to support rounded and non-rounded Thunderbolt3/
USB4 cables.
While we are here use Thunderbolt 3 cable discover mode VDO to fill active cable plug link training value.Suggested-by Heikki Krogerus <[email protected]>Signed-off-by Utkarsh Patel <[email protected]>--
Changes in v2:
- No change.
----- drivers/platform/chrome/cros_ec_typec.c | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-)Quoted 6 lines
drivers/platform/chrome/cros_ec_typec.c static int cros_typec_enable_usb4(struct
Quoted 6 lines
drivers/platform/chrome/cros_ec_typec.c +0
-0@@ -514,8 +514,18 @@ static int cros_typec_enable_usb4(struct
cros_typec_data*typec,Quoted 14 lines
drivers/platform/chrome/cros_ec_typec.c static int cros_typec_enable_usb4(struct cros_typec_data *typec, · line 523
Quoted 13 lines
drivers/platform/chrome/cros_ec_typec.c +7
-2else if (pd_ctrl->control_flags &USB_PD_CTRL_ACTIVE_CABLE ) data.eudo |=EUDO_CABLE_TYPE_RE_TIMER <<EUDO_CABLE_TYPE_SHIFT ; - data.active_link_training = !!(pd_ctrl->control_flags & -USB_PD_CTRL_ACTIVE_LINK_UNIDIR ); +/* +* This driver does not have access to the identity information or +* capabilities of the cable, so we don't know is it a real USB4 or +* TBT3 cable. Therefore pretending that it's always TBT3 cable by +* filling the TBT3 Cable VDO. +*/ + data.tbt_cable_vdo =TBT_MODE ;Quoted 4 lines
Is it safe to be making this assumption unconditionally? It might work for Intel Mux agent but is it guaranteed to be safe for any other future mux implementation? In other words, what if a "true" USB4 cable is connected which doesn't have the Thunderbolt SVID alt mode?
Quoted 7 lines
I dug into this a bit more and can maybe articulate my concern better:
Is there a situation where both of the following are true ? :
- Cable type =EUDO_CABLE_TYPE_OPTICALorEUDO_CABLE_TYPE_RE_TIMER
- NoTBT_CABLE_LINK_TRAININGorTBT_CABLE_ROUNDED_SUPPORTdefined (both
these are 0).
No, not in the case of USB4.
Quoted 11 lines
If both the above are true, then in Patch 7/8, wouldn't we never hit the else condition (labeled "Active USB cable") and therefore not set the
mode_datacorrectly?Quoted 6 lines
(Pre-fetching some alternatives in case the answer is no)
You might want to check with the Cros EC team if you can repurpose a bit of the "reserved" field for specifying whether the cable is TBT or not.
Quoted 8 lines
Quoted 2 lines
Either that or see if there is a way to determine from the
pd_ctrl->cable_speedwhether the cable is actually TBT or not.It seems link
cable_genandUSB_PD_CTRL_ACTIVE_LINK_UNIDIRare reasonable proxies for whether the cable has TBT support, so perhaps we should only settbt_cable_vdo=TBT_MODEif either of those are non-zero?WDYT?
Since we do not have these information available with USB4 cables, we can use them to check for TBT support and then set tbt_cable_vdo.
Quoted 4 lines
Best regards,
-Prashant
Sincerely,
Utkarsh Patel.
PATCH v2 7/8 usb: typec: intel_pmc_mux: Configure active cable properties for USB4
In reply to Utkarsh PatelValue received as a part of Thunderbolt 3 cable discover mode VDO needs to be configured in the USB4 mode for the Thunderbolt rounded support and active cable plug link training.
--
Changes in v2:
- No change.
--
--- drivers/usb/typec/mux/intel_pmc_mux.c | 18 +++++++++++++++--- 1 file changed, 15 insertions(+), 3 deletions(-)
drivers/usb/typec/mux/intel_pmc_mux.c +15 -3
@@ -295,6 +295,7 @@ pmc_usb_mux_usb4(struct pmc_usb_port *port, struct typec_mux_state *state) {struct enter_usb_data *data = state->data;struct altmode_req req = { }; +u8 cable_rounded;u8 cable_speed; if (IOM_PORT_ACTIVITY_IS(port->iom_status, TBT) ||
@@ -308,9 +309,6 @@ pmc_usb_mux_usb4(struct pmc_usb_port *port, struct typec_mux_state *state)/* USB4 Mode */ req.mode_data =PMC_USB_ALTMODE_FORCE_LSR ; -if (data->active_link_training) - req.mode_data |=PMC_USB_ALTMODE_ACTIVE_LINK ; - req.mode_data |= (port->orientation -1 ) <<PMC_USB_ALTMODE_ORI_SHIFT ; req.mode_data |= (port->role -1 ) <<PMC_USB_ALTMODE_UFP_SHIFT ;
@@ -322,6 +320,20 @@ pmc_usb_mux_usb4(struct pmc_usb_port *port, struct typec_mux_state *state) fallthrough;default : req.mode_data |=PMC_USB_ALTMODE_ACTIVE_CABLE ; + +if (data->tbt_cable_vdo) { +/* Active Thunderbolt 3 cable */ +if (data->tbt_cable_vdo &TBT_CABLE_LINK_TRAINING ) + req.mode_data |=PMC_USB_ALTMODE_ACTIVE_LINK ; + + cable_rounded = +TBT_CABLE_ROUNDED_SUPPORT (data->tbt_cable_vdo); + req.mode_data |=PMC_USB_ALTMODE_TBT_GEN (cable_rounded); + }else { +/* Active USB4 cable */ + req.mode_data |=PMC_USB_ALTMODE_ACTIVE_LINK | +PMC_USB_ALTMODE_TBT_GEN (1 ); + }break ; }
Signature · 1 line
2.17.1
Heikki Krogerus
maintainerRe: [PATCH v2 7/8] usb: typec: intel_pmc_mux: Configure active cable properties for USB4
Quoted 39 lines · Utkarsh Patel
Value received as a part of Thunderbolt 3 cable discover mode VDO needs to be configured in the USB4 mode for the Thunderbolt rounded support and active cable plug link training.
Suggested-by Heikki Krogerus <[email protected]>Signed-off-by Utkarsh Patel <[email protected]>--
Changes in v2:
- No change.
----- drivers/usb/typec/mux/intel_pmc_mux.c | 18 +++++++++++++++--- 1 file changed, 15 insertions(+), 3 deletions(-)drivers/usb/typec/mux/intel_pmc_mux.c +1
-3@@ -295,6 +295,7 @@ pmc_usb_mux_usb4(struct pmc_usb_port *port, struct typec_mux_state *state) {struct enter_usb_data *data = state->data;struct altmode_req req = { }; +u8 cable_rounded;u8 cable_speed; if (IOM_PORT_ACTIVITY_IS(port->iom_status, TBT) ||@@ -308,9 +309,6 @@ pmc_usb_mux_usb4(struct pmc_usb_port *port, struct typec_mux_state *state)/* USB4 Mode */ req.mode_data =PMC_USB_ALTMODE_FORCE_LSR ; -if (data->active_link_training) - req.mode_data |=PMC_USB_ALTMODE_ACTIVE_LINK ; - req.mode_data |= (port->orientation -1 ) <<PMC_USB_ALTMODE_ORI_SHIFT ; req.mode_data |= (port->role -1 ) <<PMC_USB_ALTMODE_UFP_SHIFT ;@@ -322,6 +320,20 @@ pmc_usb_mux_usb4(struct pmc_usb_port *port, struct typec_mux_state *state) fallthrough;
drivers/usb/typec/mux/intel_pmc_mux.c pmc_usb_mux_usb4(struct pmc_usb_port *port, struct typec_mux_state *state) · line 330
Quoted 10 lines
drivers/usb/typec/mux/intel_pmc_mux.c +8
-0default : req.mode_data |=PMC_USB_ALTMODE_ACTIVE_CABLE ; + +if (data->tbt_cable_vdo) { +/* Active Thunderbolt 3 cable */ +if (data->tbt_cable_vdo &TBT_CABLE_LINK_TRAINING ) + req.mode_data |=PMC_USB_ALTMODE_ACTIVE_LINK ; + + cable_rounded = +TBT_CABLE_ROUNDED_SUPPORT (data->tbt_cable_vdo);
No need for the newline:
cable_rounded = TBT_CABLE_ROUNDED_SUPPORT(data->tbt_cable_vdo);
drivers/usb/typec/mux/intel_pmc_mux.c pmc_usb_mux_usb4(struct pmc_usb_port *port, struct typec_mux_state *state) · line 338
Quoted 8 lines
drivers/usb/typec/mux/intel_pmc_mux.c +6
-0+ req.mode_data |=PMC_USB_ALTMODE_TBT_GEN (cable_rounded); + }else { +/* Active USB4 cable */ + req.mode_data |=PMC_USB_ALTMODE_ACTIVE_LINK | +PMC_USB_ALTMODE_TBT_GEN (1 ); + }break ; }
thanks,
Signature · 1 line
heikki
RE: [PATCH v2 7/8] usb: typec: intel_pmc_mux: Configure active cable properties for USB4
Hi Heikki,
Quoted 63 lines
-----Original Message-----
From: Heikki Krogerus <[email protected]>
Sent: Tuesday, November 17, 2020 4:22 AM
To: Patel, Utkarsh H <[email protected]>
Cc: [email protected]; [email protected]; [email protected]; [email protected]; Mani, Rajmohan <[email protected]>; Shaikh, Azhar <[email protected]>
Subject: Re: [PATCH v2 7/8] usb: typec:intel_pmc_mux: Configure active cable properties for USB4drivers/usb/typec/mux/intel_pmc_mux.c pmc_usb_mux_usb4(struct pmc_usb_port *port,
Quoted 21 lines · Utkarsh Patel
Value received as a part of Thunderbolt 3 cable discover mode VDO needs to be configured in the USB4 mode for the Thunderbolt rounded support and active cable plug link training.
Suggested-by Heikki Krogerus <[email protected]>Signed-off-by Utkarsh Patel <[email protected]>--
Changes in v2:
- No change.
----- drivers/usb/typec/mux/intel_pmc_mux.c | 18 +++++++++++++++--- 1 file changed, 15 insertions(+), 3 deletions(-)drivers/usb/typec/mux/intel_pmc_mux.c +0
-0@@ -295,6 +295,7 @@ pmc_usb_mux_usb4(struct pmc_usb_port *port,struct
drivers/usb/typec/mux/intel_pmc_mux.c pmc_usb_mux_usb4(struct pmc_usb_port *port, struct typec_mux_state *state)
Quoted 7 lines
drivers/usb/typec/mux/intel_pmc_mux.c +1
-0typec_mux_state *state) {struct enter_usb_data *data = state->data;struct altmode_req req = { }; +u8 cable_rounded;u8 cable_speed; if (IOM_PORT_ACTIVITY_IS(port->iom_status, TBT) || @@ -308,9+309,6
Quoted 1 line
@@ pmc_usb_mux_usb4(struct
pmc_usb_port*port, struct
typec_mux_state*state)drivers/usb/typec/mux/intel_pmc_mux.c pmc_usb_mux_usb4(struct pmc_usb_port *port, struct typec_mux_state *state)
Quoted 7 lines
drivers/usb/typec/mux/intel_pmc_mux.c +0
-3/* USB4 Mode */ req.mode_data =PMC_USB_ALTMODE_FORCE_LSR ; -if (data->active_link_training) - req.mode_data |=PMC_USB_ALTMODE_ACTIVE_LINK ; - req.mode_data |= (port->orientation - 1) <<
PMC_USB_ALTMODE_ORI_SHIFT;drivers/usb/typec/mux/intel_pmc_mux.c pmc_usb_mux_usb4(struct pmc_usb_port *port,
Quoted 3 lines
drivers/usb/typec/mux/intel_pmc_mux.c +0
-0req.mode_data |= (port->role -1 ) <<PMC_USB_ALTMODE_UFP_SHIFT ;@@ -322,6 +320,20 @@ pmc_usb_mux_usb4(struct pmc_usb_port *port,struct
typec_mux_state*state)drivers/usb/typec/mux/intel_pmc_mux.c pmc_usb_mux_usb4(struct pmc_usb_port *port, struct typec_mux_state *state)
Quoted 7 lines
drivers/usb/typec/mux/intel_pmc_mux.c +4
-0fallthrough ;default : req.mode_data |=PMC_USB_ALTMODE_ACTIVE_CABLE ; + +if (data->tbt_cable_vdo) { +/* Active Thunderbolt 3 cable */ + if (data->tbt_cable_vdo &
TBT_CABLE_LINK_TRAINING)
Quoted 8 lines
drivers/usb/typec/mux/intel_pmc_mux.c pmc_usb_mux_usb4(struct pmc_usb_port *port, · line 327
Quoted 1 line
drivers/usb/typec/mux/intel_pmc_mux.c +1
-0+ req.mode_data |=
PMC_USB_ALTMODE_ACTIVE_LINK;drivers/usb/typec/mux/intel_pmc_mux.c pmc_usb_mux_usb4(struct pmc_usb_port *port, struct typec_mux_state *state)
Quoted 4 lines
drivers/usb/typec/mux/intel_pmc_mux.c +3
-0+ + cable_rounded = +TBT_CABLE_ROUNDED_SUPPORT (data- tbt_cable_vdo);No need for the newline:
Ack
Quoted 17 lines
cable_rounded=TBT_CABLE_ROUNDED_SUPPORT(data->tbt_cable_vdo);drivers/usb/typec/mux/intel_pmc_mux.c pmc_usb_mux_usb4(struct pmc_usb_port *port, · line 332
Quoted 1 line
drivers/usb/typec/mux/intel_pmc_mux.c +1
-0+ req.mode_data |=
PMC_USB_ALTMODE_TBT_GEN(cable_rounded);drivers/usb/typec/mux/intel_pmc_mux.c pmc_usb_mux_usb4(struct pmc_usb_port *port, struct typec_mux_state *state)
Quoted 3 lines
drivers/usb/typec/mux/intel_pmc_mux.c +3
-0+ }else { +/* Active USB4 cable */ + req.mode_data |=PMC_USB_ALTMODE_ACTIVE_LINK |
drivers/usb/typec/mux/intel_pmc_mux.c pmc_usb_mux_usb4(struct pmc_usb_port *port, struct typec_mux_state *state) · line 338
Quoted 4 lines
drivers/usb/typec/mux/intel_pmc_mux.c +2
-0+PMC_USB_ALTMODE_TBT_GEN (1 ); + }break ; }thanks,
Quoted 2 lines
--
Heikki
Sincerely,
Utkarsh Patel.
PATCH v2 8/8 usb: typec: Remove active_link_training variable from Enter_USB message
In reply to Utkarsh PatelThunderbolt 3 cable discover mode VDO support has been added as part of Enter_USB message to fill details of active cable plug link training. Hence, removing unused variable active_link_training from Enter_USB message data structure.
--
Changes in v2:
- No change.
--
--- include/linux/usb/typec.h | 6 ------ 1 file changed, 6 deletions(-)
include/linux/usb/typec.h +0 -6
@@ -76,16 +76,10 @@ enum typec_orientation {* struct enter_usb_data - Enter_USB Message details * @eudo: Enter_USB Data Object * @tbt_cable_vdo: TBT3 Cable Discover Mode Response -* @active_link_training: Active Cable Plug Link Training -* -* @active_link_training is a flag that should be set with uni-directional SBRX -* communication, and left 0 with passive cables and with bi-directional SBRX -* communication. */ struct enter_usb_data {u32 eudo;u32 tbt_cable_vdo; -unsigned char active_link_training:1 ; };/*
Signature · 1 line
2.17.1
Re: [PATCH v2 8/8] usb: typec: Remove active_link_training variable from Enter_USB message
Quoted 6 lines · Utkarsh Patel
Thunderbolt 3 cable discover mode VDO support has been added as part of
Enter_USBmessage to fill details of active cable plug link training. Hence, removing unused variableactive_link_trainingfromEnter_USBmessage data structure.Signed-off-by Utkarsh Patel <[email protected]>
Quoted 31 lines
--
Changes in v2:
- No change.
----- include/linux/usb/typec.h | 6 ------ 1 file changed, 6 deletions(-)include/linux/usb/typec.h +0
-6@@ -76,16 +76,10 @@ enum typec_orientation {* struct enter_usb_data - Enter_USB Message details * @eudo: Enter_USB Data Object * @tbt_cable_vdo: TBT3 Cable Discover Mode Response -* @active_link_training: Active Cable Plug Link Training -* -* @active_link_training is a flag that should be set with uni-directional SBRX -* communication, and left 0 with passive cables and with bi-directional SBRX -* communication. */ struct enter_usb_data {u32 eudo;u32 tbt_cable_vdo; -unsigned char active_link_training:1 ; };/* Signature · 1 line
2.17.1
thanks,
Signature · 1 line
heikki
Quoted 7 lines · Utkarsh Patel
This patch series adds the support for Thunderbolt3/USB4 rounded and non-rounded frequencies cables and fixes the active cable plug link training support.
Changes in v2:
- Removed the fixes tag as there is no functional implication from patches 1/8, 2/8 and 4/8.
I've queued up the first 4 patches of this series. Feel free to redo the rest and resend.
thanks,
greg k-h
Hi Greg,
Quoted 16 lines
-----Original Message-----
From: Greg KH <[email protected]>
Sent: Wednesday, November 18, 2020 3:55 AM
To: Patel, Utkarsh H <[email protected]>
Cc: [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; Mani, Rajmohan <[email protected]>; Shaikh, Azhar <[email protected]>
Subject: Re: [PATCH v2 0/8] Thunderbolt3/USB4 cable rounded and active cable plug link training supportQuoted 4 lines · Utkarsh Patel
This patch series adds the support for Thunderbolt3/USB4 rounded and non-rounded frequencies cables and fixes the active cable plug link training support.
Quoted 6 lines
Quoted 3 lines
Changes in v2:
- Removed the fixes tag as there is no functional implication from patches 1/8, 2/8 and 4/8.I've queued up the first 4 patches of this series. Feel free to redo the rest and resend.
Thank you. I will send v3 with the rest of the patches.
Quoted 4 lines
thanks,
greg k-h
Sincerely,
Utkarsh Patel.