From nobody Tue Nov 26 17:25:47 2024 Received: from metis.whiteo.stw.pengutronix.de (metis.whiteo.stw.pengutronix.de [185.203.201.7]) (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 5E48C1D5CE8 for ; Wed, 16 Oct 2024 21:52:32 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=185.203.201.7 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1729115555; cv=none; b=KhXqjueEXOvh0xRCFuB0mIsULz7mAt8A+gGav4LU58swBIqCjXObUp8XJGIK1Wq2+YxHu/YUWpCkpoyc5iueY5/lKNqk1mpjzpYwTZbzNozOnVvKYhtfkzvXQippptosMI584bkNCE9iKE9O4b8yGrjTRKp7QVr8r2mUUfHLw5c= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1729115555; c=relaxed/simple; bh=XVXSrBwnjwJzG3Mu4AqC0twMOeUoMAa/k9VGh+plXKg=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=UofA4iLLXlAVIEcsBs0emYkOqcsRiSEwz1pTKDBz8W3BvDiWXfMofp4aXU4zuKqqLBVghg+ZBwXJMe+D+jAh+ffyWnQHVeq6wy7ZYjK28ks6avbVTeLj9htmUX1R69xsnvp5r/0XhLakzPPQ3UzpW74SzXAGg2fZHzJOauJLktQ= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=pengutronix.de; spf=pass smtp.mailfrom=pengutronix.de; arc=none smtp.client-ip=185.203.201.7 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=pengutronix.de Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=pengutronix.de Received: from drehscheibe.grey.stw.pengutronix.de ([2a0a:edc0:0:c01:1d::a2]) by metis.whiteo.stw.pengutronix.de with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1t1BwO-0003JY-F5 for linux-kernel@vger.kernel.org; Wed, 16 Oct 2024 23:52:24 +0200 Received: from [2a0a:edc0:0:b01:1d::7b] (helo=bjornoya.blackshift.org) by drehscheibe.grey.stw.pengutronix.de with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1t1BwN-002OP8-8W for linux-kernel@vger.kernel.org; Wed, 16 Oct 2024 23:52:23 +0200 Received: from dspam.blackshift.org (localhost [127.0.0.1]) by bjornoya.blackshift.org (Postfix) with SMTP id D4D933548BF for ; Wed, 16 Oct 2024 21:52:22 +0000 (UTC) Received: from hardanger.blackshift.org (unknown [172.20.34.65]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by bjornoya.blackshift.org (Postfix) with ESMTPS id D1A14354879; Wed, 16 Oct 2024 21:52:19 +0000 (UTC) Received: from [172.20.34.65] (localhost [::1]) by hardanger.blackshift.org (OpenSMTPD) with ESMTP id 5a53b740; Wed, 16 Oct 2024 21:52:18 +0000 (UTC) From: Marc Kleine-Budde Date: Wed, 16 Oct 2024 23:51:49 +0200 Subject: [PATCH net-next 01/13] net: fec: fix typos found by codespell Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Message-Id: <20241016-fec-cleanups-v1-1-de783bd15e6a@pengutronix.de> References: <20241016-fec-cleanups-v1-0-de783bd15e6a@pengutronix.de> In-Reply-To: <20241016-fec-cleanups-v1-0-de783bd15e6a@pengutronix.de> To: Wei Fang , Shenwei Wang , Clark Wang , "David S. Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , Richard Cochran Cc: imx@lists.linux.dev, netdev@vger.kernel.org, linux-kernel@vger.kernel.org, kernel@pengutronix.de, Marc Kleine-Budde X-Mailer: b4 0.15-dev-dedf8 X-Developer-Signature: v=1; a=openpgp-sha256; l=3729; i=mkl@pengutronix.de; h=from:subject:message-id; bh=XVXSrBwnjwJzG3Mu4AqC0twMOeUoMAa/k9VGh+plXKg=; b=owEBbQGS/pANAwAKASg4oj56LbxvAcsmYgBnEDV/1AXer3fwLAq7BYzND+lVfhxBTKmo0pxom 7VpHnbsBcqJATMEAAEKAB0WIQRQQLqG4LYE3Sm8Pl8oOKI+ei28bwUCZxA1fwAKCRAoOKI+ei28 b6enB/4kvCAurNaACjRUSxqqu+gXKWERcZ4Y0a4Jf42Vi7xf6cx/BGja6Dt8u7AEhxewfPzBR1o fDa+LhmRzTx/DlLlx5Sh+vuPyFW557e/W2PY+YLbsi1C9Qm8UI2t92U2z15Hzrl0m0X9RQM1gvq BH6wLvzpG2AkRlT42hUSRFk6O3T2tfe2Byy4Q9SfSomO7rYOH2kbtmopODnrhw1brTJ9kMGEX2d RjuqTttci/ebFX8JlOKXARk/RZl0psrBLAfBG3cdd9sXpJ1Emn9VphgAFZQKJCcD4ybV9oj7yT7 sd3luI6J9bNmUf/U7TqKDpDLHGIiV3xbm6Gizxg7ovEM9WSw X-Developer-Key: i=mkl@pengutronix.de; a=openpgp; fpr=C1400BA0B3989E6FBC7D5B5C2B5EE211C58AEA54 X-SA-Exim-Connect-IP: 2a0a:edc0:0:c01:1d::a2 X-SA-Exim-Mail-From: mkl@pengutronix.de X-SA-Exim-Scanned: No (on metis.whiteo.stw.pengutronix.de); SAEximRunCond expanded to false X-PTX-Original-Recipient: linux-kernel@vger.kernel.org codespell has found some typos in the comments, fix them. Signed-off-by: Marc Kleine-Budde Reviewed-by: Cs=C3=B3k=C3=A1s, Bence Reviewed-by: Frank Li --- drivers/net/ethernet/freescale/fec.h | 8 ++++---- drivers/net/ethernet/freescale/fec_ptp.c | 4 ++-- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/drivers/net/ethernet/freescale/fec.h b/drivers/net/ethernet/fr= eescale/fec.h index 1cca0425d49397bbdb97f2c058bd759f9e602f17..77c2a08d23542accdb85b37a6f8= 6847d9eb56a7a 100644 --- a/drivers/net/ethernet/freescale/fec.h +++ b/drivers/net/ethernet/freescale/fec.h @@ -115,7 +115,7 @@ #define IEEE_T_MCOL 0x254 /* Frames tx'd with multiple collision */ #define IEEE_T_DEF 0x258 /* Frames tx'd after deferral delay */ #define IEEE_T_LCOL 0x25c /* Frames tx'd with late collision */ -#define IEEE_T_EXCOL 0x260 /* Frames tx'd with excesv collisions */ +#define IEEE_T_EXCOL 0x260 /* Frames tx'd with excessive collisions */ #define IEEE_T_MACERR 0x264 /* Frames tx'd with TX FIFO underrun */ #define IEEE_T_CSERR 0x268 /* Frames tx'd with carrier sense err */ #define IEEE_T_SQE 0x26c /* Frames tx'd with SQE err */ @@ -342,7 +342,7 @@ struct bufdesc_ex { #define FEC_TX_BD_FTYPE(X) (((X) & 0xf) << 20) =20 /* The number of Tx and Rx buffers. These are allocated from the page - * pool. The code may assume these are power of two, so it it best + * pool. The code may assume these are power of two, so it is best * to keep them that size. * We don't need to allocate pages for the transmitter. We just use * the skbuffer directly. @@ -460,7 +460,7 @@ struct bufdesc_ex { #define FEC_QUIRK_SINGLE_MDIO (1 << 11) /* Controller supports RACC register */ #define FEC_QUIRK_HAS_RACC (1 << 12) -/* Controller supports interrupt coalesc */ +/* Controller supports interrupt coalesce */ #define FEC_QUIRK_HAS_COALESCE (1 << 13) /* Interrupt doesn't wake CPU from deep idle */ #define FEC_QUIRK_ERR006687 (1 << 14) @@ -495,7 +495,7 @@ struct bufdesc_ex { */ #define FEC_QUIRK_HAS_EEE (1 << 20) =20 -/* i.MX8QM ENET IP version add new feture to generate delayed TXC/RXC +/* i.MX8QM ENET IP version add new feature to generate delayed TXC/RXC * as an alternative option to make sure it works well with various PHYs. * For the implementation of delayed clock, ENET takes synchronized 250MHz * clocks to generate 2ns delay. diff --git a/drivers/net/ethernet/freescale/fec_ptp.c b/drivers/net/etherne= t/freescale/fec_ptp.c index 7f6b57432071667e8553363f7c8c21198f38f530..8722f623d9e47e385439f1cee8c= 677e2b95b236d 100644 --- a/drivers/net/ethernet/freescale/fec_ptp.c +++ b/drivers/net/ethernet/freescale/fec_ptp.c @@ -118,7 +118,7 @@ static u64 fec_ptp_read(const struct cyclecounter *cc) * @fep: the fec_enet_private structure handle * @enable: enable the channel pps output * - * This function enble the PPS ouput on the timer channel. + * This function enable the PPS output on the timer channel. */ static int fec_ptp_enable_pps(struct fec_enet_private *fep, uint enable) { @@ -173,7 +173,7 @@ static int fec_ptp_enable_pps(struct fec_enet_private *= fep, uint enable) * very close to the second point, which means NSEC_PER_SEC * - ts.tv_nsec is close to be zero(For example 20ns); Since the timer * is still running when we calculate the first compare event, it is - * possible that the remaining nanoseonds run out before the compare + * possible that the remaining nanoseconds run out before the compare * counter is calculated and written into TCCR register. To avoid * this possibility, we will set the compare event to be the next * of next second. The current setting is 31-bit timer and wrap --=20 2.45.2 From nobody Tue Nov 26 17:25:47 2024 Received: from metis.whiteo.stw.pengutronix.de (metis.whiteo.stw.pengutronix.de [185.203.201.7]) (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 93E941D5CCC for ; Wed, 16 Oct 2024 21:52:31 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=185.203.201.7 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1729115553; cv=none; b=rhTtU9Meiq1a9DakQlmjCbHUxlN+4yHmlx1p6ob6C2ZKQIqFexTGUYRaPR5x+wP17eiOk7zMwvj4u8X6WKgJfELmPPgbEIEUQFRRRYutHQrTWE4HQmfk9g8wK5t70nW/SLFsxxXKSVqy4vPTIdP79jFLuNi5akJ7WjeAYamblKI= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1729115553; c=relaxed/simple; bh=svwv8RQdT5lyd7/tz6EetW56WKr+H6qzB5cVdUZBLIM=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=jPKSYtkpFnsAad5nX1sqojMzgqxrbeGzKEvIiI21wEfQUQHcdgr+fUrimKmhU78nTQnE9nQLSYZ9m6E2f2mhaFZFHImm8LjxzoOJyguMtSrzntGVT9OLF2CXTMxYeLPL8W02F4n++SeS2tUZcrzPBRObBtaMpvLNTUcmqT+Ey6o= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=pengutronix.de; spf=pass smtp.mailfrom=pengutronix.de; arc=none smtp.client-ip=185.203.201.7 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=pengutronix.de Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=pengutronix.de Received: from drehscheibe.grey.stw.pengutronix.de ([2a0a:edc0:0:c01:1d::a2]) by metis.whiteo.stw.pengutronix.de with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1t1BwO-0003Ja-Ba for linux-kernel@vger.kernel.org; Wed, 16 Oct 2024 23:52:24 +0200 Received: from [2a0a:edc0:0:b01:1d::7b] (helo=bjornoya.blackshift.org) by drehscheibe.grey.stw.pengutronix.de with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1t1BwN-002OP7-91 for linux-kernel@vger.kernel.org; Wed, 16 Oct 2024 23:52:23 +0200 Received: from dspam.blackshift.org (localhost [127.0.0.1]) by bjornoya.blackshift.org (Postfix) with SMTP id D3DDE3548BE for ; Wed, 16 Oct 2024 21:52:22 +0000 (UTC) Received: from hardanger.blackshift.org (unknown [172.20.34.65]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by bjornoya.blackshift.org (Postfix) with ESMTPS id E151835487A; Wed, 16 Oct 2024 21:52:19 +0000 (UTC) Received: from [172.20.34.65] (localhost [::1]) by hardanger.blackshift.org (OpenSMTPD) with ESMTP id f7a7a4d5; Wed, 16 Oct 2024 21:52:18 +0000 (UTC) From: Marc Kleine-Budde Date: Wed, 16 Oct 2024 23:51:50 +0200 Subject: [PATCH net-next 02/13] net: fec: struct fec_enet_private: remove obsolete comment Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Message-Id: <20241016-fec-cleanups-v1-2-de783bd15e6a@pengutronix.de> References: <20241016-fec-cleanups-v1-0-de783bd15e6a@pengutronix.de> In-Reply-To: <20241016-fec-cleanups-v1-0-de783bd15e6a@pengutronix.de> To: Wei Fang , Shenwei Wang , Clark Wang , "David S. Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , Richard Cochran Cc: imx@lists.linux.dev, netdev@vger.kernel.org, linux-kernel@vger.kernel.org, kernel@pengutronix.de, Marc Kleine-Budde X-Mailer: b4 0.15-dev-dedf8 X-Developer-Signature: v=1; a=openpgp-sha256; l=942; i=mkl@pengutronix.de; h=from:subject:message-id; bh=svwv8RQdT5lyd7/tz6EetW56WKr+H6qzB5cVdUZBLIM=; b=owEBbQGS/pANAwAKASg4oj56LbxvAcsmYgBnEDWAA4MlaBYTIlXO3nam5JM2yIBsEXrcTAsk0 Gl12UBoiciJATMEAAEKAB0WIQRQQLqG4LYE3Sm8Pl8oOKI+ei28bwUCZxA1gAAKCRAoOKI+ei28 b0IqB/46F2e0PqsiEsIKCw7j3fLigN58r0rjiLx7nPpJueDouojyNkREm/xNY9kWVXiorCSd1uA ZD4BUln4w5R0JblVMyhct8Tktilj8GB4ClYW3VPHdXmvy0CwdXSH7WRyrSOjJVA3qF9CpaMoQw8 HViueRNL23CwbXuHX1myfQxcT91cJpJdCQ3Ka1rdmFV1keVNbEOWJ5cJXNXvHvkBhuecaQPE6KV dxTgzy+H8/rJcQjSpwqSIYYUzRimhZUGNrsxGNFTr5wrvoZRZSZtu7A/1LSqBhr8qyLm5MNO7kD TmH5CRiCgQlb6+dODiAPktiQ2rAgL7n4toTcZUOS1rtMPHHT X-Developer-Key: i=mkl@pengutronix.de; a=openpgp; fpr=C1400BA0B3989E6FBC7D5B5C2B5EE211C58AEA54 X-SA-Exim-Connect-IP: 2a0a:edc0:0:c01:1d::a2 X-SA-Exim-Mail-From: mkl@pengutronix.de X-SA-Exim-Scanned: No (on metis.whiteo.stw.pengutronix.de); SAEximRunCond expanded to false X-PTX-Original-Recipient: linux-kernel@vger.kernel.org In commit 4d494cdc92b3 ("net: fec: change data structure to support multiqueue") the data structures were changed, so that the comment about the sent-in-place skb doesn't apply any more. Remove it. Signed-off-by: Marc Kleine-Budde Reviewed-by: Frank Li --- drivers/net/ethernet/freescale/fec.h | 1 - 1 file changed, 1 deletion(-) diff --git a/drivers/net/ethernet/freescale/fec.h b/drivers/net/ethernet/fr= eescale/fec.h index 77c2a08d23542accdb85b37a6f86847d9eb56a7a..e55c7ccad2ec39a9f3492135675= d480a22f7032d 100644 --- a/drivers/net/ethernet/freescale/fec.h +++ b/drivers/net/ethernet/freescale/fec.h @@ -614,7 +614,6 @@ struct fec_enet_private { unsigned int num_tx_queues; unsigned int num_rx_queues; =20 - /* The saved address of a sent-in-place packet/buffer, for skfree(). */ struct fec_enet_priv_tx_q *tx_queue[FEC_ENET_MAX_TX_QS]; struct fec_enet_priv_rx_q *rx_queue[FEC_ENET_MAX_RX_QS]; =20 --=20 2.45.2 From nobody Tue Nov 26 17:25:47 2024 Received: from metis.whiteo.stw.pengutronix.de (metis.whiteo.stw.pengutronix.de [185.203.201.7]) (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 9ECB61D5CCF for ; Wed, 16 Oct 2024 21:52:31 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=185.203.201.7 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1729115555; cv=none; b=NhBKfkEMfJiljSfv+UUyJPtktjx4wycUNVeihbI5Ub6BhNG2sBovoxg6ZeXFW1VsBHgUi93UAiKFAs6UVIijnMD+N/S+a/T1k/XwNJODxF1CSjoHzNnRR99tL3vtab+iHITS4AbUPuQjZSQT14rfGB4jOpR2l3QzT8l5CrBkQLc= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1729115555; c=relaxed/simple; bh=GpjAIxnnnGVUXNOqNhnCl60xQrUalApU+7hyOkbxr1s=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=UaG18NS2A3CmJqYI8Bc53SVG5HZ8Cvs7mSYTyd+ZzrT3MtqSqj2cYiXO0KS5bIB8ZwDwkSb+IFoXXWL+IpOkUBK/WFZ5OYZUZKB/tY2fRioqiRsMN0Ckp2JpwT5+RTDfCs3tdJRr1EV52bIm8bvlzh1K3WLEIXPKuvHnhB8mGkI= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=pengutronix.de; spf=pass smtp.mailfrom=pengutronix.de; arc=none smtp.client-ip=185.203.201.7 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=pengutronix.de Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=pengutronix.de Received: from drehscheibe.grey.stw.pengutronix.de ([2a0a:edc0:0:c01:1d::a2]) by metis.whiteo.stw.pengutronix.de with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1t1BwO-0003JZ-8W for linux-kernel@vger.kernel.org; Wed, 16 Oct 2024 23:52:24 +0200 Received: from [2a0a:edc0:0:b01:1d::7b] (helo=bjornoya.blackshift.org) by drehscheibe.grey.stw.pengutronix.de with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1t1BwN-002OP9-8f for linux-kernel@vger.kernel.org; Wed, 16 Oct 2024 23:52:23 +0200 Received: from dspam.blackshift.org (localhost [127.0.0.1]) by bjornoya.blackshift.org (Postfix) with SMTP id DC0863548C0 for ; Wed, 16 Oct 2024 21:52:22 +0000 (UTC) Received: from hardanger.blackshift.org (unknown [172.20.34.65]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by bjornoya.blackshift.org (Postfix) with ESMTPS id 081F635487B; Wed, 16 Oct 2024 21:52:20 +0000 (UTC) Received: from [172.20.34.65] (localhost [::1]) by hardanger.blackshift.org (OpenSMTPD) with ESMTP id 154b0c78; Wed, 16 Oct 2024 21:52:18 +0000 (UTC) From: Marc Kleine-Budde Date: Wed, 16 Oct 2024 23:51:51 +0200 Subject: [PATCH net-next 03/13] net: fec: add missing header files Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Message-Id: <20241016-fec-cleanups-v1-3-de783bd15e6a@pengutronix.de> References: <20241016-fec-cleanups-v1-0-de783bd15e6a@pengutronix.de> In-Reply-To: <20241016-fec-cleanups-v1-0-de783bd15e6a@pengutronix.de> To: Wei Fang , Shenwei Wang , Clark Wang , "David S. Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , Richard Cochran Cc: imx@lists.linux.dev, netdev@vger.kernel.org, linux-kernel@vger.kernel.org, kernel@pengutronix.de, Marc Kleine-Budde X-Mailer: b4 0.15-dev-dedf8 X-Developer-Signature: v=1; a=openpgp-sha256; l=868; i=mkl@pengutronix.de; h=from:subject:message-id; bh=GpjAIxnnnGVUXNOqNhnCl60xQrUalApU+7hyOkbxr1s=; b=owEBbQGS/pANAwAKASg4oj56LbxvAcsmYgBnEDWC32dOchoew6fax2I185fuEq8ZRit7iLBQf Ub38y54jbSJATMEAAEKAB0WIQRQQLqG4LYE3Sm8Pl8oOKI+ei28bwUCZxA1ggAKCRAoOKI+ei28 b9TkCACTD7BEGFU8thT4R3wcLcABSbobH8V8xJrkzKVco+3xwKNebKDhJduh8XT4Z6o3q6c8Z0E WwYKYHyg8Uv2h9i9DOZWrJya7caSVHTfkJqVhS3t9GsCr9TxbKHD3y+hbU1TRVw/ib7xUWVHPdO g9L9E5A5R92+bnAytwdUU28czTj8296QT9o+TyKfaxqDwNllDPGDBdjhTbc87n91vneC95RDAoD 3VpcKQEEz3AMIaK8g56tPHq2F4FNkRZuMJnjSc+wPmJqi0XMAlfgwUJXVOENszk3dM6YpEzZHrf AUnrnaZk3YF6R+nHH1q4q7g7fBe6e2GhlIChkjbEhIajbPij X-Developer-Key: i=mkl@pengutronix.de; a=openpgp; fpr=C1400BA0B3989E6FBC7D5B5C2B5EE211C58AEA54 X-SA-Exim-Connect-IP: 2a0a:edc0:0:c01:1d::a2 X-SA-Exim-Mail-From: mkl@pengutronix.de X-SA-Exim-Scanned: No (on metis.whiteo.stw.pengutronix.de); SAEximRunCond expanded to false X-PTX-Original-Recipient: linux-kernel@vger.kernel.org The fec.h isn't self contained. Add missing header files, so that it can be parsed by language servers without errors. Signed-off-by: Marc Kleine-Budde Reviewed-by: Frank Li --- drivers/net/ethernet/freescale/fec.h | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/net/ethernet/freescale/fec.h b/drivers/net/ethernet/fr= eescale/fec.h index e55c7ccad2ec39a9f3492135675d480a22f7032d..63744a86752540fcede7fc4c298= 65b2529492526 100644 --- a/drivers/net/ethernet/freescale/fec.h +++ b/drivers/net/ethernet/freescale/fec.h @@ -15,7 +15,9 @@ /*************************************************************************= ***/ =20 #include +#include #include +#include #include #include #include --=20 2.45.2 From nobody Tue Nov 26 17:25:47 2024 Received: from metis.whiteo.stw.pengutronix.de (metis.whiteo.stw.pengutronix.de [185.203.201.7]) (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 603951D5CEB for ; Wed, 16 Oct 2024 21:52:32 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=185.203.201.7 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1729115556; cv=none; b=AnC78Km9uA56B+np58k7AgmEKyF/eYlpk5fAfNuq9BX/l1DH6qK43t3FH3ZIH8NM6oK2wo1u531+8JnBYFx974pMXwaQDWtmDWljzHD2IYKA+LVkaZc1dTRdTjHLuH2rFeSGEbRYkw9rTHrmNvLtnHl1UPenT+xjkACGZ20lAVQ= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1729115556; c=relaxed/simple; bh=494pt2T3kZMKALHOHvTRwkhbNls4OKIiye9xhuUdKVQ=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=QuhYK6GykSrpKFmwwPdrq5IRbickzbJfmtOzZFUqn09CnXEyNE3KvOGwI89nPTKGuDK26SR0HCzWeLk91RVTPrtys27RuFxTheT0XFFwt2JK8xFKFnNKYmzU00PSlg/Hww8fEm4fDA6IlcSx1SWtOy65mL9GbDp0F+t1PxIBECY= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=pengutronix.de; spf=pass smtp.mailfrom=pengutronix.de; arc=none smtp.client-ip=185.203.201.7 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=pengutronix.de Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=pengutronix.de Received: from drehscheibe.grey.stw.pengutronix.de ([2a0a:edc0:0:c01:1d::a2]) by metis.whiteo.stw.pengutronix.de with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1t1BwO-0003Jf-KK for linux-kernel@vger.kernel.org; Wed, 16 Oct 2024 23:52:24 +0200 Received: from [2a0a:edc0:0:b01:1d::7b] (helo=bjornoya.blackshift.org) by drehscheibe.grey.stw.pengutronix.de with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1t1BwN-002OPF-DJ for linux-kernel@vger.kernel.org; Wed, 16 Oct 2024 23:52:23 +0200 Received: from dspam.blackshift.org (localhost [127.0.0.1]) by bjornoya.blackshift.org (Postfix) with SMTP id 1C34C3548C2 for ; Wed, 16 Oct 2024 21:52:23 +0000 (UTC) Received: from hardanger.blackshift.org (unknown [172.20.34.65]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by bjornoya.blackshift.org (Postfix) with ESMTPS id 1817735487E; Wed, 16 Oct 2024 21:52:20 +0000 (UTC) Received: from [172.20.34.65] (localhost [::1]) by hardanger.blackshift.org (OpenSMTPD) with ESMTP id 671f4d1b; Wed, 16 Oct 2024 21:52:18 +0000 (UTC) From: Marc Kleine-Budde Date: Wed, 16 Oct 2024 23:51:52 +0200 Subject: [PATCH net-next 04/13] net: fec: rename struct fec_devinfo fec_imx6x_info -> fec_imx6sx_info Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Message-Id: <20241016-fec-cleanups-v1-4-de783bd15e6a@pengutronix.de> References: <20241016-fec-cleanups-v1-0-de783bd15e6a@pengutronix.de> In-Reply-To: <20241016-fec-cleanups-v1-0-de783bd15e6a@pengutronix.de> To: Wei Fang , Shenwei Wang , Clark Wang , "David S. Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , Richard Cochran Cc: imx@lists.linux.dev, netdev@vger.kernel.org, linux-kernel@vger.kernel.org, kernel@pengutronix.de, Marc Kleine-Budde X-Mailer: b4 0.15-dev-dedf8 X-Developer-Signature: v=1; a=openpgp-sha256; l=1875; i=mkl@pengutronix.de; h=from:subject:message-id; bh=494pt2T3kZMKALHOHvTRwkhbNls4OKIiye9xhuUdKVQ=; b=owGbwMvMwMWoYbHIrkp3Tz7jabUkhnQB0+ZD5+/cqGUKjqpg0VJyneaR1P7qrv2xJ1tenLgYw PTtlLdiJ6MxCwMjF4OsmCJLgMOutgfbWO5q7rGLhxnEygQyhYGLUwAmIjqBg6FVW2pqdSIHQ1/R Rv9fKp6XuBiPR+w+vmWJyqMt2o8k2wz3C4SbunVWV67RDXlsvNx557y/jzLY3bb0b6pTee0XsYz 54pzNR5fJfmNJUvSuaw6eKq3bkq3AvmRbj1+zyYNlxkaZhTcMy8Wv3rLjjPuxpm5lTcfzVuctJ2 zXZCTxXqwtFdDQdLPVlGkvz7r7X0DmqtLeV8vyWQSZLV0ZvaUaIpZXXhW7uHuVxFH/+X33jtzRY /h/39LO6aqU5Nw5UlUnzuly3FmtFv4qRPBmj+okCaY3VWKvtkXv/DzLJEk07Y2r9RFhn74I3fY1 T8MSuW1k5jP8vdHwtVpoQvObvyufqxwPOiJ91JXxxlIFAA== X-Developer-Key: i=mkl@pengutronix.de; a=openpgp; fpr=C1400BA0B3989E6FBC7D5B5C2B5EE211C58AEA54 X-SA-Exim-Connect-IP: 2a0a:edc0:0:c01:1d::a2 X-SA-Exim-Mail-From: mkl@pengutronix.de X-SA-Exim-Scanned: No (on metis.whiteo.stw.pengutronix.de); SAEximRunCond expanded to false X-PTX-Original-Recipient: linux-kernel@vger.kernel.org In da722186f654 ("net: fec: set GPR bit on suspend by DT configuration.") the platform_device_id fec_devtype::driver_data was converted from holding the quirks to a pointing to struct fec_devinfo. The struct fec_devinfo holding the information for the i.MX6SX was named fec_imx6x_info. To align the name of the struct with the SoC's name, rename struct fec_devinfo fec_imx6x_info to struct fec_devinfo fec_imx6sx_info. Signed-off-by: Marc Kleine-Budde Reviewed-by: Frank Li --- drivers/net/ethernet/freescale/fec_main.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/net/ethernet/freescale/fec_main.c b/drivers/net/ethern= et/freescale/fec_main.c index 1b55047c0237cbea4e44a5a8335af5c11e2325f8..c57039cc83228dcd980a8fdbc18= cd3eab2dfe1a5 100644 --- a/drivers/net/ethernet/freescale/fec_main.c +++ b/drivers/net/ethernet/freescale/fec_main.c @@ -131,7 +131,7 @@ static const struct fec_devinfo fec_mvf600_info =3D { FEC_QUIRK_HAS_MDIO_C45, }; =20 -static const struct fec_devinfo fec_imx6x_info =3D { +static const struct fec_devinfo fec_imx6sx_info =3D { .quirks =3D FEC_QUIRK_ENET_MAC | FEC_QUIRK_HAS_GBIT | FEC_QUIRK_HAS_BUFDESC_EX | FEC_QUIRK_HAS_CSUM | FEC_QUIRK_HAS_VLAN | FEC_QUIRK_HAS_AVB | @@ -196,7 +196,7 @@ static const struct of_device_id fec_dt_ids[] =3D { { .compatible =3D "fsl,imx28-fec", .data =3D &fec_imx28_info, }, { .compatible =3D "fsl,imx6q-fec", .data =3D &fec_imx6q_info, }, { .compatible =3D "fsl,mvf600-fec", .data =3D &fec_mvf600_info, }, - { .compatible =3D "fsl,imx6sx-fec", .data =3D &fec_imx6x_info, }, + { .compatible =3D "fsl,imx6sx-fec", .data =3D &fec_imx6sx_info, }, { .compatible =3D "fsl,imx6ul-fec", .data =3D &fec_imx6ul_info, }, { .compatible =3D "fsl,imx8mq-fec", .data =3D &fec_imx8mq_info, }, { .compatible =3D "fsl,imx8qm-fec", .data =3D &fec_imx8qm_info, }, --=20 2.45.2 From nobody Tue Nov 26 17:25:47 2024 Received: from metis.whiteo.stw.pengutronix.de (metis.whiteo.stw.pengutronix.de [185.203.201.7]) (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 8672B1D6191 for ; Wed, 16 Oct 2024 21:52:33 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=185.203.201.7 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1729115558; cv=none; b=OuVFjgw0LORsJ3TZ+jaXezjdeJW4M0AaGy659rTgc7Y8IKut9hom2LRIhxVW5hK79Xdltp/oXfTw1RUDeP0eXX2mB8XWhQl+9Uc1mLvo1mTxlIKhiVAAVXhSrCpj5RNbX8HjkPCmKdNvOIBJ7QlCHfchvBuXbuQgEjfBJGt7dZ4= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1729115558; c=relaxed/simple; bh=7GtJji14G3kifWiJdk4fDCF5TSs2sCvgJBeyE6WDGs0=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=myG6KmkCM8/iimFTS/AD0kelgHMiWhUy9kQ+8427j/A2LmRMIL7vyymkYQMNgkiMG9kVAslm5NhrzmitgaRvc0S85WJbJQXRluXXUKkJtEDxc44kXQm32aJ+GfXziwspGDvrTpasWhxVmaAbQxdmUTHcvoucT/g4cASANYWAEVg= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=pengutronix.de; spf=pass smtp.mailfrom=pengutronix.de; arc=none smtp.client-ip=185.203.201.7 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=pengutronix.de Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=pengutronix.de Received: from drehscheibe.grey.stw.pengutronix.de ([2a0a:edc0:0:c01:1d::a2]) by metis.whiteo.stw.pengutronix.de with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1t1BwU-0003RY-VU for linux-kernel@vger.kernel.org; Wed, 16 Oct 2024 23:52:30 +0200 Received: from [2a0a:edc0:0:b01:1d::7b] (helo=bjornoya.blackshift.org) by drehscheibe.grey.stw.pengutronix.de with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1t1BwQ-002OUa-FU for linux-kernel@vger.kernel.org; Wed, 16 Oct 2024 23:52:26 +0200 Received: from dspam.blackshift.org (localhost [127.0.0.1]) by bjornoya.blackshift.org (Postfix) with SMTP id 306AF354928 for ; Wed, 16 Oct 2024 21:52:26 +0000 (UTC) Received: from hardanger.blackshift.org (unknown [172.20.34.65]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by bjornoya.blackshift.org (Postfix) with ESMTPS id 3627C354880; Wed, 16 Oct 2024 21:52:20 +0000 (UTC) Received: from [172.20.34.65] (localhost [::1]) by hardanger.blackshift.org (OpenSMTPD) with ESMTP id be551a47; Wed, 16 Oct 2024 21:52:18 +0000 (UTC) From: Marc Kleine-Budde Date: Wed, 16 Oct 2024 23:51:53 +0200 Subject: [PATCH net-next 05/13] net: fec: fec_restart(): introduce a define for FEC_ECR_SPEED Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Message-Id: <20241016-fec-cleanups-v1-5-de783bd15e6a@pengutronix.de> References: <20241016-fec-cleanups-v1-0-de783bd15e6a@pengutronix.de> In-Reply-To: <20241016-fec-cleanups-v1-0-de783bd15e6a@pengutronix.de> To: Wei Fang , Shenwei Wang , Clark Wang , "David S. Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , Richard Cochran Cc: imx@lists.linux.dev, netdev@vger.kernel.org, linux-kernel@vger.kernel.org, kernel@pengutronix.de, Marc Kleine-Budde X-Mailer: b4 0.15-dev-dedf8 X-Developer-Signature: v=1; a=openpgp-sha256; l=1217; i=mkl@pengutronix.de; h=from:subject:message-id; bh=7GtJji14G3kifWiJdk4fDCF5TSs2sCvgJBeyE6WDGs0=; b=owEBbQGS/pANAwAKASg4oj56LbxvAcsmYgBnEDWFQWZhrYZZkfdVhV0Jk/Nfh9q7WlZQzjSul hPTCO1BEJaJATMEAAEKAB0WIQRQQLqG4LYE3Sm8Pl8oOKI+ei28bwUCZxA1hQAKCRAoOKI+ei28 byqWB/0afSRnTRSECfSjxdtzoGolxiFb4HYpV2P73zfe1yozkI6gXgDXT18McR6n3aAWF4L4bx5 Nn89bAutGj1L/8DXa95MBR5ZBZu9nQ1fkrrRz+JAQL+ipm8WQTk+2EcCDQOCjBVQiV8TYEouwaU cVHaECBe48qFKg2mXcJ32kHi6YypNnolHI6BeYGVHgbb5gk58O0uoFs0k7a5egU0E2Y1LkEDI6O 3rIEw0I2Ec8rgoQFFMvCqIkUStsQtrnqqr0hmVojY/iHj76TKNZQDXVFZfBChWF1uU53ebx2Irm XPvVhjR9gM/LphVHnPX4JtVrrPeyZ+X+YzpScGXg+M+Hu5jZ X-Developer-Key: i=mkl@pengutronix.de; a=openpgp; fpr=C1400BA0B3989E6FBC7D5B5C2B5EE211C58AEA54 X-SA-Exim-Connect-IP: 2a0a:edc0:0:c01:1d::a2 X-SA-Exim-Mail-From: mkl@pengutronix.de X-SA-Exim-Scanned: No (on metis.whiteo.stw.pengutronix.de); SAEximRunCond expanded to false X-PTX-Original-Recipient: linux-kernel@vger.kernel.org Instead of open coding the bit mask to configure for 1000 MBit/s add a define for it. Signed-off-by: Marc Kleine-Budde Reviewed-by: Frank Li --- drivers/net/ethernet/freescale/fec_main.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/net/ethernet/freescale/fec_main.c b/drivers/net/ethern= et/freescale/fec_main.c index c57039cc83228dcd980a8fdbc18cd3eab2dfe1a5..2ee7e4765ba3163fb0d158e60b5= 34b171da26c22 100644 --- a/drivers/net/ethernet/freescale/fec_main.c +++ b/drivers/net/ethernet/freescale/fec_main.c @@ -276,6 +276,7 @@ MODULE_PARM_DESC(macaddr, "FEC Ethernet MAC address"); #define FEC_ECR_MAGICEN BIT(2) #define FEC_ECR_SLEEP BIT(3) #define FEC_ECR_EN1588 BIT(4) +#define FEC_ECR_SPEED BIT(5) #define FEC_ECR_BYTESWP BIT(8) /* FEC RCR bits definition */ #define FEC_RCR_LOOP BIT(0) @@ -1160,7 +1161,7 @@ fec_restart(struct net_device *ndev) /* 1G, 100M or 10M */ if (ndev->phydev) { if (ndev->phydev->speed =3D=3D SPEED_1000) - ecntl |=3D (1 << 5); + ecntl |=3D FEC_ECR_SPEED; else if (ndev->phydev->speed =3D=3D SPEED_100) rcntl &=3D ~FEC_RCR_10BASET; else --=20 2.45.2 From nobody Tue Nov 26 17:25:47 2024 Received: from metis.whiteo.stw.pengutronix.de (metis.whiteo.stw.pengutronix.de [185.203.201.7]) (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 AE76D1D5CF9 for ; Wed, 16 Oct 2024 21:52:32 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=185.203.201.7 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1729115556; cv=none; b=Mu7Glx2tPQGf9c76/7QO5imDfpvA02DPBo4x5IAiFc3mjqNEy/UFZMwy//hQ6C5BusJ4siTMdN0DXTfQbMi/IHNu01MTHnknf3SJHICyLxiPuWLyA1tBmWgtGI9MwnITJIAmcfrYEpnNjVnY3PTzStFJgg2BV4L43YxkCgOGbfE= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1729115556; c=relaxed/simple; bh=r2Bczt3iY/LW5Q+NASe8BndjjkWWTrpEdZ4llRpFXxs=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=t92h5DQtosOzV4Zl0Exs2kK+/Ma07ddcHR0Or2LOUtIeMT6NII2HEWjQcoomJlqEpoHhLFU0t6XrZmQHvvwRZlKk4m73oFXgunpJXi86VfyVRYQJ4Nnod6Q4+Yu5tAISKmT4v6mc1hgo5jydh/lyRHAq2A0RE++P9CE2o2uh4s8= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=pengutronix.de; spf=pass smtp.mailfrom=pengutronix.de; arc=none smtp.client-ip=185.203.201.7 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=pengutronix.de Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=pengutronix.de Received: from drehscheibe.grey.stw.pengutronix.de ([2a0a:edc0:0:c01:1d::a2]) by metis.whiteo.stw.pengutronix.de with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1t1BwU-0003Ru-D4 for linux-kernel@vger.kernel.org; Wed, 16 Oct 2024 23:52:30 +0200 Received: from [2a0a:edc0:0:b01:1d::7b] (helo=bjornoya.blackshift.org) by drehscheibe.grey.stw.pengutronix.de with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1t1BwQ-002OUu-Jr for linux-kernel@vger.kernel.org; Wed, 16 Oct 2024 23:52:26 +0200 Received: from dspam.blackshift.org (localhost [127.0.0.1]) by bjornoya.blackshift.org (Postfix) with SMTP id 4AE0E35492F for ; Wed, 16 Oct 2024 21:52:26 +0000 (UTC) Received: from hardanger.blackshift.org (unknown [172.20.34.65]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by bjornoya.blackshift.org (Postfix) with ESMTPS id 53CF9354884; Wed, 16 Oct 2024 21:52:20 +0000 (UTC) Received: from [172.20.34.65] (localhost [::1]) by hardanger.blackshift.org (OpenSMTPD) with ESMTP id 6890ce52; Wed, 16 Oct 2024 21:52:19 +0000 (UTC) From: Marc Kleine-Budde Date: Wed, 16 Oct 2024 23:51:54 +0200 Subject: [PATCH net-next 06/13] net: fec: fec_restart(): make use of FEC_ECR_RESET Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Message-Id: <20241016-fec-cleanups-v1-6-de783bd15e6a@pengutronix.de> References: <20241016-fec-cleanups-v1-0-de783bd15e6a@pengutronix.de> In-Reply-To: <20241016-fec-cleanups-v1-0-de783bd15e6a@pengutronix.de> To: Wei Fang , Shenwei Wang , Clark Wang , "David S. Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , Richard Cochran Cc: imx@lists.linux.dev, netdev@vger.kernel.org, linux-kernel@vger.kernel.org, kernel@pengutronix.de, Marc Kleine-Budde X-Mailer: b4 0.15-dev-dedf8 X-Developer-Signature: v=1; a=openpgp-sha256; l=837; i=mkl@pengutronix.de; h=from:subject:message-id; bh=r2Bczt3iY/LW5Q+NASe8BndjjkWWTrpEdZ4llRpFXxs=; b=owGbwMvMwMWoYbHIrkp3Tz7jabUkhnQB07Z3H6xXrwh34VPUf3Avj2XyPtvVSVqLOysvBUw7N UurYKpgJ6MxCwMjF4OsmCJLgMOutgfbWO5q7rGLhxnEygQyhYGLUwAmIryNg2G6xm27LN3Fv3VX fv6TO+ulrVjoktyfgg9y2H7U3N+pkda/pICJ7btt+++PZhkVmcZfjgvrXWp+/+DcW+Zf87xU33h Mbp+U9Vm/128Jq+fn7ybN+6YFVPz6GcXrvJHbOMjragyvzu+60Jqo1yUhVi/urd1hnRoj8tOly/ mM97e8ZE2ZpMt3VloyHnILv3g4h/vUEpPeP5ILlV2Ct0oZirpuSsjNZZDcpDitaLG8sKH/xW+3W 9tmKuQ5Tw2TWdx4059RO87peGLF2cDqruW/+bfH6G+5qvlJK+veg7bdCsLPNLkkUn/cfSBTf92l PkmE7+bk52+NDhk2CM4U/yLePN24zIJxJ6vEQcWb4WkrAA== X-Developer-Key: i=mkl@pengutronix.de; a=openpgp; fpr=C1400BA0B3989E6FBC7D5B5C2B5EE211C58AEA54 X-SA-Exim-Connect-IP: 2a0a:edc0:0:c01:1d::a2 X-SA-Exim-Mail-From: mkl@pengutronix.de X-SA-Exim-Scanned: No (on metis.whiteo.stw.pengutronix.de); SAEximRunCond expanded to false X-PTX-Original-Recipient: linux-kernel@vger.kernel.org Replace the magic number "1" by the already existing define FEC_ECR_RESET. Signed-off-by: Marc Kleine-Budde Reviewed-by: Frank Li --- drivers/net/ethernet/freescale/fec_main.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/net/ethernet/freescale/fec_main.c b/drivers/net/ethern= et/freescale/fec_main.c index 2ee7e4765ba3163fb0d158e60b534b171da26c22..d948ed9810027d5fabe521dc3af= 2cf505dacd13e 100644 --- a/drivers/net/ethernet/freescale/fec_main.c +++ b/drivers/net/ethernet/freescale/fec_main.c @@ -1089,7 +1089,7 @@ fec_restart(struct net_device *ndev) ((fep->quirks & FEC_QUIRK_NO_HARD_RESET) && fep->link)) { writel(0, fep->hwp + FEC_ECNTRL); } else { - writel(1, fep->hwp + FEC_ECNTRL); + writel(FEC_ECR_RESET, fep->hwp + FEC_ECNTRL); udelay(10); } =20 --=20 2.45.2 From nobody Tue Nov 26 17:25:47 2024 Received: from metis.whiteo.stw.pengutronix.de (metis.whiteo.stw.pengutronix.de [185.203.201.7]) (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 833C81BE871 for ; Wed, 16 Oct 2024 21:52:33 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=185.203.201.7 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1729115557; cv=none; b=Hgk6q2aJi9EW+A7bg++a10QlcvwnxoU1ZzKXMi0ailUMfL0SabK/SBhoEjGbN+8RevVp9J0dCRVcaZG+xQUNSd4bNjQ/uCJiPTWqHeCMx2g/jM8cD9fKxzzFbdBo6okg7IO3rJ3j1zOZu9VriHUrww1slW9/UnEfdjyw8Y9wYGA= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1729115557; c=relaxed/simple; bh=tcNc/WHwbtrSjvHNY6VoFGsID5+2ekA+Dw1Mv/xHWGg=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=C6HpdhzN2kzzKZ/ttWtUzVRG+1RnsxUWKZ5g/9yj8ZFIT03paHWmBZ3IiONSKQrC/RvlgfhSd6oFy0Q5HvGJdltZYSDjNQrA40sRj7xTOERG351A60K0J9XzIoyby/l+qcZUBcddKUPZqW/3AKSP9aq8+AO0iI/bXE6+b5ZEBs4= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=pengutronix.de; spf=pass smtp.mailfrom=pengutronix.de; arc=none smtp.client-ip=185.203.201.7 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=pengutronix.de Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=pengutronix.de Received: from drehscheibe.grey.stw.pengutronix.de ([2a0a:edc0:0:c01:1d::a2]) by metis.whiteo.stw.pengutronix.de with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1t1BwU-0003Rg-WA for linux-kernel@vger.kernel.org; Wed, 16 Oct 2024 23:52:31 +0200 Received: from [2a0a:edc0:0:b01:1d::7b] (helo=bjornoya.blackshift.org) by drehscheibe.grey.stw.pengutronix.de with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1t1BwQ-002OUl-Gx for linux-kernel@vger.kernel.org; Wed, 16 Oct 2024 23:52:26 +0200 Received: from dspam.blackshift.org (localhost [127.0.0.1]) by bjornoya.blackshift.org (Postfix) with SMTP id 35BF435492A for ; Wed, 16 Oct 2024 21:52:26 +0000 (UTC) Received: from hardanger.blackshift.org (unknown [172.20.34.65]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by bjornoya.blackshift.org (Postfix) with ESMTPS id 6FC1C354887; Wed, 16 Oct 2024 21:52:20 +0000 (UTC) Received: from [172.20.34.65] (localhost [::1]) by hardanger.blackshift.org (OpenSMTPD) with ESMTP id 84f0d07b; Wed, 16 Oct 2024 21:52:19 +0000 (UTC) From: Marc Kleine-Budde Date: Wed, 16 Oct 2024 23:51:55 +0200 Subject: [PATCH net-next 07/13] net: fec: fec_probe(): update quirk: bring IRQs in correct order Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Message-Id: <20241016-fec-cleanups-v1-7-de783bd15e6a@pengutronix.de> References: <20241016-fec-cleanups-v1-0-de783bd15e6a@pengutronix.de> In-Reply-To: <20241016-fec-cleanups-v1-0-de783bd15e6a@pengutronix.de> To: Wei Fang , Shenwei Wang , Clark Wang , "David S. Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , Richard Cochran Cc: imx@lists.linux.dev, netdev@vger.kernel.org, linux-kernel@vger.kernel.org, kernel@pengutronix.de, Marc Kleine-Budde X-Mailer: b4 0.15-dev-dedf8 X-Developer-Signature: v=1; a=openpgp-sha256; l=4182; i=mkl@pengutronix.de; h=from:subject:message-id; bh=tcNc/WHwbtrSjvHNY6VoFGsID5+2ekA+Dw1Mv/xHWGg=; b=owEBbQGS/pANAwAKASg4oj56LbxvAcsmYgBnEDWHUQ1y/LJ9LWKdPDVg29YDLiDTbGto7my/U MlLBpL2+a2JATMEAAEKAB0WIQRQQLqG4LYE3Sm8Pl8oOKI+ei28bwUCZxA1hwAKCRAoOKI+ei28 b7G8B/9XMejTYEgUJzMVtEwthcAtlTIH9bg+bzj2LTZLeVqKzEmpC+Fx9s3UZ8NXizKNu5phs+s rwjmJSqb4v5tw3T5QUp9UiKxktMxUWTrboFnimf/BF2FsYIpvQYyu6MZxtazMNuXxhhF+VEpDkp gsEUNHkH9bwKEoAYHG7IwC3SejHTl5vMGwIP5Ql0HlpOLRoa3kjc45e1E+5Ea1aVF3M1NmwTjxT LKtB0sBwVHl1qFvbg3t4PxDbFrUC70dMmsp+S1qX5a1+6C9Rd7k6Ke9gy3bE/F0IFd4sV8WSCkg Tc+3XmaTbGNe6Cw/bM/kGIdTL9vkqfEusRa7H2w1F4ci51n6 X-Developer-Key: i=mkl@pengutronix.de; a=openpgp; fpr=C1400BA0B3989E6FBC7D5B5C2B5EE211C58AEA54 X-SA-Exim-Connect-IP: 2a0a:edc0:0:c01:1d::a2 X-SA-Exim-Mail-From: mkl@pengutronix.de X-SA-Exim-Scanned: No (on metis.whiteo.stw.pengutronix.de); SAEximRunCond expanded to false X-PTX-Original-Recipient: linux-kernel@vger.kernel.org With i.MX8MQ and compatible SoCs, the order of the IRQs in the device tree is not optimal. The driver expects the first three IRQs to match their corresponding queue, while the last (fourth) IRQ is used for the PPS: - 1st IRQ: "int0": queue0 + other IRQs - 2nd IRQ: "int1": queue1 - 3rd IRQ: "int2": queue2 - 4th IRQ: "pps": pps However, the i.MX8MQ and compatible SoCs do not use the "interrupt-names" property and specify the IRQs in the wrong order: - 1st IRQ: queue1 - 2nd IRQ: queue2 - 3rd IRQ: queue0 + other IRQs - 4th IRQ: pps First rename the quirk from FEC_QUIRK_WAKEUP_FROM_INT2 to FEC_QUIRK_INT2_IS_MAIN_IRQ, to better reflect it's functionality. If the FEC_QUIRK_INT2_IS_MAIN_IRQ quirk is active, put the IRQs back in the correct order, this is done in fec_probe(). Signed-off-by: Marc Kleine-Budde --- drivers/net/ethernet/freescale/fec.h | 24 ++++++++++++++++++++++-- drivers/net/ethernet/freescale/fec_main.c | 18 +++++++++++------- 2 files changed, 33 insertions(+), 9 deletions(-) diff --git a/drivers/net/ethernet/freescale/fec.h b/drivers/net/ethernet/fr= eescale/fec.h index 63744a86752540fcede7fc4c29865b2529492526..b0f1a3e28d5c8052be3a8a0fa18= 303a1df2bb5bd 100644 --- a/drivers/net/ethernet/freescale/fec.h +++ b/drivers/net/ethernet/freescale/fec.h @@ -504,8 +504,28 @@ struct bufdesc_ex { */ #define FEC_QUIRK_DELAYED_CLKS_SUPPORT (1 << 21) =20 -/* i.MX8MQ SoC integration mix wakeup interrupt signal into "int2" interru= pt line. */ -#define FEC_QUIRK_WAKEUP_FROM_INT2 (1 << 22) +/* With i.MX8MQ and compatible SoCs, the order of the IRQs in the + * device tree is not optimal. The driver expects the first three IRQs + * to match their corresponding queue, while the last (fourth) IRQ is + * used for the PPS: + * + * - 1st IRQ: "int0": queue0 + other IRQs + * - 2nd IRQ: "int1": queue1 + * - 3rd IRQ: "int2": queue2 + * - 4th IRQ: "pps": pps + * + * However, the i.MX8MQ and compatible SoCs do not use the + * "interrupt-names" property and specify the IRQs in the wrong order: + * + * - 1st IRQ: queue1 + * - 2nd IRQ: queue2 + * - 3rd IRQ: queue0 + other IRQs + * - 4th IRQ: pps + * + * If the following quirk is active, put the IRQs back in the correct + * order, this is done in fec_probe(). + */ +#define FEC_QUIRK_DT_IRQ2_IS_MAIN_IRQ BIT(22) =20 /* i.MX6Q adds pm_qos support */ #define FEC_QUIRK_HAS_PMQOS BIT(23) diff --git a/drivers/net/ethernet/freescale/fec_main.c b/drivers/net/ethern= et/freescale/fec_main.c index d948ed9810027d5fabe521dc3af2cf505dacd13e..f124ffe3619d82dc089f8494d33= d2398e6f631fb 100644 --- a/drivers/net/ethernet/freescale/fec_main.c +++ b/drivers/net/ethernet/freescale/fec_main.c @@ -157,7 +157,7 @@ static const struct fec_devinfo fec_imx8mq_info =3D { FEC_QUIRK_ERR007885 | FEC_QUIRK_BUG_CAPTURE | FEC_QUIRK_HAS_RACC | FEC_QUIRK_HAS_COALESCE | FEC_QUIRK_CLEAR_SETUP_MII | FEC_QUIRK_HAS_MULTI_QUEUES | - FEC_QUIRK_HAS_EEE | FEC_QUIRK_WAKEUP_FROM_INT2 | + FEC_QUIRK_HAS_EEE | FEC_QUIRK_DT_IRQ2_IS_MAIN_IRQ | FEC_QUIRK_HAS_MDIO_C45, }; =20 @@ -4260,10 +4260,7 @@ static void fec_enet_get_wakeup_irq(struct platform_= device *pdev) struct net_device *ndev =3D platform_get_drvdata(pdev); struct fec_enet_private *fep =3D netdev_priv(ndev); =20 - if (fep->quirks & FEC_QUIRK_WAKEUP_FROM_INT2) - fep->wake_irq =3D fep->irq[2]; - else - fep->wake_irq =3D fep->irq[0]; + fep->wake_irq =3D fep->irq[0]; } =20 static int fec_enet_init_stop_mode(struct fec_enet_private *fep, @@ -4495,10 +4492,17 @@ fec_probe(struct platform_device *pdev) goto failed_init; =20 for (i =3D 0; i < irq_cnt; i++) { - snprintf(irq_name, sizeof(irq_name), "int%d", i); + int irq_num; + + if (fep->quirks & FEC_QUIRK_DT_IRQ2_IS_MAIN_IRQ) + irq_num =3D (i + irq_cnt - 1) % irq_cnt; + else + irq_num =3D i; + + snprintf(irq_name, sizeof(irq_name), "int%d", irq_num); irq =3D platform_get_irq_byname_optional(pdev, irq_name); if (irq < 0) - irq =3D platform_get_irq(pdev, i); + irq =3D platform_get_irq(pdev, irq_num); if (irq < 0) { ret =3D irq; goto failed_irq; --=20 2.45.2 From nobody Tue Nov 26 17:25:47 2024 Received: from metis.whiteo.stw.pengutronix.de (metis.whiteo.stw.pengutronix.de [185.203.201.7]) (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 5C6751D5CE7 for ; Wed, 16 Oct 2024 21:52:32 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=185.203.201.7 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1729115555; cv=none; b=O2c4db4Fd+hKBj8q3WgcV1YXHW+ZShOrlDNX3u+a9XI9c6yoYfcgvleG1+DX6QngppW75+e/ScTW8NGOHP6p4MWooIOMbdMBJSc8zmAUBWZdX1tVujtKZeRAS17Z4Ypf4tUz23fmsWAb5TJv7tN+VzdU6y4Z59alk4nzwwNhCrw= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1729115555; c=relaxed/simple; bh=PQKfRdtWTAXIoydlgwBAzBYY+iXP63O77c6zthztjaI=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=rChToiv3qDP67bYL7L3bLBlr112Y4SmVO9l3JulVIjfGJmRB1Rb82JAdRvtvCHlKJPdMLiQnqqOg6vasozinXMsv3vbPftJSi/Wdcm/3edbDwlv151/ZK5EXnT5htVvp0bAGW90RC24KZt5+Wk9Bme07zwQ6yv2qiXpNp2S9fmI= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=pengutronix.de; spf=pass smtp.mailfrom=pengutronix.de; arc=none smtp.client-ip=185.203.201.7 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=pengutronix.de Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=pengutronix.de Received: from drehscheibe.grey.stw.pengutronix.de ([2a0a:edc0:0:c01:1d::a2]) by metis.whiteo.stw.pengutronix.de with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1t1BwU-0003Rf-7y for linux-kernel@vger.kernel.org; Wed, 16 Oct 2024 23:52:30 +0200 Received: from [2a0a:edc0:0:b01:1d::7b] (helo=bjornoya.blackshift.org) by drehscheibe.grey.stw.pengutronix.de with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1t1BwQ-002OUm-Gv for linux-kernel@vger.kernel.org; Wed, 16 Oct 2024 23:52:26 +0200 Received: from dspam.blackshift.org (localhost [127.0.0.1]) by bjornoya.blackshift.org (Postfix) with SMTP id 3683435492B for ; Wed, 16 Oct 2024 21:52:26 +0000 (UTC) Received: from hardanger.blackshift.org (unknown [172.20.34.65]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by bjornoya.blackshift.org (Postfix) with ESMTPS id 7FCC4354889; Wed, 16 Oct 2024 21:52:20 +0000 (UTC) Received: from [172.20.34.65] (localhost [::1]) by hardanger.blackshift.org (OpenSMTPD) with ESMTP id 21637288; Wed, 16 Oct 2024 21:52:19 +0000 (UTC) From: Marc Kleine-Budde Date: Wed, 16 Oct 2024 23:51:56 +0200 Subject: [PATCH net-next 08/13] net: fec: fec_probe(): let IRQ name reflect its function Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Message-Id: <20241016-fec-cleanups-v1-8-de783bd15e6a@pengutronix.de> References: <20241016-fec-cleanups-v1-0-de783bd15e6a@pengutronix.de> In-Reply-To: <20241016-fec-cleanups-v1-0-de783bd15e6a@pengutronix.de> To: Wei Fang , Shenwei Wang , Clark Wang , "David S. Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , Richard Cochran Cc: imx@lists.linux.dev, netdev@vger.kernel.org, linux-kernel@vger.kernel.org, kernel@pengutronix.de, Marc Kleine-Budde X-Mailer: b4 0.15-dev-dedf8 X-Developer-Signature: v=1; a=openpgp-sha256; l=3400; i=mkl@pengutronix.de; h=from:subject:message-id; bh=PQKfRdtWTAXIoydlgwBAzBYY+iXP63O77c6zthztjaI=; b=owEBbQGS/pANAwAKASg4oj56LbxvAcsmYgBnEDWJdz6WPFmpuJICJRNYxZ0KdNuJR/sWUfgxB D0rz1IkzxSJATMEAAEKAB0WIQRQQLqG4LYE3Sm8Pl8oOKI+ei28bwUCZxA1iQAKCRAoOKI+ei28 b45PB/95196jockvrCj++TeD3Deyrjep2aMyesqXSzHsOAPmOGnzeG15CitaHzVyHAMlJBugVgv w4E9+/4itXm/PLyDPYoiaqz+g88u/LNU86m4cCuxFPgtGZuMu/AsoNvJOVH2HamuRIbTzGY88UM nbbjxzmt+7aSrnHfS5e0djP5uvTznt+bPQqz0R+yytmFmdGBspz9jNWxHbyFjT0f1tokRMq3C/s 60wgFI5zTzht19p81U8fX4XJ6HXgP/CrdmWhkrzeXEZ1/ZLuKrSlPhC2jaFBDJfr4dUy4Jsy+nQ LKbS9dtKMJojYzTMoo8sHI2n3zpkOZ48BeNYz0AdGBiI4eGu X-Developer-Key: i=mkl@pengutronix.de; a=openpgp; fpr=C1400BA0B3989E6FBC7D5B5C2B5EE211C58AEA54 X-SA-Exim-Connect-IP: 2a0a:edc0:0:c01:1d::a2 X-SA-Exim-Mail-From: mkl@pengutronix.de X-SA-Exim-Scanned: No (on metis.whiteo.stw.pengutronix.de); SAEximRunCond expanded to false X-PTX-Original-Recipient: linux-kernel@vger.kernel.org The FEC IP core in the i.MX7 and newer SoCs has 4 IRQs. The first 3 correspond to the 3 RX/TX queues, the 4th is for processing Pulses Per Second. In addition, the 1st IRQ handles the remaining IRQ sources of the IP core. They are all displayed with the same name in /proc/interrupts: | 208: 0 0 0 0 GICv3 150 Level = 30be0000.ethernet | 209: 0 0 0 0 GICv3 151 Level = 30be0000.ethernet | 210: 3898 0 0 0 GICv3 152 Level = 30be0000.ethernet | 211: 0 0 0 0 GICv3 153 Level = 30be0000.ethernet For easier debugging make the name of the IRQ reflect its function. Use the postfix "-RxTx" and the queue number for the first 3 IRQs, add "+misc" for the 1st IRQ. The postfix "-PPS" specifies the PPS IRQ. With this change /proc/interrupts looks like this: | 208: 2 0 0 0 GICv3 150 Level = 30be0000.ethernet-RxTx1 | 209: 0 0 0 0 GICv3 151 Level = 30be0000.ethernet-RxTx2 | 210: 3526 0 0 0 GICv3 152 Level = 30be0000.ethernet-RxTx0+misc | 211: 0 0 0 0 GICv3 153 Level = 30be0000.ethernet-PPS Signed-off-by: Marc Kleine-Budde Reviewed-by: Frank Li --- drivers/net/ethernet/freescale/fec_main.c | 9 ++++++++- drivers/net/ethernet/freescale/fec_ptp.c | 5 ++++- 2 files changed, 12 insertions(+), 2 deletions(-) diff --git a/drivers/net/ethernet/freescale/fec_main.c b/drivers/net/ethern= et/freescale/fec_main.c index f124ffe3619d82dc089f8494d33d2398e6f631fb..c8b2170735e599cd10492169ab3= 2d0e20b28311b 100644 --- a/drivers/net/ethernet/freescale/fec_main.c +++ b/drivers/net/ethernet/freescale/fec_main.c @@ -4492,8 +4492,15 @@ fec_probe(struct platform_device *pdev) goto failed_init; =20 for (i =3D 0; i < irq_cnt; i++) { + const char *dev_name =3D devm_kasprintf(&pdev->dev, GFP_KERNEL, "%s-RxTx= %d%s", + pdev->name, i, i =3D=3D 0 ? "+misc" : ""); int irq_num; =20 + if (!dev_name) { + ret =3D -ENOMEM; + goto failed_irq; + } + if (fep->quirks & FEC_QUIRK_DT_IRQ2_IS_MAIN_IRQ) irq_num =3D (i + irq_cnt - 1) % irq_cnt; else @@ -4508,7 +4515,7 @@ fec_probe(struct platform_device *pdev) goto failed_irq; } ret =3D devm_request_irq(&pdev->dev, irq, fec_enet_interrupt, - 0, pdev->name, ndev); + 0, dev_name, ndev); if (ret) goto failed_irq; =20 diff --git a/drivers/net/ethernet/freescale/fec_ptp.c b/drivers/net/etherne= t/freescale/fec_ptp.c index 8722f623d9e47e385439f1cee8c677e2b95b236d..0ac89fed366a83bcbfc900ea440= 9f4e98c4e14da 100644 --- a/drivers/net/ethernet/freescale/fec_ptp.c +++ b/drivers/net/ethernet/freescale/fec_ptp.c @@ -749,8 +749,11 @@ void fec_ptp_init(struct platform_device *pdev, int ir= q_idx) * only the PTP_CLOCK_PPS clock events should stop */ if (irq >=3D 0) { + const char *dev_name =3D devm_kasprintf(&pdev->dev, GFP_KERNEL, + "%s-PPS", pdev->name); + ret =3D devm_request_irq(&pdev->dev, irq, fec_pps_interrupt, - 0, pdev->name, ndev); + 0, dev_name ? dev_name : pdev->name, ndev); if (ret < 0) dev_warn(&pdev->dev, "request for pps irq failed(%d)\n", ret); --=20 2.45.2 From nobody Tue Nov 26 17:25:47 2024 Received: from metis.whiteo.stw.pengutronix.de (metis.whiteo.stw.pengutronix.de [185.203.201.7]) (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 2B7131D5CFF for ; Wed, 16 Oct 2024 21:52:32 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=185.203.201.7 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1729115556; cv=none; b=OxRQDKUraZQwbnb/7KlmURydDXWFnVXjk2a3Byk0xRvcXRJxLFj8p2N4vnfl7LShM1UiNWW9hjzELICuLeUW2MhGx5XrmcXtdDn+drR7260OY2shd4lOFuqAlBgk4UJ79cDTxZkxBVEs8/PjgdijSzY2yCCXQV6BYgommt1to9Q= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1729115556; c=relaxed/simple; bh=3modV2VgvYS7hcnK3euWQGrdAXopfGcsu0hX01ZRK1c=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=S7eTtcoplkVDH9aXIJ3iKZLB2K5xu4bvsqdofI46v5HN1RRdi33PNAeWOHwNA9OxS7AQSZtzhtbHf7yd/SDnNM/2aGSnCcTCW0BN+v8rOzB/AWzx6jc07hRX+0eknJciWp6JtbWKFXfamfZY0A5LyRr+fr5NYZMyBgjwVBXMRfw= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=pengutronix.de; spf=pass smtp.mailfrom=pengutronix.de; arc=none smtp.client-ip=185.203.201.7 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=pengutronix.de Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=pengutronix.de Received: from drehscheibe.grey.stw.pengutronix.de ([2a0a:edc0:0:c01:1d::a2]) by metis.whiteo.stw.pengutronix.de with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1t1BwU-0003Rn-GK for linux-kernel@vger.kernel.org; Wed, 16 Oct 2024 23:52:30 +0200 Received: from [2a0a:edc0:0:b01:1d::7b] (helo=bjornoya.blackshift.org) by drehscheibe.grey.stw.pengutronix.de with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1t1BwQ-002OUk-Hb for linux-kernel@vger.kernel.org; Wed, 16 Oct 2024 23:52:26 +0200 Received: from dspam.blackshift.org (localhost [127.0.0.1]) by bjornoya.blackshift.org (Postfix) with SMTP id 34BBC354929 for ; Wed, 16 Oct 2024 21:52:26 +0000 (UTC) Received: from hardanger.blackshift.org (unknown [172.20.34.65]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by bjornoya.blackshift.org (Postfix) with ESMTPS id 997B735488D; Wed, 16 Oct 2024 21:52:20 +0000 (UTC) Received: from [172.20.34.65] (localhost [::1]) by hardanger.blackshift.org (OpenSMTPD) with ESMTP id 41ec2a27; Wed, 16 Oct 2024 21:52:19 +0000 (UTC) From: Marc Kleine-Budde Date: Wed, 16 Oct 2024 23:51:57 +0200 Subject: [PATCH net-next 09/13] net: fec: fec_enet_rx_queue(): use same signature as fec_enet_tx_queue() Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Message-Id: <20241016-fec-cleanups-v1-9-de783bd15e6a@pengutronix.de> References: <20241016-fec-cleanups-v1-0-de783bd15e6a@pengutronix.de> In-Reply-To: <20241016-fec-cleanups-v1-0-de783bd15e6a@pengutronix.de> To: Wei Fang , Shenwei Wang , Clark Wang , "David S. Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , Richard Cochran Cc: imx@lists.linux.dev, netdev@vger.kernel.org, linux-kernel@vger.kernel.org, kernel@pengutronix.de, Marc Kleine-Budde X-Mailer: b4 0.15-dev-dedf8 X-Developer-Signature: v=1; a=openpgp-sha256; l=1494; i=mkl@pengutronix.de; h=from:subject:message-id; bh=3modV2VgvYS7hcnK3euWQGrdAXopfGcsu0hX01ZRK1c=; b=owEBbQGS/pANAwAKASg4oj56LbxvAcsmYgBnEDWLMUCGJ7B2kmVE/4WclSRlu7dyPVT/hNfsr ocFFQgxc46JATMEAAEKAB0WIQRQQLqG4LYE3Sm8Pl8oOKI+ei28bwUCZxA1iwAKCRAoOKI+ei28 b4LNB/41HL9fHYATnmHoSeZtgD0bcPKt5OCG3/ZY3CkYfgfed0ASifgg+x6sBSTdITW3XL3wn71 4svi7TKDHgKm0dwJKTyBI3SoJdCWvpQniQZbOKmW0rJ35vdeNhXikfju31MdteUMmSDNDnja4kZ CLtHdHTnkcoRT9v2pMC/Wt+m46OC+JqU/piQDe7z0CnlnFe6DkjBCbfPL2VDxmlxidizwpcIyys idH0dBroUK2n0g4+srD9iJUJDvJT2VmcgTHCUPb4hVKX3nOUID/oz/f4i9wM0ERbkXCEs+aXxSu OsSvUdmzxKRsmNeCzLls0wTqM8jIeM4mKB4HehoEoIWW1rqR X-Developer-Key: i=mkl@pengutronix.de; a=openpgp; fpr=C1400BA0B3989E6FBC7D5B5C2B5EE211C58AEA54 X-SA-Exim-Connect-IP: 2a0a:edc0:0:c01:1d::a2 X-SA-Exim-Mail-From: mkl@pengutronix.de X-SA-Exim-Scanned: No (on metis.whiteo.stw.pengutronix.de); SAEximRunCond expanded to false X-PTX-Original-Recipient: linux-kernel@vger.kernel.org There are the functions fec_enet_rx_queue() and fec_enet_tx_queue(), one for handling the RX queue the other one handles the TX queue. However they don't have the same signature. To make the code more readable make the signature of fec_enet_rx_queue() identical to the signature of fec_enet_tx_queue(). Signed-off-by: Marc Kleine-Budde --- drivers/net/ethernet/freescale/fec_main.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/net/ethernet/freescale/fec_main.c b/drivers/net/ethern= et/freescale/fec_main.c index c8b2170735e599cd10492169ab32d0e20b28311b..eb26e869c026225194f4df66db1= 45494408bfe8a 100644 --- a/drivers/net/ethernet/freescale/fec_main.c +++ b/drivers/net/ethernet/freescale/fec_main.c @@ -1678,7 +1678,7 @@ fec_enet_run_xdp(struct fec_enet_private *fep, struct= bpf_prog *prog, * effectively tossing the packet. */ static int -fec_enet_rx_queue(struct net_device *ndev, int budget, u16 queue_id) +fec_enet_rx_queue(struct net_device *ndev, u16 queue_id, int budget) { struct fec_enet_private *fep =3D netdev_priv(ndev); struct fec_enet_priv_rx_q *rxq; @@ -1899,7 +1899,7 @@ static int fec_enet_rx(struct net_device *ndev, int b= udget) =20 /* Make sure that AVB queues are processed first. */ for (i =3D fep->num_rx_queues - 1; i >=3D 0; i--) - done +=3D fec_enet_rx_queue(ndev, budget - done, i); + done +=3D fec_enet_rx_queue(ndev, i, budget - done); =20 return done; } --=20 2.45.2 From nobody Tue Nov 26 17:25:47 2024 Received: from metis.whiteo.stw.pengutronix.de (metis.whiteo.stw.pengutronix.de [185.203.201.7]) (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 77F401D5CF4 for ; Wed, 16 Oct 2024 21:52:32 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=185.203.201.7 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1729115555; cv=none; b=ibGaP4t56wX22cv+Fap4njXrmI7wG1Hi89CWurEIIB6+dIBSrZMdoBrdFnRNTfcOq8xDpb9pq2XEvRQAkt+O3ZP6x9HR8kGLUKJeOWdckxe5CILE6bt8kwrQ4meiY+MJDEK18VxTAT8h+zIze17xNkX2U/moBECVAIfNxBPZWxU= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1729115555; c=relaxed/simple; bh=cn22VKjfBAbFtPsT2liZvFbvkJqLykwD+CuiacuoiZE=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=I3hYKuJF5u/ob+wJf5mJmMlHu65WSaeT0sj9qawE+kV7S/XS8IQUUffmLJwnZXUnW7Wc1QJUGlc5MM/9VyBWuGyeiwtZSA6582t+hmE4l6bYZeZIVYIz7TgdpjE05JHFBGM9vxrV6biAmnirXbsIVXnmacrZRzOyn2DCJqw2TN8= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=pengutronix.de; spf=pass smtp.mailfrom=pengutronix.de; arc=none smtp.client-ip=185.203.201.7 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=pengutronix.de Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=pengutronix.de Received: from drehscheibe.grey.stw.pengutronix.de ([2a0a:edc0:0:c01:1d::a2]) by metis.whiteo.stw.pengutronix.de with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1t1BwU-0003Rt-Bz for linux-kernel@vger.kernel.org; Wed, 16 Oct 2024 23:52:30 +0200 Received: from [2a0a:edc0:0:b01:1d::7b] (helo=bjornoya.blackshift.org) by drehscheibe.grey.stw.pengutronix.de with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1t1BwQ-002OUs-Hx for linux-kernel@vger.kernel.org; Wed, 16 Oct 2024 23:52:26 +0200 Received: from dspam.blackshift.org (localhost [127.0.0.1]) by bjornoya.blackshift.org (Postfix) with SMTP id 3956C35492E for ; Wed, 16 Oct 2024 21:52:26 +0000 (UTC) Received: from hardanger.blackshift.org (unknown [172.20.34.65]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by bjornoya.blackshift.org (Postfix) with ESMTPS id B5AFF354890; Wed, 16 Oct 2024 21:52:20 +0000 (UTC) Received: from [172.20.34.65] (localhost [::1]) by hardanger.blackshift.org (OpenSMTPD) with ESMTP id 7084427b; Wed, 16 Oct 2024 21:52:19 +0000 (UTC) From: Marc Kleine-Budde Date: Wed, 16 Oct 2024 23:51:58 +0200 Subject: [PATCH net-next 10/13] net: fec: fec_enet_rx_queue(): replace open coded cast by skb_vlan_eth_hdr() Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Message-Id: <20241016-fec-cleanups-v1-10-de783bd15e6a@pengutronix.de> References: <20241016-fec-cleanups-v1-0-de783bd15e6a@pengutronix.de> In-Reply-To: <20241016-fec-cleanups-v1-0-de783bd15e6a@pengutronix.de> To: Wei Fang , Shenwei Wang , Clark Wang , "David S. Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , Richard Cochran Cc: imx@lists.linux.dev, netdev@vger.kernel.org, linux-kernel@vger.kernel.org, kernel@pengutronix.de, Marc Kleine-Budde X-Mailer: b4 0.15-dev-dedf8 X-Developer-Signature: v=1; a=openpgp-sha256; l=1046; i=mkl@pengutronix.de; h=from:subject:message-id; bh=cn22VKjfBAbFtPsT2liZvFbvkJqLykwD+CuiacuoiZE=; b=owEBbQGS/pANAwAKASg4oj56LbxvAcsmYgBnEDWMBWI4xFi8Kwp4d7kTNXyszpOf9JasgZ+qJ ENqBUjL7V2JATMEAAEKAB0WIQRQQLqG4LYE3Sm8Pl8oOKI+ei28bwUCZxA1jAAKCRAoOKI+ei28 b4pXB/0S+MLq7elDcJ9CdljZK4vhQLy5ZMR2hqzxgee8s8zwyDVDtD1Rg6ZrBX6E33sePax7Nuc 0JTBpmB1ZKkOhi10SmUIcwtRuogixrGmPLoHgW8uT4mVTIy1rEZJwTr3RC3KBFfAEfW9x2zntmX AzDBZ/uTz/M7ATRs5yko3ox2oJZizcLxeFqN8PFlyBlxLZOvbmcKhmU5sS3ZJ2yfQ++Gjew8jH4 Vbdk/IaNZRJpTa/e8GBBFxLzb/VKtGsbpghZ969vwvc11FrZ40+uj7MUXNlfeWkazqR/OlAgCED 9t5qkAqBgHGTZVDkYQEeEfDpxN9MMScm+aMcCowqAHN2wxfx X-Developer-Key: i=mkl@pengutronix.de; a=openpgp; fpr=C1400BA0B3989E6FBC7D5B5C2B5EE211C58AEA54 X-SA-Exim-Connect-IP: 2a0a:edc0:0:c01:1d::a2 X-SA-Exim-Mail-From: mkl@pengutronix.de X-SA-Exim-Scanned: No (on metis.whiteo.stw.pengutronix.de); SAEximRunCond expanded to false X-PTX-Original-Recipient: linux-kernel@vger.kernel.org In order to clean up the VLAN handling, replace an open coded cast from skb->data to the vlan header with skb_vlan_eth_hdr(). Signed-off-by: Marc Kleine-Budde Reviewed-by: Frank Li --- drivers/net/ethernet/freescale/fec_main.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/drivers/net/ethernet/freescale/fec_main.c b/drivers/net/ethern= et/freescale/fec_main.c index eb26e869c026225194f4df66db145494408bfe8a..fd7a78ec5fa8ac0f7d141779938= a4690594dbef1 100644 --- a/drivers/net/ethernet/freescale/fec_main.c +++ b/drivers/net/ethernet/freescale/fec_main.c @@ -1819,8 +1819,7 @@ fec_enet_rx_queue(struct net_device *ndev, u16 queue_= id, int budget) fep->bufdesc_ex && (ebdp->cbd_esc & cpu_to_fec32(BD_ENET_RX_VLAN))) { /* Push and remove the vlan tag */ - struct vlan_hdr *vlan_header =3D - (struct vlan_hdr *) (data + ETH_HLEN); + struct vlan_ethhdr *vlan_header =3D skb_vlan_eth_hdr(skb); vlan_tag =3D ntohs(vlan_header->h_vlan_TCI); =20 vlan_packet_rcvd =3D true; --=20 2.45.2 From nobody Tue Nov 26 17:25:47 2024 Received: from metis.whiteo.stw.pengutronix.de (metis.whiteo.stw.pengutronix.de [185.203.201.7]) (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 742FD1D5CF1 for ; Wed, 16 Oct 2024 21:52:32 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=185.203.201.7 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1729115555; cv=none; b=o14phfR5vwixeHUD1ud6zsviS5T9KlMs+wtTWu/eD+Awr6bU/41nylwuB+9oWlIVl0buog9C4hOMp9BVZxAvwXlGxyqrbvEw8HllpYK2miOEDvZMcVWId7BKgblDpa5ojkXSKsbJA8Xpy3rprr9ODV1ATkK8pXBbfcm8TWE0l7M= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1729115555; c=relaxed/simple; bh=YPw2JL2s5w3prN2ZMsgN06qSkXXBNnmLw6B+5/kvkXo=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=uYBmsuJVJNUSbVITY9+sFuvYQpa4dBph03XPZ7AAu2Kw4Z7XO/BqbpqnJ4Rw5DcNLGtnt2GO8W8eRrmuzUWkDkOPNmW5ne4cZ7s9+1tLriCo4Bhj3jQIRup071jmrbgskBc+02o9uII5ruocXaF9bQFPu8t+7KQ0kLR04Ml6RTo= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=pengutronix.de; spf=pass smtp.mailfrom=pengutronix.de; arc=none smtp.client-ip=185.203.201.7 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=pengutronix.de Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=pengutronix.de Received: from drehscheibe.grey.stw.pengutronix.de ([2a0a:edc0:0:c01:1d::a2]) by metis.whiteo.stw.pengutronix.de with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1t1BwU-0003S9-EH for linux-kernel@vger.kernel.org; Wed, 16 Oct 2024 23:52:30 +0200 Received: from [2a0a:edc0:0:b01:1d::7b] (helo=bjornoya.blackshift.org) by drehscheibe.grey.stw.pengutronix.de with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1t1BwQ-002OV8-Q4 for linux-kernel@vger.kernel.org; Wed, 16 Oct 2024 23:52:26 +0200 Received: from dspam.blackshift.org (localhost [127.0.0.1]) by bjornoya.blackshift.org (Postfix) with SMTP id 6A1F6354930 for ; Wed, 16 Oct 2024 21:52:26 +0000 (UTC) Received: from hardanger.blackshift.org (unknown [172.20.34.65]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by bjornoya.blackshift.org (Postfix) with ESMTPS id CF740354894; Wed, 16 Oct 2024 21:52:20 +0000 (UTC) Received: from [172.20.34.65] (localhost [::1]) by hardanger.blackshift.org (OpenSMTPD) with ESMTP id ecf358ac; Wed, 16 Oct 2024 21:52:19 +0000 (UTC) From: Marc Kleine-Budde Date: Wed, 16 Oct 2024 23:51:59 +0200 Subject: [PATCH net-next 11/13] net: fec: fec_enet_rx_queue(): reduce scope of data Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Message-Id: <20241016-fec-cleanups-v1-11-de783bd15e6a@pengutronix.de> References: <20241016-fec-cleanups-v1-0-de783bd15e6a@pengutronix.de> In-Reply-To: <20241016-fec-cleanups-v1-0-de783bd15e6a@pengutronix.de> To: Wei Fang , Shenwei Wang , Clark Wang , "David S. Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , Richard Cochran Cc: imx@lists.linux.dev, netdev@vger.kernel.org, linux-kernel@vger.kernel.org, kernel@pengutronix.de, Marc Kleine-Budde X-Mailer: b4 0.15-dev-dedf8 X-Developer-Signature: v=1; a=openpgp-sha256; l=1470; i=mkl@pengutronix.de; h=from:subject:message-id; bh=YPw2JL2s5w3prN2ZMsgN06qSkXXBNnmLw6B+5/kvkXo=; b=owEBbQGS/pANAwAKASg4oj56LbxvAcsmYgBnEDWOmisc9ytow/ZcpSeZ2tFx3MsYjzMge4v8Q agcYFkU8EaJATMEAAEKAB0WIQRQQLqG4LYE3Sm8Pl8oOKI+ei28bwUCZxA1jgAKCRAoOKI+ei28 bySFCACb18TtP63Ve+Li29gi+Hsm1N7WagjTE5yjJmySfK20qSg6tKa83UxPiCje2n4ZHQAEgDp GRPEfcv+x/QhjTZTREK3ObQd8gK4m6p8EGvxpGF5IXe+fUuSCy+xwIsn0s3Tor3lUryyZa8QFAA uMavAUOmenc0XnNLWfadicKHLSqDZanXZwvZScS1cAWxa3Dl13Ard83b+GH0dYcUB48E8lEF5Ie cm6xoiBhwPbDfcEV31r3SNmVqyU3Wfyv7bNQx3lAid1BfTWPbgTm7uAbUVXJ/BFGtE37ku2LSOu +wszTzNjf2/B+PkCqxnyNrSoK18zRnmzMvcvVUW5vQY2jSlY X-Developer-Key: i=mkl@pengutronix.de; a=openpgp; fpr=C1400BA0B3989E6FBC7D5B5C2B5EE211C58AEA54 X-SA-Exim-Connect-IP: 2a0a:edc0:0:c01:1d::a2 X-SA-Exim-Mail-From: mkl@pengutronix.de X-SA-Exim-Scanned: No (on metis.whiteo.stw.pengutronix.de); SAEximRunCond expanded to false X-PTX-Original-Recipient: linux-kernel@vger.kernel.org In order to clean up of the VLAN handling, reduce the scope of data. Signed-off-by: Marc Kleine-Budde Reviewed-by: Frank Li --- drivers/net/ethernet/freescale/fec_main.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/net/ethernet/freescale/fec_main.c b/drivers/net/ethern= et/freescale/fec_main.c index fd7a78ec5fa8ac0f7d141779938a4690594dbef1..640fbde10861005e7e2eb23358b= feaac49ec1792 100644 --- a/drivers/net/ethernet/freescale/fec_main.c +++ b/drivers/net/ethernet/freescale/fec_main.c @@ -1686,7 +1686,6 @@ fec_enet_rx_queue(struct net_device *ndev, u16 queue_= id, int budget) unsigned short status; struct sk_buff *skb; ushort pkt_len; - __u8 *data; int pkt_received =3D 0; struct bufdesc_ex *ebdp =3D NULL; bool vlan_packet_rcvd =3D false; @@ -1803,10 +1802,11 @@ fec_enet_rx_queue(struct net_device *ndev, u16 queu= e_id, int budget) skb_mark_for_recycle(skb); =20 if (unlikely(need_swap)) { + u8 *data; + data =3D page_address(page) + FEC_ENET_XDP_HEADROOM; swap_buffer(data, pkt_len); } - data =3D skb->data; =20 /* Extract the enhanced buffer descriptor */ ebdp =3D NULL; @@ -1824,7 +1824,7 @@ fec_enet_rx_queue(struct net_device *ndev, u16 queue_= id, int budget) =20 vlan_packet_rcvd =3D true; =20 - memmove(skb->data + VLAN_HLEN, data, ETH_ALEN * 2); + memmove(skb->data + VLAN_HLEN, skb->data, ETH_ALEN * 2); skb_pull(skb, VLAN_HLEN); } =20 --=20 2.45.2 From nobody Tue Nov 26 17:25:47 2024 Received: from metis.whiteo.stw.pengutronix.de (metis.whiteo.stw.pengutronix.de [185.203.201.7]) (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 7233C1D5CEE for ; Wed, 16 Oct 2024 21:52:32 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=185.203.201.7 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1729115555; cv=none; b=cyb/NhCfD2oq0Jy4kSYFMi7b++oUvGMhdsTYj6tb5YwskqB88GKqpARc4zd8FmGFIcJgF+7QwZnjNNeOO5CWDc0JiREpWV+ergQ9zowXYpRuyhqBSLu+sTfIBz+13xx0aX/CMZjX7YmTMwbXRhn821nisn4GUDq8fICZUQmfhRY= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1729115555; c=relaxed/simple; bh=Ke1G/ZKCyRRJ98ZUhFIVjb9Fx2m+IK5e86tb9C1Avr4=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=Y0ApCtWvcmxllfTSZNiQY39IqWuOBYtAKBacyyG81nD9q3y+I5+6CnrTGBirRWPG8bqnMtfex7nYwCnV3FRrGGPxVnxISWXez0Y1ixahzKaiS4aXRnsNBknFwOtXIh/94kSWX2/pyH5BuaVbvYGiHoRtgI0jnGye5PY4Cj26xU4= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=pengutronix.de; spf=pass smtp.mailfrom=pengutronix.de; arc=none smtp.client-ip=185.203.201.7 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=pengutronix.de Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=pengutronix.de Received: from drehscheibe.grey.stw.pengutronix.de ([2a0a:edc0:0:c01:1d::a2]) by metis.whiteo.stw.pengutronix.de with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1t1BwU-0003SA-G1 for linux-kernel@vger.kernel.org; Wed, 16 Oct 2024 23:52:30 +0200 Received: from [2a0a:edc0:0:b01:1d::7b] (helo=bjornoya.blackshift.org) by drehscheibe.grey.stw.pengutronix.de with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1t1BwQ-002OVH-Q5 for linux-kernel@vger.kernel.org; Wed, 16 Oct 2024 23:52:26 +0200 Received: from dspam.blackshift.org (localhost [127.0.0.1]) by bjornoya.blackshift.org (Postfix) with SMTP id 720EF354936 for ; Wed, 16 Oct 2024 21:52:26 +0000 (UTC) Received: from hardanger.blackshift.org (unknown [172.20.34.65]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by bjornoya.blackshift.org (Postfix) with ESMTPS id EBCA5354897; Wed, 16 Oct 2024 21:52:20 +0000 (UTC) Received: from [172.20.34.65] (localhost [::1]) by hardanger.blackshift.org (OpenSMTPD) with ESMTP id 5b003133; Wed, 16 Oct 2024 21:52:19 +0000 (UTC) From: Marc Kleine-Budde Date: Wed, 16 Oct 2024 23:52:00 +0200 Subject: [PATCH net-next 12/13] net: fec: fec_enet_rx_queue(): move_call to _vlan_hwaccel_put_tag() Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Message-Id: <20241016-fec-cleanups-v1-12-de783bd15e6a@pengutronix.de> References: <20241016-fec-cleanups-v1-0-de783bd15e6a@pengutronix.de> In-Reply-To: <20241016-fec-cleanups-v1-0-de783bd15e6a@pengutronix.de> To: Wei Fang , Shenwei Wang , Clark Wang , "David S. Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , Richard Cochran Cc: imx@lists.linux.dev, netdev@vger.kernel.org, linux-kernel@vger.kernel.org, kernel@pengutronix.de, Marc Kleine-Budde X-Mailer: b4 0.15-dev-dedf8 X-Developer-Signature: v=1; a=openpgp-sha256; l=2273; i=mkl@pengutronix.de; h=from:subject:message-id; bh=Ke1G/ZKCyRRJ98ZUhFIVjb9Fx2m+IK5e86tb9C1Avr4=; b=owEBbQGS/pANAwAKASg4oj56LbxvAcsmYgBnEDWPx5p84klDfyXzAeG6lUq48HMH/LzMiHcqw wZKURrN7BCJATMEAAEKAB0WIQRQQLqG4LYE3Sm8Pl8oOKI+ei28bwUCZxA1jwAKCRAoOKI+ei28 b2RgB/9NEMqmM7u51r2Fw5sFLt2J7C1P2pCqzQ8HbOBSlRbAObB6TOH/9rQjDkg5JM0DMJL7MUu l/u7wBGnbgCTyx7M9U6ijbdO4I71TeAjkgNVRH1bNLkOU1Od/fW1hCwbhYif04vb6n4yWR79obZ m13N9yubGEgxLu+cOfQJopXh/p5XRmkiNY6q4fsEBV4druoZuLywr4MnpB4WQyqBLV5QJP2ZGsx xr25q1Olh5Ok4AgNjfkcnqlFpYk4bg9QgFNx3hJMgPV+oGcVQQJNfALpxC1W1x5UXtd8t/dd0ZD i2WaafbyRbNBAOvi1/dztNKaUMzTHAa14LU2mFQ7Y3DxDMww X-Developer-Key: i=mkl@pengutronix.de; a=openpgp; fpr=C1400BA0B3989E6FBC7D5B5C2B5EE211C58AEA54 X-SA-Exim-Connect-IP: 2a0a:edc0:0:c01:1d::a2 X-SA-Exim-Mail-From: mkl@pengutronix.de X-SA-Exim-Scanned: No (on metis.whiteo.stw.pengutronix.de); SAEximRunCond expanded to false X-PTX-Original-Recipient: linux-kernel@vger.kernel.org To clean up the VLAN handling, move the call to __vlan_hwaccel_put_tag() into the body of the if statement, which checks for VLAN handling in the first place. This allows to remove vlan_packet_rcvd and reduce the scope of vlan_tag. Signed-off-by: Marc Kleine-Budde Reviewed-by: Frank Li --- drivers/net/ethernet/freescale/fec_main.c | 16 ++++------------ 1 file changed, 4 insertions(+), 12 deletions(-) diff --git a/drivers/net/ethernet/freescale/fec_main.c b/drivers/net/ethern= et/freescale/fec_main.c index 640fbde10861005e7e2eb23358bfeaac49ec1792..d9415c7c16cea3fc3d91e198c21= af9fe9e21747e 100644 --- a/drivers/net/ethernet/freescale/fec_main.c +++ b/drivers/net/ethernet/freescale/fec_main.c @@ -1688,8 +1688,6 @@ fec_enet_rx_queue(struct net_device *ndev, u16 queue_= id, int budget) ushort pkt_len; int pkt_received =3D 0; struct bufdesc_ex *ebdp =3D NULL; - bool vlan_packet_rcvd =3D false; - u16 vlan_tag; int index =3D 0; bool need_swap =3D fep->quirks & FEC_QUIRK_SWAP_FRAME; struct bpf_prog *xdp_prog =3D READ_ONCE(fep->xdp_prog); @@ -1814,18 +1812,18 @@ fec_enet_rx_queue(struct net_device *ndev, u16 queu= e_id, int budget) ebdp =3D (struct bufdesc_ex *)bdp; =20 /* If this is a VLAN packet remove the VLAN Tag */ - vlan_packet_rcvd =3D false; if ((ndev->features & NETIF_F_HW_VLAN_CTAG_RX) && fep->bufdesc_ex && (ebdp->cbd_esc & cpu_to_fec32(BD_ENET_RX_VLAN))) { /* Push and remove the vlan tag */ struct vlan_ethhdr *vlan_header =3D skb_vlan_eth_hdr(skb); - vlan_tag =3D ntohs(vlan_header->h_vlan_TCI); - - vlan_packet_rcvd =3D true; + u16 vlan_tag =3D ntohs(vlan_header->h_vlan_TCI); =20 memmove(skb->data + VLAN_HLEN, skb->data, ETH_ALEN * 2); skb_pull(skb, VLAN_HLEN); + __vlan_hwaccel_put_tag(skb, + htons(ETH_P_8021Q), + vlan_tag); } =20 skb->protocol =3D eth_type_trans(skb, ndev); @@ -1845,12 +1843,6 @@ fec_enet_rx_queue(struct net_device *ndev, u16 queue= _id, int budget) } } =20 - /* Handle received VLAN packets */ - if (vlan_packet_rcvd) - __vlan_hwaccel_put_tag(skb, - htons(ETH_P_8021Q), - vlan_tag); - skb_record_rx_queue(skb, queue_id); napi_gro_receive(&fep->napi, skb); =20 --=20 2.45.2 From nobody Tue Nov 26 17:25:47 2024 Received: from metis.whiteo.stw.pengutronix.de (metis.whiteo.stw.pengutronix.de [185.203.201.7]) (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 6FEFC1D2F6D for ; Wed, 16 Oct 2024 21:52:32 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=185.203.201.7 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1729115555; cv=none; b=Zr4it6rQnlz3BqZPQrPV2a1nO4wTB9O8NOSmktv2ZQV3w8hUy/xPl8RhvEYTLQJY9lyCExmI1NSzwBcY8qMGeDJ51TJoyF7/ma+1us8NYfaz1HN+Q9hAMkbvFKVAkjgil7pARSf0B3XZ6siogi9RHV7yGo0vkEjTRSJB+38daNU= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1729115555; c=relaxed/simple; bh=MLw/OjJP6cNXgUpE4sPWYT6eX3+hx3P7ZwIqHofemPU=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=LpskmcSbEjA0ByUzBiNmyCh62lR4Flw1fRXyi2ElbwTu6gB71fjJftle2TYzymyQPzYnTsHd8o1Bu58QXG/YCJHpReE2fJEl6fI650BYJuQfGvp1XloQl70jn47xb1+ma3nb+KCg/eSlbAOoaUUwcyIwP0xRGA1Odn81fd9s0Dw= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=pengutronix.de; spf=pass smtp.mailfrom=pengutronix.de; arc=none smtp.client-ip=185.203.201.7 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=pengutronix.de Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=pengutronix.de Received: from drehscheibe.grey.stw.pengutronix.de ([2a0a:edc0:0:c01:1d::a2]) by metis.whiteo.stw.pengutronix.de with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1t1BwU-0003SM-Gj for linux-kernel@vger.kernel.org; Wed, 16 Oct 2024 23:52:30 +0200 Received: from [2a0a:edc0:0:b01:1d::7b] (helo=bjornoya.blackshift.org) by drehscheibe.grey.stw.pengutronix.de with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1t1BwQ-002OVB-Qb for linux-kernel@vger.kernel.org; Wed, 16 Oct 2024 23:52:26 +0200 Received: from dspam.blackshift.org (localhost [127.0.0.1]) by bjornoya.blackshift.org (Postfix) with SMTP id 70FB7354932 for ; Wed, 16 Oct 2024 21:52:26 +0000 (UTC) Received: from hardanger.blackshift.org (unknown [172.20.34.65]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by bjornoya.blackshift.org (Postfix) with ESMTPS id 1449935489A; Wed, 16 Oct 2024 21:52:21 +0000 (UTC) Received: from [172.20.34.65] (localhost [::1]) by hardanger.blackshift.org (OpenSMTPD) with ESMTP id 2489b82c; Wed, 16 Oct 2024 21:52:19 +0000 (UTC) From: Marc Kleine-Budde Date: Wed, 16 Oct 2024 23:52:01 +0200 Subject: [PATCH net-next 13/13] net: fec: fec_enet_rx_queue(): factor out VLAN handling into separate function fec_enet_rx_vlan() Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Message-Id: <20241016-fec-cleanups-v1-13-de783bd15e6a@pengutronix.de> References: <20241016-fec-cleanups-v1-0-de783bd15e6a@pengutronix.de> In-Reply-To: <20241016-fec-cleanups-v1-0-de783bd15e6a@pengutronix.de> To: Wei Fang , Shenwei Wang , Clark Wang , "David S. Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , Richard Cochran Cc: imx@lists.linux.dev, netdev@vger.kernel.org, linux-kernel@vger.kernel.org, kernel@pengutronix.de, Marc Kleine-Budde X-Mailer: b4 0.15-dev-dedf8 X-Developer-Signature: v=1; a=openpgp-sha256; l=2282; i=mkl@pengutronix.de; h=from:subject:message-id; bh=MLw/OjJP6cNXgUpE4sPWYT6eX3+hx3P7ZwIqHofemPU=; b=owEBbQGS/pANAwAKASg4oj56LbxvAcsmYgBnEDWRgqGybH94bTPvg7nSPQVDwSx23chmG6x6L rSto0ZM+8CJATMEAAEKAB0WIQRQQLqG4LYE3Sm8Pl8oOKI+ei28bwUCZxA1kQAKCRAoOKI+ei28 b1KIB/0Qcyrj8IXmsPuKwCaj7/dfZALaen5kPt+GX0j437FFoKpmt/VE7xkLdO5pLY2u/4QxnpZ tEFXCn3jALofRZxBK1ghVuoj6BlbRIcJ7/KCfcz1G8s/+wLBwQlycxzyGcqhP4X8b47Ifje5GX2 tl0Tl2fFCtoN2yOQBaM6hEW2zKFtJWdSLN17HpBgKFyOgulmUgdJDZs/7Ipcc+LHlICtX7XLPlE Kbpo0vg6jkYkM3EpVXXJt9vwQfapOEiTpSFGgpErUAItNwGTenEheKQoRQxIgCJDQ4DjScAOT9l hvm/L2UmgfqSEJ6JaKbeEfEeV/1rzvjOBQH/cq94alqczwjL X-Developer-Key: i=mkl@pengutronix.de; a=openpgp; fpr=C1400BA0B3989E6FBC7D5B5C2B5EE211C58AEA54 X-SA-Exim-Connect-IP: 2a0a:edc0:0:c01:1d::a2 X-SA-Exim-Mail-From: mkl@pengutronix.de X-SA-Exim-Scanned: No (on metis.whiteo.stw.pengutronix.de); SAEximRunCond expanded to false X-PTX-Original-Recipient: linux-kernel@vger.kernel.org In order to clean up of the VLAN handling, factor out the VLAN handling into separate function fec_enet_rx_vlan(). Signed-off-by: Marc Kleine-Budde Reviewed-by: Frank Li --- drivers/net/ethernet/freescale/fec_main.c | 32 ++++++++++++++++++---------= ---- 1 file changed, 19 insertions(+), 13 deletions(-) diff --git a/drivers/net/ethernet/freescale/fec_main.c b/drivers/net/ethern= et/freescale/fec_main.c index d9415c7c16cea3fc3d91e198c21af9fe9e21747e..e14000ba85586b9cd73151e6292= 4c3b4597bb580 100644 --- a/drivers/net/ethernet/freescale/fec_main.c +++ b/drivers/net/ethernet/freescale/fec_main.c @@ -1672,6 +1672,22 @@ fec_enet_run_xdp(struct fec_enet_private *fep, struc= t bpf_prog *prog, return ret; } =20 +static void fec_enet_rx_vlan(struct net_device *ndev, struct sk_buff *skb) +{ + struct vlan_ethhdr *vlan_header =3D skb_vlan_eth_hdr(skb); + + if (ndev->features & NETIF_F_HW_VLAN_CTAG_RX) { + /* Push and remove the vlan tag */ + u16 vlan_tag =3D ntohs(vlan_header->h_vlan_TCI); + + memmove(skb->data + VLAN_HLEN, skb->data, ETH_ALEN * 2); + skb_pull(skb, VLAN_HLEN); + __vlan_hwaccel_put_tag(skb, + htons(ETH_P_8021Q), + vlan_tag); + } +} + /* During a receive, the bd_rx.cur points to the current incoming buffer. * When we update through the ring, if the next incoming buffer has * not been given to the system, we just set the empty indicator, @@ -1812,19 +1828,9 @@ fec_enet_rx_queue(struct net_device *ndev, u16 queue= _id, int budget) ebdp =3D (struct bufdesc_ex *)bdp; =20 /* If this is a VLAN packet remove the VLAN Tag */ - if ((ndev->features & NETIF_F_HW_VLAN_CTAG_RX) && - fep->bufdesc_ex && - (ebdp->cbd_esc & cpu_to_fec32(BD_ENET_RX_VLAN))) { - /* Push and remove the vlan tag */ - struct vlan_ethhdr *vlan_header =3D skb_vlan_eth_hdr(skb); - u16 vlan_tag =3D ntohs(vlan_header->h_vlan_TCI); - - memmove(skb->data + VLAN_HLEN, skb->data, ETH_ALEN * 2); - skb_pull(skb, VLAN_HLEN); - __vlan_hwaccel_put_tag(skb, - htons(ETH_P_8021Q), - vlan_tag); - } + if (fep->bufdesc_ex && + (ebdp->cbd_esc & cpu_to_fec32(BD_ENET_RX_VLAN))) + fec_enet_rx_vlan(ndev, skb); =20 skb->protocol =3D eth_type_trans(skb, ndev); =20 --=20 2.45.2