From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 56897D35144 for ; Wed, 1 Apr 2026 07:00:26 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender:List-Subscribe:List-Help :List-Post:List-Archive:List-Unsubscribe:List-Id:Cc:To:In-Reply-To:References :Message-Id:Content-Transfer-Encoding:Content-Type:MIME-Version:Subject:Date: From:Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=gl/hCRioKj4FRLvqEyKhmaTbZn+b9U10muvjwt/IG6A=; b=m/6hQgFSjB0g0qYCr8zyRnb+tJ sfgtfDGx/NSeDBgoZRQOovEQ2pPY66S7r/AdxRiZnpeMh2w1GRpWlaH5LNA2gix0JKpNUi6ayz6hs qPtYBG5F+Lt1HzzIukH3c8L9c32rk3KWOtPyNGHiZlMScK7eB+XLv6ODP3iz+ReVavRWW+OMRpHGh MeyCvN5c91etzg+xnfLDo8J3mwfP+ZJSHFKzsf9+PVc61zxP0wzHEnvhzgwEUrpSTm3Y68BFMcR9P bLfyR+DQPT1rTz9s+PYbFsvna3dygx9AcbQUu3QC35YmXtjW+gnEaetMUZgS3uFxlQ2ixaTeMshBG Z+1pc3kg==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.98.2 #2 (Red Hat Linux)) id 1w7pYo-0000000E96m-3sY1; Wed, 01 Apr 2026 07:00:18 +0000 Received: from sea.source.kernel.org ([172.234.252.31]) by bombadil.infradead.org with esmtps (Exim 4.98.2 #2 (Red Hat Linux)) id 1w7pYg-0000000E922-15zn; Wed, 01 Apr 2026 07:00:11 +0000 Received: from smtp.kernel.org (transwarp.subspace.kernel.org [100.75.92.58]) by sea.source.kernel.org (Postfix) with ESMTP id 6990A4024A; Wed, 1 Apr 2026 07:00:09 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id E832BC2BCB3; Wed, 1 Apr 2026 07:00:08 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1775026809; bh=Ufsjv/haVPKt31hyUGGIbzUvEJxDwoiIsDyDNBKk42A=; h=From:Date:Subject:References:In-Reply-To:To:Cc:From; b=osy/yKBstyTF51AUvFlfiYXCVhY8I1Cm4W9yGecMQwv4TrbjKnuapSLAuuRDVKBj7 op5ZRfjR+CaVT0ZvcMv+IWs55irr3EM/bhZDXE19bAREGyrPfhboiQE8x8bqarM14x z3UjBtrksvR/l4UfAus+cYybYBdUT0nBn0JMWqy+F1wVfHNSRj8OQBmXhiBj9rdHXr Dsm1muJoOwdjOkxP9ShPcM4OuhPAHd/hL8PD7Okx3214o6vC/hHUFVBhTd9b5kHVwu wCc05RTW3lqXgiVjT76pGNDRZGHLjVpUChiQ0Zdqb+E9a8pvDuAI2/NPr/vxAE+rHQ 11NI/hKNHze9w== From: Lorenzo Bianconi Date: Wed, 01 Apr 2026 08:59:21 +0200 Subject: [PATCH net-next v2 03/11] net: airoha: Rely on net_device pointer in airoha_dev_setup_tc_block signature MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit Message-Id: <20260401-airoha-eth-multi-serdes-v2-3-ac427ae4beeb@kernel.org> References: <20260401-airoha-eth-multi-serdes-v2-0-ac427ae4beeb@kernel.org> In-Reply-To: <20260401-airoha-eth-multi-serdes-v2-0-ac427ae4beeb@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.2 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20260401_000010_403614_51025403 X-CRM114-Status: GOOD ( 12.76 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org 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 ff5fc852d7dc3960fdcf6ae7465896340c3f43a0..e1448e01dd69b7d46f0efd8ad4e8531bca0ae1eb 100644 --- a/drivers/net/ethernet/airoha/airoha_eth.c +++ b/drivers/net/ethernet/airoha/airoha_eth.c @@ -2675,7 +2675,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; @@ -2688,12 +2688,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); @@ -2702,7 +2702,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; @@ -2801,7 +2801,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