Skip to content

Commit

Permalink
octeontx2-pf: Don't mask out supported link modes
Browse files Browse the repository at this point in the history
Supported link modes are updated by firmware in shared
structure per interface. Kernel uses this value to display
supported link modes via ethtool.

Currently there is extra validation that firmware updated
modes are validated against internal list of supported modes.
As intenal list of supported modes are not updated frequently
new modes supported by firmware are not updated to ethtool.

Hence remove extra validation and report all firmware updated
modes.

Signed-off-by: Hariprasad Kelam <hkelam@marvell.com>
Signed-off-by: Sunil Goutham <sgoutham@marvell.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
  • Loading branch information
Hariprasad Kelam authored and David S. Miller committed Aug 22, 2021
1 parent c0fa2cf commit 5060240
Showing 1 changed file with 0 additions and 5 deletions.
5 changes: 0 additions & 5 deletions drivers/net/ethernet/marvell/octeontx2/nic/otx2_ethtool.c
Original file line number Diff line number Diff line change
Expand Up @@ -33,9 +33,6 @@ struct otx2_stat {
.index = offsetof(struct otx2_dev_stats, stat) / sizeof(u64), \
}

/* Physical link config */
#define OTX2_ETHTOOL_SUPPORTED_MODES 0x638CCBF //110001110001100110010111111

enum link_mode {
OTX2_MODE_SUPPORTED,
OTX2_MODE_ADVERTISED
Expand Down Expand Up @@ -1086,8 +1083,6 @@ static void otx2_get_link_mode_info(u64 link_mode_bmap,
};
u8 bit;

link_mode_bmap = link_mode_bmap & OTX2_ETHTOOL_SUPPORTED_MODES;

for_each_set_bit(bit, (unsigned long *)&link_mode_bmap, 27) {
/* SGMII mode is set */
if (bit == 0)
Expand Down

0 comments on commit 5060240

Please sign in to comment.