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 2C20B433AD; Sun, 29 Mar 2026 13:08:20 +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=1774789701; cv=none; b=KVhxwM6WGkODOJH772v89W7xWhTULSRizTpdCmZw35qbgCBIESBxPHFkxJtxf8A73LZaJuqEO4vEkmhc9xubedqrPtA5SI2UR2ZF0b/E/E6QpY4yKJov/oyQWwGAAUz3xl6V4Iq2ebnKEb9X5rkaggscArOlXKDV8dLPKXQa4XM= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1774789701; c=relaxed/simple; bh=4EhZThLH7oO/aeN4dZc7bHt9j7nfkfQrYsBvUetgK48=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=Hp/zE/K4VYQloYIWMN4ChPNOgiAheT0Tjot1tMhctxe4FfNtxK7pHubRjCN+mvQGnGYVGtrYm7V7kmBapJNEWln9tKBqwB8+XiRZs4Ns9t4T5JJa62du4MIuNQZ/VpT9gXUm/H1IvW5knDsOa4s+ml0NZOmAbaIqSLOOtbQlYew= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=H58wW6It; 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="H58wW6It" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 86001C19423; Sun, 29 Mar 2026 13:08:20 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1774789700; bh=4EhZThLH7oO/aeN4dZc7bHt9j7nfkfQrYsBvUetgK48=; h=From:Date:Subject:References:In-Reply-To:To:Cc:From; b=H58wW6ItX9MBfojrR0xjlUdD3KnMeTSkBWPW95ulvBn9jtgdtdzS3zsHhjapFH1Fb pL0nKhSS5UMZRCup4AiQn9vttyMZFOOSy+Y42Iox6gWUjWjuiOX/KME4y83A647dQC qKHrNA6nbWapc4yLekKrDi/QTGiYvYNLHppRJC5+ThuDpUy14oCYFVbpDrPahLxG+3 4Euk2Hxqo+yAPTezhxEpuLGurqW+i28Nt75piIi3FI15/w6x7zDspDCm3KThC3fEtU 7G/VlAjnNb/KWebtZdVcrgvS5rFMzU2n2Ao4kGSsnc2Jn+j819ERlVf5BAwqJdBHLA 3/XZ2kurDshDQ== From: Lorenzo Bianconi Date: Sun, 29 Mar 2026 15:07:52 +0200 Subject: [PATCH net-next 02/10] net: airoha: Rely on net_device pointer in airoha_dev_setup_tc_block signature Precedence: bulk X-Mailing-List: devicetree@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: <20260329-airoha-eth-multi-serdes-v1-2-00f52dc360ca@kernel.org> References: <20260329-airoha-eth-multi-serdes-v1-0-00f52dc360ca@kernel.org> In-Reply-To: <20260329-airoha-eth-multi-serdes-v1-0-00f52dc360ca@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 , 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 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 multiplexer. 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 743ef0db30980ce74059dfb63553030ef3bf735f..421a154ee7189eb7919382b6cd893ae5d4e03766 100644 --- a/drivers/net/ethernet/airoha/airoha_eth.c +++ b/drivers/net/ethernet/airoha/airoha_eth.c @@ -2671,7 +2671,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; @@ -2684,12 +2684,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); @@ -2698,7 +2698,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; @@ -2797,7 +2797,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