Commit 6a4b02b8 authored by Petr Machata's avatar Petr Machata Committed by Jakub Kicinski
Browse files

mlxsw: Revert "Introduce initial XM router support"



This reverts commit 75c2a8fe ("Merge branch
'mlxsw-introduce-initial-xm-router-support'").

Signed-off-by: default avatarPetr Machata <petrm@nvidia.com>
Signed-off-by: default avatarIdo Schimmel <idosch@nvidia.com>
Signed-off-by: default avatarJakub Kicinski <kuba@kernel.org>
parent 6ac6dc74
Loading
Loading
Loading
Loading
+0 −1
Original line number Diff line number Diff line
@@ -12,7 +12,6 @@ mlxsw_i2c-objs := i2c.o
obj-$(CONFIG_MLXSW_SPECTRUM)	+= mlxsw_spectrum.o
mlxsw_spectrum-objs		:= spectrum.o spectrum_buffers.o \
				   spectrum_switchdev.o spectrum_router.o \
				   spectrum_router_xm.o \
				   spectrum1_kvdl.o spectrum2_kvdl.o \
				   spectrum_kvdl.o \
				   spectrum_acl_tcam.o spectrum_acl_ctcam.o \
+0 −30
Original line number Diff line number Diff line
@@ -343,23 +343,6 @@ static inline int mlxsw_cmd_boardinfo(struct mlxsw_core *mlxsw_core,
				  0, 0, false, out_mbox, MLXSW_CMD_MBOX_SIZE);
}

/* cmd_mbox_xm_num_local_ports
 * Number of local_ports connected to the xm.
 * Each local port is a 4x
 * Spectrum-2/3: 25G
 * Spectrum-4: 50G
 */
MLXSW_ITEM32(cmd_mbox, boardinfo, xm_num_local_ports, 0x00, 4, 3);

/* cmd_mbox_xm_exists
 * An XM (eXtanded Mezanine, e.g. used for the XLT) is connected on the board.
 */
MLXSW_ITEM32(cmd_mbox, boardinfo, xm_exists, 0x00, 0, 1);

/* cmd_mbox_xm_local_port_entry
 */
MLXSW_ITEM_BIT_ARRAY(cmd_mbox, boardinfo, xm_local_port_entry, 0x04, 4, 8);

/* cmd_mbox_boardinfo_intapin
 * When PCIe interrupt messages are being used, this value is used for clearing
 * an interrupt. When using MSI-X, this register is not used.
@@ -674,12 +657,6 @@ MLXSW_ITEM32(cmd_mbox, config_profile, set_kvd_hash_double_size, 0x0C, 26, 1);
 */
MLXSW_ITEM32(cmd_mbox, config_profile, set_cqe_version, 0x08, 0, 1);

/* cmd_mbox_config_set_kvh_xlt_cache_mode
 * Capability bit. Setting a bit to 1 configures the profile
 * according to the mailbox contents.
 */
MLXSW_ITEM32(cmd_mbox, config_profile, set_kvh_xlt_cache_mode, 0x08, 3, 1);

/* cmd_mbox_config_profile_max_vepa_channels
 * Maximum number of VEPA channels per port (0 through 16)
 * 0 - multi-channel VEPA is disabled
@@ -806,13 +783,6 @@ MLXSW_ITEM32(cmd_mbox, config_profile, adaptive_routing_group_cap, 0x4C, 0, 16);
 */
MLXSW_ITEM32(cmd_mbox, config_profile, arn, 0x50, 31, 1);

/* cmd_mbox_config_profile_kvh_xlt_cache_mode
 * KVH XLT cache mode:
 * 0 - XLT can use all KVH as best-effort
 * 1 - XLT cache uses 1/2 KVH
 */
MLXSW_ITEM32(cmd_mbox, config_profile, kvh_xlt_cache_mode, 0x50, 8, 4);

/* cmd_mbox_config_kvd_linear_size
 * KVD Linear Size
 * Valid for Spectrum only
+0 −12
Original line number Diff line number Diff line
@@ -3151,18 +3151,6 @@ mlxsw_core_port_linecard_get(struct mlxsw_core *mlxsw_core,
	return mlxsw_core_port->linecard;
}

bool mlxsw_core_port_is_xm(const struct mlxsw_core *mlxsw_core, u16 local_port)
{
	const struct mlxsw_bus_info *bus_info = mlxsw_core->bus_info;
	int i;

	for (i = 0; i < bus_info->xm_local_ports_count; i++)
		if (bus_info->xm_local_ports[i] == local_port)
			return true;
	return false;
}
EXPORT_SYMBOL(mlxsw_core_port_is_xm);

void mlxsw_core_ports_remove_selected(struct mlxsw_core *mlxsw_core,
				      bool (*selector)(void *priv, u16 local_port),
				      void *priv)
+2 −10
Original line number Diff line number Diff line
@@ -261,7 +261,6 @@ mlxsw_core_port_devlink_port_get(struct mlxsw_core *mlxsw_core,
struct mlxsw_linecard *
mlxsw_core_port_linecard_get(struct mlxsw_core *mlxsw_core,
			     u16 local_port);
bool mlxsw_core_port_is_xm(const struct mlxsw_core *mlxsw_core, u16 local_port);
void mlxsw_core_ports_remove_selected(struct mlxsw_core *mlxsw_core,
				      bool (*selector)(void *priv,
						       u16 local_port),
@@ -296,8 +295,7 @@ struct mlxsw_config_profile {
		used_max_pkey:1,
		used_ar_sec:1,
		used_adaptive_routing_group_cap:1,
		used_kvd_sizes:1,
		used_kvh_xlt_cache_mode:1;
		used_kvd_sizes:1;
	u8	max_vepa_channels;
	u16	max_mid;
	u16	max_pgt;
@@ -319,7 +317,6 @@ struct mlxsw_config_profile {
	u32	kvd_linear_size;
	u8	kvd_hash_single_parts;
	u8	kvd_hash_double_parts;
	u8	kvh_xlt_cache_mode;
	struct mlxsw_swid_config swid_config[MLXSW_CONFIG_PROFILE_SWID_COUNT];
};

@@ -478,8 +475,6 @@ struct mlxsw_fw_rev {
	u16 can_reset_minor;
};

#define MLXSW_BUS_INFO_XM_LOCAL_PORTS_MAX 4

struct mlxsw_bus_info {
	const char *device_kind;
	const char *device_name;
@@ -488,10 +483,7 @@ struct mlxsw_bus_info {
	u8 vsd[MLXSW_CMD_BOARDINFO_VSD_LEN];
	u8 psid[MLXSW_CMD_BOARDINFO_PSID_LEN];
	u8 low_frequency:1,
	   read_frc_capable:1,
	   xm_exists:1;
	u8 xm_local_ports_count;
	u8 xm_local_ports[MLXSW_BUS_INFO_XM_LOCAL_PORTS_MAX];
	   read_frc_capable:1;
};

struct mlxsw_hwmon;
+1 −2
Original line number Diff line number Diff line
@@ -359,8 +359,7 @@ static int mlxsw_m_ports_create(struct mlxsw_m *mlxsw_m)
	/* Create port objects for each valid entry */
	devl_lock(devlink);
	for (i = 0; i < mlxsw_m->max_ports; i++) {
		if (mlxsw_m->module_to_port[i] > 0 &&
		    !mlxsw_core_port_is_xm(mlxsw_m->core, i)) {
		if (mlxsw_m->module_to_port[i] > 0) {
			err = mlxsw_m_port_create(mlxsw_m,
						  mlxsw_m->module_to_port[i],
						  i);
Loading