From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 4FAF43290DB; Mon, 6 Apr 2026 10:34:59 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1775471699; cv=none; b=qtlRlI9FZ2mgOmepAF0R8JVHynKhqUAdAbyayHigibXIur4bPu7UJ48WRBvJTCZBjv/IumLZMsBTL96wzRhWkbarr2FIzphUfZTjt0as5apSzKGqIfIYy3iUdpy86toMU0na+oCb4TCcK8q0DE4VNlsms1aEPLuA2xik7mgMDYY= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1775471699; c=relaxed/simple; bh=fg8IocJA5vXQMLynYvLHDQ9WFhBhFX6UWbPpMcsa0pE=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=TXqAUoyPzb7kjXQw+5v9aZ/I9Ug1S9s2LE9rUfrKmdp0cWE9jrNi+2yLI/kedqO9zbQXSQzwycVKzNu6qQOzW2j8c4wFKlXp4csZTz4Wc+y6GHnGR6r1N93wGHKgKTYVFpKVwxGJ4JxU7qULof0pNH3lFGrLFey5PzdZF2kIvSU= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=i7vYzAXW; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="i7vYzAXW" Received: by smtp.kernel.org (Postfix) with ESMTPSA id D416CC4CEF7; Mon, 6 Apr 2026 10:34:58 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1775471699; bh=fg8IocJA5vXQMLynYvLHDQ9WFhBhFX6UWbPpMcsa0pE=; h=From:Date:Subject:References:In-Reply-To:To:Cc:From; b=i7vYzAXW6yGMCQJkkoB0JLvb7WMYK68uYXNhFhTLRmkQLcBl6PMFnLD7jlPSGHJbQ 10qpgkLb/M+4e1IJtuICLCloE9ibYi9kQFgII7WYsN5bSXVF5vB7bb7ie3lxfTlTHZ T8UoQn21ZG+rbhjJWbQK3uphSGXgqEgqR/ErR/t33J0974yiRf9CSqq5IAN27x0F4F lRORnnCfGofiEmVtzOVbDkECARziZNz6pTRuDfRSBcHJ9HjW56xCzrJJnS3Wg1kC9B TyXWp2jQR7VjJkh0YwLEDTiIy9yaxtSwR2re9yGcRz4maFALI7v3urvCI3zkruBF9B vNpptEl60LSSg== From: Lorenzo Bianconi Date: Mon, 06 Apr 2026 12:34:08 +0200 Subject: [PATCH net-next v3 03/12] net: airoha: Rely on net_device pointer in airoha_dev_setup_tc_block signature Precedence: bulk X-Mailing-List: netdev@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit Message-Id: <20260406-airoha-eth-multi-serdes-v3-3-ab6ea49d59ff@kernel.org> References: <20260406-airoha-eth-multi-serdes-v3-0-ab6ea49d59ff@kernel.org> In-Reply-To: <20260406-airoha-eth-multi-serdes-v3-0-ab6ea49d59ff@kernel.org> To: Andrew Lunn , "David S. Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Lorenzo Bianconi Cc: Christian Marangi , Benjamin Larsson , linux-arm-kernel@lists.infradead.org, linux-mediatek@lists.infradead.org, netdev@vger.kernel.org, devicetree@vger.kernel.org, Xuegang Lu X-Mailer: b4 0.14.3 Remove airoha_gdm_port dependency in airoha_dev_setup_tc_block routine signature and rely on net_device pointer instead. Please note this patch does not introduce any logical change and it is a preliminary patch to support multiple net_devices connected to the GDM3 or GDM4 ports via an external hw arbiter. Tested-by: Xuegang Lu Signed-off-by: Lorenzo Bianconi --- drivers/net/ethernet/airoha/airoha_eth.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/drivers/net/ethernet/airoha/airoha_eth.c b/drivers/net/ethernet/airoha/airoha_eth.c index 4b5581596043..e2fc57cb5020 100644 --- a/drivers/net/ethernet/airoha/airoha_eth.c +++ b/drivers/net/ethernet/airoha/airoha_eth.c @@ -2692,7 +2692,7 @@ static int airoha_dev_setup_tc_block_cb(enum tc_setup_type type, } } -static int airoha_dev_setup_tc_block(struct airoha_gdm_port *port, +static int airoha_dev_setup_tc_block(struct net_device *dev, struct flow_block_offload *f) { flow_setup_cb_t *cb = airoha_dev_setup_tc_block_cb; @@ -2705,12 +2705,12 @@ static int airoha_dev_setup_tc_block(struct airoha_gdm_port *port, f->driver_block_list = &block_cb_list; switch (f->command) { case FLOW_BLOCK_BIND: - block_cb = flow_block_cb_lookup(f->block, cb, port->dev); + block_cb = flow_block_cb_lookup(f->block, cb, dev); if (block_cb) { flow_block_cb_incref(block_cb); return 0; } - block_cb = flow_block_cb_alloc(cb, port->dev, port->dev, NULL); + block_cb = flow_block_cb_alloc(cb, dev, dev, NULL); if (IS_ERR(block_cb)) return PTR_ERR(block_cb); @@ -2719,7 +2719,7 @@ static int airoha_dev_setup_tc_block(struct airoha_gdm_port *port, list_add_tail(&block_cb->driver_list, &block_cb_list); return 0; case FLOW_BLOCK_UNBIND: - block_cb = flow_block_cb_lookup(f->block, cb, port->dev); + block_cb = flow_block_cb_lookup(f->block, cb, dev); if (!block_cb) return -ENOENT; @@ -2818,7 +2818,7 @@ static int airoha_dev_tc_setup(struct net_device *dev, enum tc_setup_type type, return airoha_tc_setup_qdisc_htb(port, type_data); case TC_SETUP_BLOCK: case TC_SETUP_FT: - return airoha_dev_setup_tc_block(port, type_data); + return airoha_dev_setup_tc_block(dev, type_data); default: return -EOPNOTSUPP; } -- 2.53.0