Skip to contentSkip to conversation

amd-xgbe: fix active cable determination

PATCH In review Thomas Kupper 2 participants 4 messages Nov 10, 2022 – Nov 11, 2022 2 messages not in the archive

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 amd-xgbe: fix active cable determination

When determine the type of SFP, active cables were not handled.

Add the check for active cables as an extension to the passive cable check.

---
 drivers/net/ethernet/amd/xgbe/xgbe-phy-v2.c | 5 +++--

 1 file changed, 3 insertions(+), 2 deletions(-)
drivers/net/ethernet/amd/xgbe/xgbe-phy-v2.c +0 -0
index 4064c3e3dd49..1ba550d5c52d 100644
@@ -1158,8 +1158,9 @@ static void xgbe_phy_sfp_parse_eeprom(struct xgbe_prv_data *pdata)

     }

     /* Determine the type of SFP */
-    if (phy_data->sfp_cable == XGBE_SFP_CABLE_PASSIVE &&
-        xgbe_phy_sfp_bit_rate(sfp_eeprom, XGBE_SFP_SPEED_10000)) +    if ((phy_data->sfp_cable == XGBE_SFP_CABLE_PASSIVE ||
+         phy_data->sfp_cable == XGBE_SFP_CABLE_ACTIVE) &&
+         xgbe_phy_sfp_bit_rate(sfp_eeprom, XGBE_SFP_SPEED_10000)) phy_data->sfp_base = XGBE_SFP_BASE_10000_CR;
     else if (sfp_base[XGBE_SFP_BASE_10GBE_CC] & XGBE_SFP_BASE_10GBE_CC_SR) phy_data->sfp_base = XGBE_SFP_BASE_10000_SR;

--
2.34.1

maintainer
#1 lore raw
Quoted 4 lines · On Thu, 10 Nov 2022 22:03:32 +0100 Thomas Kupper wrote:

When determine the type of SFP, active cables were not handled.

Add the check for active cables as an extension to the passive cable check.

Is this patch on top of net or net-next or... ? Reportedly it does not apply to net. Could you rebase, add a Fixes tag and repost CCing Tom and Raju?

A message that is not in the archive (sent off-list or not yet received): [email protected]

A message that is not in the archive (sent off-list or not yet received): [email protected]

#4 lore raw

Am 10.11.22 um 23:35 schrieb Jakub Kicinski:

Quoted 13 lines · On Thu, 10 Nov 2022 23:20:02 +0100 Thomas Kupper wrote:
Quoted 12 lines

Am 10.11.22 um 22:57 schrieb Jakub Kicinski:

Quoted 8 lines · On Thu, 10 Nov 2022 22:03:32 +0100 Thomas Kupper wrote:
Quoted 4 lines

When determine the type of SFP, active cables were not handled.

Add the check for active cables as an extension to the passive cable check.

Is this patch on top of net or net-next or... ? Reportedly it does not apply to net. Could you rebase, add a Fixes tag and repost CCing Tom and Raju?

I apologise, after reading through all the guidelines I forgot that it was on top of the latest linux-kernel instead of net.

Quoted 6 lines
Quoted 2 lines

Regarding the 'Fixes' tag: active cables don't works for at least since kernel v5.15, to what commit would you suggest do I refer to?

Which exact sub-version of 5.15 ? Looking at the history of the file commit 09c5f6bf11ac988743 seems like a candidate but you'd need to double check based on what you know, or just revert and see if that fixes your problem (to confirm that's the culprit).

Checking with git blame shows that in commit abf0a1c2b26ad from 2016-11-10 the whole if, else if ... clause plus a lot more was introduced. And since then the handling of the active cables was missing. The check (for the passive cable) got moved up in the commit you mentioned.

I would then use 'Fixes: abf0a1c2b26ad ...', right? And sent pretty much the same mail as the first time, with Tom and Raju CCed? And Patchwork will realise that?

Thanks for your help and patience
Thomas

maintainer
#5 lore raw
Quoted 10 lines · On Fri, 11 Nov 2022 00:00:38 +0100 Thomas Kupper wrote:
Quoted 9 lines
Quoted 5 lines

I apologise, after reading through all the guidelines I forgot that it was on top of the latest linux-kernel instead of net.

Regarding the 'Fixes' tag: active cables don't works for at least since kernel v5.15, to what commit would you suggest do I refer to?

Which exact sub-version of 5.15 ? Looking at the history of the file commit 09c5f6bf11ac988743 seems like a candidate but you'd need to double check based on what you know, or just revert and see if that fixes your problem (to confirm that's the culprit).

Quoted 7 lines

Checking with git blame shows that in commit abf0a1c2b26ad from 2016-11-10 the whole if, else if ... clause plus a lot more was introduced. And since then the handling of the active cables was missing. The check (for the passive cable) got moved up in the commit you mentioned.

I would then use 'Fixes: abf0a1c2b26ad ...', right?

Yup, sounds like it! Make sure you use the exact format from here
https://www.kernel.org/doc/html/v4.12/process/submitting-patches.html#describe-your-changes
don't wrap the line, and don't separate the tags with empty lines. The Fixes tags are used by automated backport machinery so we need exact format to be followed.

Quoted 2 lines

And sent pretty much the same mail as the first time, with Tom and Raju CCed? And Patchwork will realise that?

You can throw in v2 into the subject tag to avoid any confusion:
[PATCH new v2] and that's it, yes :)