1 From c28b8375f6d02ef3b5e8c51234cc3f6d47d9fb7f Mon Sep 17 00:00:00 2001
2 From: Lorenzo Bianconi <lorenzo@kernel.org>
3 Date: Fri, 28 Feb 2025 11:54:17 +0100
4 Subject: [PATCH 09/15] net: airoha: Rename airoha_set_gdm_port_fwd_cfg() in
5 airoha_set_vip_for_gdm_port()
7 Rename airoha_set_gdm_port() in airoha_set_vip_for_gdm_port().
8 Get rid of airoha_set_gdm_ports routine.
10 Signed-off-by: Lorenzo Bianconi <lorenzo@kernel.org>
11 Signed-off-by: Paolo Abeni <pabeni@redhat.com>
13 drivers/net/ethernet/airoha/airoha_eth.c | 49 ++++++------------------
14 drivers/net/ethernet/airoha/airoha_eth.h | 8 ----
15 2 files changed, 11 insertions(+), 46 deletions(-)
17 --- a/drivers/net/ethernet/airoha/airoha_eth.c
18 +++ b/drivers/net/ethernet/airoha/airoha_eth.c
19 @@ -105,25 +105,23 @@ static void airoha_set_gdm_port_fwd_cfg(
20 FIELD_PREP(GDM_UCFQ_MASK, val));
23 -static int airoha_set_gdm_port(struct airoha_eth *eth, int port, bool enable)
24 +static int airoha_set_vip_for_gdm_port(struct airoha_gdm_port *port,
27 + struct airoha_eth *eth = port->qdma->eth;
31 - case XSI_PCIE0_PORT:
34 + /* FIXME: handle XSI_PCIE1_PORT */
35 vip_port = XSI_PCIE0_VIP_PORT_MASK;
37 - case XSI_PCIE1_PORT:
38 - vip_port = XSI_PCIE1_VIP_PORT_MASK;
41 - vip_port = XSI_USB_VIP_PORT_MASK;
45 + /* FIXME: handle XSI_USB_PORT */
46 vip_port = XSI_ETH_VIP_PORT_MASK;
54 @@ -137,31 +135,6 @@ static int airoha_set_gdm_port(struct ai
58 -static int airoha_set_gdm_ports(struct airoha_eth *eth, bool enable)
60 - const int port_list[] = {
68 - for (i = 0; i < ARRAY_SIZE(port_list); i++) {
69 - err = airoha_set_gdm_port(eth, port_list[i], enable);
77 - for (i--; i >= 0; i--)
78 - airoha_set_gdm_port(eth, port_list[i], false);
83 static void airoha_fe_maccr_init(struct airoha_eth *eth)
86 @@ -1540,7 +1513,7 @@ static int airoha_dev_open(struct net_de
89 netif_tx_start_all_queues(dev);
90 - err = airoha_set_gdm_ports(qdma->eth, true);
91 + err = airoha_set_vip_for_gdm_port(port, true);
95 @@ -1566,7 +1539,7 @@ static int airoha_dev_stop(struct net_de
98 netif_tx_disable(dev);
99 - err = airoha_set_gdm_ports(qdma->eth, false);
100 + err = airoha_set_vip_for_gdm_port(port, false);
104 --- a/drivers/net/ethernet/airoha/airoha_eth.h
105 +++ b/drivers/net/ethernet/airoha/airoha_eth.h
106 @@ -58,14 +58,6 @@ enum {
118 XSI_PCIE0_VIP_PORT_MASK = BIT(22),
119 XSI_PCIE1_VIP_PORT_MASK = BIT(23),
120 XSI_USB_VIP_PORT_MASK = BIT(25),