[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20210316145512.2152374-2-ciorneiioana@gmail.com>
Date: Tue, 16 Mar 2021 16:55:08 +0200
From: Ioana Ciornei <ciorneiioana@...il.com>
To: davem@...emloft.net, kuba@...nel.org, netdev@...r.kernel.org
Cc: ruxandra.radulescu@....com, yangbo.lu@....com,
Ioana Ciornei <ioana.ciornei@....com>
Subject: [PATCH net-next 1/5] dpaa2-switch: remove unused ABI functions
From: Ioana Ciornei <ioana.ciornei@....com>
Cleanup the dpaa2-switch driver a bit by removing any unused MC firmware
ABI definitions.
Signed-off-by: Ioana Ciornei <ioana.ciornei@....com>
---
.../net/ethernet/freescale/dpaa2/dpsw-cmd.h | 7 --
drivers/net/ethernet/freescale/dpaa2/dpsw.c | 70 +------------------
drivers/net/ethernet/freescale/dpaa2/dpsw.h | 6 --
3 files changed, 1 insertion(+), 82 deletions(-)
diff --git a/drivers/net/ethernet/freescale/dpaa2/dpsw-cmd.h b/drivers/net/ethernet/freescale/dpaa2/dpsw-cmd.h
index eb620e832412..2371fd5c40e3 100644
--- a/drivers/net/ethernet/freescale/dpaa2/dpsw-cmd.h
+++ b/drivers/net/ethernet/freescale/dpaa2/dpsw-cmd.h
@@ -75,8 +75,6 @@
#define DPSW_CMDID_FDB_DUMP DPSW_CMD_ID(0x08A)
#define DPSW_CMDID_IF_GET_PORT_MAC_ADDR DPSW_CMD_ID(0x0A7)
-#define DPSW_CMDID_IF_GET_PRIMARY_MAC_ADDR DPSW_CMD_ID(0x0A8)
-#define DPSW_CMDID_IF_SET_PRIMARY_MAC_ADDR DPSW_CMD_ID(0x0A9)
#define DPSW_CMDID_CTRL_IF_GET_ATTR DPSW_CMD_ID(0x0A0)
#define DPSW_CMDID_CTRL_IF_SET_POOLS DPSW_CMD_ID(0x0A1)
@@ -443,11 +441,6 @@ struct dpsw_rsp_if_get_mac_addr {
u8 mac_addr[6];
};
-struct dpsw_cmd_if_set_mac_addr {
- __le16 if_id;
- u8 mac_addr[6];
-};
-
struct dpsw_cmd_set_egress_flood {
__le16 fdb_id;
u8 flood_type;
diff --git a/drivers/net/ethernet/freescale/dpaa2/dpsw.c b/drivers/net/ethernet/freescale/dpaa2/dpsw.c
index 5189f156100e..f94874381b69 100644
--- a/drivers/net/ethernet/freescale/dpaa2/dpsw.c
+++ b/drivers/net/ethernet/freescale/dpaa2/dpsw.c
@@ -397,7 +397,7 @@ int dpsw_if_set_link_cfg(struct fsl_mc_io *mc_io,
* @if_id: Interface id
* @state: Link state 1 - linkup, 0 - link down or disconnected
*
- * @Return '0' on Success; Error code otherwise.
+ * Return: '0' on Success; Error code otherwise.
*/
int dpsw_if_get_link_state(struct fsl_mc_io *mc_io,
u32 cmd_flags,
@@ -1356,74 +1356,6 @@ int dpsw_if_get_port_mac_addr(struct fsl_mc_io *mc_io, u32 cmd_flags, u16 token,
return 0;
}
-/**
- * dpsw_if_get_primary_mac_addr()
- * @mc_io: Pointer to MC portal's I/O object
- * @cmd_flags: Command flags; one or more of 'MC_CMD_FLAG_'
- * @token: Token of DPSW object
- * @if_id: Interface Identifier
- * @mac_addr: MAC address of the physical port, if any, otherwise 0
- *
- * Return: Completion status. '0' on Success; Error code otherwise.
- */
-int dpsw_if_get_primary_mac_addr(struct fsl_mc_io *mc_io, u32 cmd_flags,
- u16 token, u16 if_id, u8 mac_addr[6])
-{
- struct dpsw_rsp_if_get_mac_addr *rsp_params;
- struct fsl_mc_command cmd = { 0 };
- struct dpsw_cmd_if *cmd_params;
- int err, i;
-
- /* prepare command */
- cmd.header = mc_encode_cmd_header(DPSW_CMDID_IF_SET_PRIMARY_MAC_ADDR,
- cmd_flags,
- token);
- cmd_params = (struct dpsw_cmd_if *)cmd.params;
- cmd_params->if_id = cpu_to_le16(if_id);
-
- /* send command to mc*/
- err = mc_send_command(mc_io, &cmd);
- if (err)
- return err;
-
- /* retrieve response parameters */
- rsp_params = (struct dpsw_rsp_if_get_mac_addr *)cmd.params;
- for (i = 0; i < 6; i++)
- mac_addr[5 - i] = rsp_params->mac_addr[i];
-
- return 0;
-}
-
-/**
- * dpsw_if_set_primary_mac_addr()
- * @mc_io: Pointer to MC portal's I/O object
- * @cmd_flags: Command flags; one or more of 'MC_CMD_FLAG_'
- * @token: Token of DPSW object
- * @if_id: Interface Identifier
- * @mac_addr: MAC address of the physical port, if any, otherwise 0
- *
- * Return: Completion status. '0' on Success; Error code otherwise.
- */
-int dpsw_if_set_primary_mac_addr(struct fsl_mc_io *mc_io, u32 cmd_flags,
- u16 token, u16 if_id, u8 mac_addr[6])
-{
- struct dpsw_cmd_if_set_mac_addr *cmd_params;
- struct fsl_mc_command cmd = { 0 };
- int i;
-
- /* prepare command */
- cmd.header = mc_encode_cmd_header(DPSW_CMDID_IF_SET_PRIMARY_MAC_ADDR,
- cmd_flags,
- token);
- cmd_params = (struct dpsw_cmd_if_set_mac_addr *)cmd.params;
- cmd_params->if_id = cpu_to_le16(if_id);
- for (i = 0; i < 6; i++)
- cmd_params->mac_addr[i] = mac_addr[5 - i];
-
- /* send command to mc*/
- return mc_send_command(mc_io, &cmd);
-}
-
/**
* dpsw_ctrl_if_enable() - Enable control interface
* @mc_io: Pointer to MC portal's I/O object
diff --git a/drivers/net/ethernet/freescale/dpaa2/dpsw.h b/drivers/net/ethernet/freescale/dpaa2/dpsw.h
index 9e04350f3277..e5e9c35604a7 100644
--- a/drivers/net/ethernet/freescale/dpaa2/dpsw.h
+++ b/drivers/net/ethernet/freescale/dpaa2/dpsw.h
@@ -707,12 +707,6 @@ int dpsw_get_api_version(struct fsl_mc_io *mc_io,
int dpsw_if_get_port_mac_addr(struct fsl_mc_io *mc_io, u32 cmd_flags, u16 token,
u16 if_id, u8 mac_addr[6]);
-int dpsw_if_get_primary_mac_addr(struct fsl_mc_io *mc_io, u32 cmd_flags,
- u16 token, u16 if_id, u8 mac_addr[6]);
-
-int dpsw_if_set_primary_mac_addr(struct fsl_mc_io *mc_io, u32 cmd_flags,
- u16 token, u16 if_id, u8 mac_addr[6]);
-
/**
* struct dpsw_fdb_cfg - FDB Configuration
* @num_fdb_entries: Number of FDB entries
--
2.30.0
Powered by blists - more mailing lists