From nobody Thu Oct 9 13:19:08 2025 Received: from glittertind.blackshift.org (glittertind.blackshift.org [116.203.23.228]) (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 8F1A821882F for ; Tue, 17 Jun 2025 13:25:32 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=116.203.23.228 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1750166737; cv=none; b=gvHe5q2OlnMThQkmkipe0ShCzK9lvLxPzUYxe0sRJmb1f4GPt1cqd3/8MlZiB/xMvZf+oyeyISeWa73PUk10jChGYsKPo44biabeGnxr/IpLRrUaNP6zpV0JDZmLW2EDXHIUW2C5V6GHAjr3/9C9f7ZjOttZjXf8ytv2lCOC5lw= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1750166737; c=relaxed/simple; bh=TImvkETCV7p7PD/nkYjqoMCUVxOt2SMtL7fqY4urm/k=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=BnZtP1vrX8Nvyt1S1HI2VP2fE8MMSNhGc+6o9kKfSSdNM9A8L1ODCNGusKaRFnwnK9bSRyFVacXTK/QmFSOchajBwCJGZr623uPby0uTzd1SVK32p343wxQ4IB2wT8prMZUbKkzNrAZN1KDfHKkViSNXWlUFsr9poAt9mI77rJ4= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=pengutronix.de; spf=none smtp.mailfrom=hardanger.blackshift.org; arc=none smtp.client-ip=116.203.23.228 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=pengutronix.de Authentication-Results: smtp.subspace.kernel.org; spf=none smtp.mailfrom=hardanger.blackshift.org Received: from bjornoya.blackshift.org (unknown [IPv6:2003:e3:7f3d:bb00:e2bf:c3f2:96ab:885d]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (secp384r1) client-signature RSA-PSS (4096 bits)) (Client CN "bjornoya.blackshift.org", Issuer "R10" (verified OK)) by glittertind.blackshift.org (Postfix) with ESMTPS id 38C2F66ECEB for ; Tue, 17 Jun 2025 13:25:25 +0000 (UTC) Received: from dspam.blackshift.org (localhost [127.0.0.1]) by bjornoya.blackshift.org (Postfix) with SMTP id 091D042A7EE for ; Tue, 17 Jun 2025 13:25:24 +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 48DD742A79F; Tue, 17 Jun 2025 13:25:21 +0000 (UTC) Received: from hardanger.blackshift.org (localhost [::1]) by hardanger.blackshift.org (OpenSMTPD) with ESMTP id d3cf84ce; Tue, 17 Jun 2025 13:25:20 +0000 (UTC) From: Marc Kleine-Budde Date: Tue, 17 Jun 2025 15:24:51 +0200 Subject: [PATCH net-next v3 01/10] 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: <20250617-fec-cleanups-v3-1-a57bfb38993f@pengutronix.de> References: <20250617-fec-cleanups-v3-0-a57bfb38993f@pengutronix.de> In-Reply-To: <20250617-fec-cleanups-v3-0-a57bfb38993f@pengutronix.de> To: Wei Fang , Shenwei Wang , Clark Wang , "David S. Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , Richard Cochran , Andrew Lunn Cc: imx@lists.linux.dev, netdev@vger.kernel.org, linux-kernel@vger.kernel.org, kernel@pengutronix.de, Marc Kleine-Budde , Frank Li , Andrew Lunn X-Mailer: b4 0.15-dev-6f78e X-Developer-Signature: v=1; a=openpgp-sha256; l=4516; i=mkl@pengutronix.de; h=from:subject:message-id; bh=TImvkETCV7p7PD/nkYjqoMCUVxOt2SMtL7fqY4urm/k=; b=owEBbQGS/pANAwAKAQx0Zd/5kJGcAcsmYgBoUWytwDPvtd0e58KNOg78Bh4TylXt97nz2P6WQ iHOto3SHJqJATMEAAEKAB0WIQSf+wzYr2eoX/wVbPMMdGXf+ZCRnAUCaFFsrQAKCRAMdGXf+ZCR nOzqCACxZjDBH2bnOn/nt5AsrRRuRBOlvGIz7DfSB9eDthimBkxYO5nAwkuEbaZVFt5IyJEkBR+ azoTFqxPV+xY3NZ97LOJZvleHUTXhHDIfGz7DK2+1HNwS1G765wIXtkJH3gLm2d4eYmZxoPGBnV H3HZvYc1yU36k73CKG3rpkXqk6+Qei9Pw9IHJNJCzfgRamwoB1jfd47fSDJPBJFSNsytjRgiVPX mlv/E5p1y+Gt76Tqk24FzpgCPqWfJITfZyM0aorGFCOi5hZQHTPebfeyLqhH80T8SqAdUZtoZse XGoLha5zE9dcVQWkrUHV4a+/Ad/B745GLrzcX8rhg0qUoe58 X-Developer-Key: i=mkl@pengutronix.de; a=openpgp; fpr=C1400BA0B3989E6FBC7D5B5C2B5EE211C58AEA54 codespell has found some typos in the comments, fix them. Reviewed-by: Wei Fang Reviewed-by: Frank Li Reviewed-by: Cs=C3=B3k=C3=A1s, Bence Reviewed-by: Andrew Lunn Signed-off-by: Marc Kleine-Budde --- drivers/net/ethernet/freescale/fec.h | 8 ++++---- drivers/net/ethernet/freescale/fec_mpc52xx.c | 2 +- drivers/net/ethernet/freescale/fec_ptp.c | 4 ++-- 3 files changed, 7 insertions(+), 7 deletions(-) diff --git a/drivers/net/ethernet/freescale/fec.h b/drivers/net/ethernet/fr= eescale/fec.h index c81f2ea588f2..3cce9bba5dee 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_mpc52xx.c b/drivers/net/eth= ernet/freescale/fec_mpc52xx.c index 2bfaf14f65c8..3fc29afc9854 100644 --- a/drivers/net/ethernet/freescale/fec_mpc52xx.c +++ b/drivers/net/ethernet/freescale/fec_mpc52xx.c @@ -619,7 +619,7 @@ static void mpc52xx_fec_hw_init(struct net_device *dev) out_be32(&fec->rfifo_alarm, 0x0000030c); out_be32(&fec->tfifo_alarm, 0x00000100); =20 - /* begin transmittion when 256 bytes are in FIFO (or EOF or FIFO full) */ + /* begin transmission when 256 bytes are in FIFO (or EOF or FIFO full) */ out_be32(&fec->x_wmrk, FEC_FIFO_WMRK_256B); =20 /* enable crc generation */ diff --git a/drivers/net/ethernet/freescale/fec_ptp.c b/drivers/net/etherne= t/freescale/fec_ptp.c index 876d90832596..d6d9f0d6ca99 100644 --- a/drivers/net/ethernet/freescale/fec_ptp.c +++ b/drivers/net/ethernet/freescale/fec_ptp.c @@ -117,7 +117,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 enables the PPS output on the timer channel. */ static int fec_ptp_enable_pps(struct fec_enet_private *fep, uint enable) { @@ -172,7 +172,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.47.2 From nobody Thu Oct 9 13:19:08 2025 Received: from glittertind.blackshift.org (glittertind.blackshift.org [116.203.23.228]) (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 89F4728CF65 for ; Tue, 17 Jun 2025 13:25:32 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=116.203.23.228 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1750166734; cv=none; b=ulOH6XruoBueOcrMCzf6gIJIBf3c38ih3lT7/g0pgcmNqv+dhyq35MhVCLKFEdLEG2AP/JPiS+KazSuBRopsDXFhdPInQZwhfWTpWDu2uCuK3eSrvxZ3vG3+Z2BItqKh6N9aQtUQuNBRhYdKl8Dr2M/MgnJdTpwFJHIvYPnpZgw= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1750166734; c=relaxed/simple; bh=sA04u1PdDgRmLuhc7IHhWUv+JPtsYb7W1PMpqmuQz+g=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=mbpyCENgQfjeiQJWrN5tkck8WJ2lcvqn98mkIweD1qEnaGeRBieGeffGAwxPaupvCjDHWlCeKCmAfHOOmnOQd+6yA8pv+zJkFjOyVbunYOCGaDPBMUW7r2o2ieCv66ZFh9Qw1szvPKlaTrlHmxi5DzwvlZN4oETUu51l4DkvEww= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=pengutronix.de; spf=none smtp.mailfrom=hardanger.blackshift.org; arc=none smtp.client-ip=116.203.23.228 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=pengutronix.de Authentication-Results: smtp.subspace.kernel.org; spf=none smtp.mailfrom=hardanger.blackshift.org Received: from bjornoya.blackshift.org (unknown [IPv6:2003:e3:7f3d:bb00:e2bf:c3f2:96ab:885d]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (secp384r1) client-signature RSA-PSS (4096 bits)) (Client CN "bjornoya.blackshift.org", Issuer "R10" (verified OK)) by glittertind.blackshift.org (Postfix) with ESMTPS id 47DE966ECED for ; Tue, 17 Jun 2025 13:25:25 +0000 (UTC) Received: from dspam.blackshift.org (localhost [127.0.0.1]) by bjornoya.blackshift.org (Postfix) with SMTP id 198A042A7F0 for ; Tue, 17 Jun 2025 13:25:25 +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 5912342A7A0; Tue, 17 Jun 2025 13:25:21 +0000 (UTC) Received: from hardanger.blackshift.org (localhost [::1]) by hardanger.blackshift.org (OpenSMTPD) with ESMTP id 5de7fef6; Tue, 17 Jun 2025 13:25:20 +0000 (UTC) From: Marc Kleine-Budde Date: Tue, 17 Jun 2025 15:24:52 +0200 Subject: [PATCH net-next v3 02/10] 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: <20250617-fec-cleanups-v3-2-a57bfb38993f@pengutronix.de> References: <20250617-fec-cleanups-v3-0-a57bfb38993f@pengutronix.de> In-Reply-To: <20250617-fec-cleanups-v3-0-a57bfb38993f@pengutronix.de> To: Wei Fang , Shenwei Wang , Clark Wang , "David S. Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , Richard Cochran , Andrew Lunn Cc: imx@lists.linux.dev, netdev@vger.kernel.org, linux-kernel@vger.kernel.org, kernel@pengutronix.de, Marc Kleine-Budde , Frank Li , Andrew Lunn X-Mailer: b4 0.15-dev-6f78e X-Developer-Signature: v=1; a=openpgp-sha256; l=1013; i=mkl@pengutronix.de; h=from:subject:message-id; bh=sA04u1PdDgRmLuhc7IHhWUv+JPtsYb7W1PMpqmuQz+g=; b=owEBbQGS/pANAwAKAQx0Zd/5kJGcAcsmYgBoUWyvSCJ0U4ZK6rvs4QmjRvoApMNKLKPvQJO6J koIGM7ZtImJATMEAAEKAB0WIQSf+wzYr2eoX/wVbPMMdGXf+ZCRnAUCaFFsrwAKCRAMdGXf+ZCR nCLmCACZLmnH7FBEwBptt5ZIYehRK0klWwgstNt72x1ZUNLTJLB7SMBEYUvYOeFpGTa/LM09i7P pHwMhZb/uXpxiGyTKhu9n4qQ2eKh6rB9Pfw1wacIWjpI5TOhVU1I/ZbwaoPGK60OfYolhJhga3Q SV8naIm1WKt1zLUUwQbz7gXmvNh2pcj5D2z5R9Hv+mVE+Y0z7tYeTIU5IwIr7IP1W5ZIGruG7Vg /2ceDG5EpkZQtk/GUwbKFmy6xw1usE+NZXAD+uYwFM/Qwk1xZccAzFwQITIiErbXIyL8jGf9ZTs qd7trbm30FYSCgr3D2hXmaj3hXEjym160YHJDj24CbyRnTuH X-Developer-Key: i=mkl@pengutronix.de; a=openpgp; fpr=C1400BA0B3989E6FBC7D5B5C2B5EE211C58AEA54 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. Reviewed-by: Wei Fang Reviewed-by: Frank Li Reviewed-by: Andrew Lunn Signed-off-by: Marc Kleine-Budde --- 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 3cce9bba5dee..ce1e4fe4d492 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.47.2 From nobody Thu Oct 9 13:19:08 2025 Received: from glittertind.blackshift.org (glittertind.blackshift.org [116.203.23.228]) (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 195262E266C for ; Tue, 17 Jun 2025 13:25:35 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=116.203.23.228 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1750166737; cv=none; b=Go3z5X/+NtBzPMRX/K81jnAbOwnXP8/943JR6FFlyCFmF9O7sBa+C6irx++lOuNnGNCcflPCun2KYZXEjndQeGohRNNItYDdFbPnfeVpFAXTGTR1zPBbXr+xbi8iV0bPzIbAIftsoQqEDduPOCGJkVzCfQeYVmk80ebXdKBQOlc= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1750166737; c=relaxed/simple; bh=C7u2HEdoCzfwHVxcovppiUJv1u62o6XhC9gcCwFeaqs=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=YvpWjEhkPZxsmDUjWOMzAjiT2RbK7tWbIpzTU6XWyapk3X8Dv+CctJTUIgyZX/wLb0O6baf+48dMvzJo2+sBPs6T63ML7OuQJpw1Nyy2qWtc2fW8bWFwY3iiwz2tX+cK08bh1RZul628qyBckAzGAJ2yKutrUmugUy9fj7jsFFk= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=pengutronix.de; spf=none smtp.mailfrom=hardanger.blackshift.org; arc=none smtp.client-ip=116.203.23.228 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=pengutronix.de Authentication-Results: smtp.subspace.kernel.org; spf=none smtp.mailfrom=hardanger.blackshift.org Received: from bjornoya.blackshift.org (unknown [IPv6:2003:e3:7f3d:bb00:e2bf:c3f2:96ab:885d]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (secp384r1) client-signature RSA-PSS (4096 bits)) (Client CN "bjornoya.blackshift.org", Issuer "R10" (verified OK)) by glittertind.blackshift.org (Postfix) with ESMTPS id 8192B66ECF1 for ; Tue, 17 Jun 2025 13:25:25 +0000 (UTC) Received: from dspam.blackshift.org (localhost [127.0.0.1]) by bjornoya.blackshift.org (Postfix) with SMTP id 4E51442A7F4 for ; Tue, 17 Jun 2025 13:25:25 +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 7B56242A7A2; Tue, 17 Jun 2025 13:25:21 +0000 (UTC) Received: from hardanger.blackshift.org (localhost [::1]) by hardanger.blackshift.org (OpenSMTPD) with ESMTP id 69428842; Tue, 17 Jun 2025 13:25:20 +0000 (UTC) From: Marc Kleine-Budde Date: Tue, 17 Jun 2025 15:24:53 +0200 Subject: [PATCH net-next v3 03/10] 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: <20250617-fec-cleanups-v3-3-a57bfb38993f@pengutronix.de> References: <20250617-fec-cleanups-v3-0-a57bfb38993f@pengutronix.de> In-Reply-To: <20250617-fec-cleanups-v3-0-a57bfb38993f@pengutronix.de> To: Wei Fang , Shenwei Wang , Clark Wang , "David S. Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , Richard Cochran , Andrew Lunn Cc: imx@lists.linux.dev, netdev@vger.kernel.org, linux-kernel@vger.kernel.org, kernel@pengutronix.de, Marc Kleine-Budde , Frank Li , Andrew Lunn X-Mailer: b4 0.15-dev-6f78e X-Developer-Signature: v=1; a=openpgp-sha256; l=939; i=mkl@pengutronix.de; h=from:subject:message-id; bh=C7u2HEdoCzfwHVxcovppiUJv1u62o6XhC9gcCwFeaqs=; b=owEBbQGS/pANAwAKAQx0Zd/5kJGcAcsmYgBoUWyxA7p8Skd3j//ggtCM07WHKIXP/je/+RrLe bpDnhZsKHWJATMEAAEKAB0WIQSf+wzYr2eoX/wVbPMMdGXf+ZCRnAUCaFFssQAKCRAMdGXf+ZCR nEVoB/4vxWTm1tswfGFHCBBNxBj63PhMZ/h5EBu+CwuwkQzlGttfy+3z98nj34UkX4i0713Gqtn 6KkysiSKiV7jgbx0ADByTkdTQBQooFJ3awqwuhlAdrveuLkcA3dWH+i6Ppz2pewV76/CLDY3Muy aOlB/QfUpaJZxTHz1xnH4IcBLKDUtPRrS1clMTvOvcwhTQ3o3PGued9N4rbfHh+FCD8TehsIYdM 8PhLM10YysvZqFWCOlJFNhudmJsS5b28wUvt2FJbGeugD/i9uz9fHbN4h3AaqApFaKuNVxm4mb/ 0zRlKRsnHYAt/i6APnFH1to41newJ3sUgP5qXPbsmKeoaUjX X-Developer-Key: i=mkl@pengutronix.de; a=openpgp; fpr=C1400BA0B3989E6FBC7D5B5C2B5EE211C58AEA54 The fec.h isn't self contained. Add missing header files, so that it can be parsed by language servers without errors. Reviewed-by: Wei Fang Reviewed-by: Frank Li Reviewed-by: Andrew Lunn Signed-off-by: Marc Kleine-Budde --- 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 ce1e4fe4d492..4098d439a6ff 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.47.2 From nobody Thu Oct 9 13:19:08 2025 Received: from glittertind.blackshift.org (glittertind.blackshift.org [116.203.23.228]) (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 19E392E266D for ; Tue, 17 Jun 2025 13:25:35 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=116.203.23.228 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1750166737; cv=none; b=VPX+9zHCNU+9Y544efKlSAdc0VzlYj0lQd9D6BfiE5UWmfIj6IoaedBCZK4fsZyDVsksP/v5IjcUgp1qf+M1v5l763iukZ95ckwpW4M1Tef/25C4s64vm06rnhtkoqoy3fK//0hrV3sdIMkGJjJLpR8RhyLhw7ou6xnOSrJXFwA= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1750166737; c=relaxed/simple; bh=bZbKu9frw/vFoCdNCqD5fqyOM78ardIlyR+M1e+RRjI=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=Et3g/0LfM/VwzCNZiBemdMfVBwuqoy58UjRBU+TThFo7pccQUpLqMIKk/esYldL7GhH8JQ5Ou6LW+/pdEZh74cBNl2dSyW2If/w6RdY+l33UFD73b50vcLyzptVC6h+z3BVj5GMLXcDQ9wn+NuR3ZwbkbHto0XMn4rEiRDunR3M= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=pengutronix.de; spf=none smtp.mailfrom=hardanger.blackshift.org; arc=none smtp.client-ip=116.203.23.228 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=pengutronix.de Authentication-Results: smtp.subspace.kernel.org; spf=none smtp.mailfrom=hardanger.blackshift.org Received: from bjornoya.blackshift.org (unknown [IPv6:2003:e3:7f3d:bb00:e2bf:c3f2:96ab:885d]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (secp384r1) client-signature RSA-PSS (4096 bits)) (Client CN "bjornoya.blackshift.org", Issuer "R10" (verified OK)) by glittertind.blackshift.org (Postfix) with ESMTPS id 98C6A66ECF3 for ; Tue, 17 Jun 2025 13:25:25 +0000 (UTC) Received: from dspam.blackshift.org (localhost [127.0.0.1]) by bjornoya.blackshift.org (Postfix) with SMTP id 62CD142A7F6 for ; Tue, 17 Jun 2025 13:25:25 +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 9C5E442A7A4; Tue, 17 Jun 2025 13:25:21 +0000 (UTC) Received: from hardanger.blackshift.org (localhost [::1]) by hardanger.blackshift.org (OpenSMTPD) with ESMTP id 33d69c02; Tue, 17 Jun 2025 13:25:20 +0000 (UTC) From: Marc Kleine-Budde Date: Tue, 17 Jun 2025 15:24:54 +0200 Subject: [PATCH net-next v3 04/10] 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: <20250617-fec-cleanups-v3-4-a57bfb38993f@pengutronix.de> References: <20250617-fec-cleanups-v3-0-a57bfb38993f@pengutronix.de> In-Reply-To: <20250617-fec-cleanups-v3-0-a57bfb38993f@pengutronix.de> To: Wei Fang , Shenwei Wang , Clark Wang , "David S. Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , Richard Cochran , Andrew Lunn Cc: imx@lists.linux.dev, netdev@vger.kernel.org, linux-kernel@vger.kernel.org, kernel@pengutronix.de, Marc Kleine-Budde , Frank Li , Andrew Lunn X-Mailer: b4 0.15-dev-6f78e X-Developer-Signature: v=1; a=openpgp-sha256; l=1883; i=mkl@pengutronix.de; h=from:subject:message-id; bh=bZbKu9frw/vFoCdNCqD5fqyOM78ardIlyR+M1e+RRjI=; b=owEBbQGS/pANAwAKAQx0Zd/5kJGcAcsmYgBoUWyzjTOp4WX+7A2CtObFNPs7uwqPf9Wt5miSl xH7iiS8eqiJATMEAAEKAB0WIQSf+wzYr2eoX/wVbPMMdGXf+ZCRnAUCaFFsswAKCRAMdGXf+ZCR nJG8CACYj3haMMeZTo2/4xjtxYz9NjSXCMtcJlo8fmRnWrvWUxZyFGDo2qhiRCl7p2FdHfDu9I2 H6L9YswTPXlDH6RxmQgOCDnN1h79RZN0m7BkQmO5q+l+AIrXVtU7c/Y9AiTqgnvIBt8PqsH/aNF JFvQNcscP0jim018pYI1nWjxLBIfkk+Mxll+vJYLS3T3ooSa/93vlDGQR6wNzDcdjZ9ZWL92onG MK1/NlSTeoOvpNOeudVa1mx4l1j1A1hBrO6qV997VKvruAF+faetWgDvR41mIiuK4Uw/CrmnDuw 4gaIUbqXkN49N15GlGHUVn+YfFyo3qZtQ66qFM9undEPou/g X-Developer-Key: i=mkl@pengutronix.de; a=openpgp; fpr=C1400BA0B3989E6FBC7D5B5C2B5EE211C58AEA54 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. Rename fec_imx6x_info to fec_imx6sx_info to align with the SoC's name. Reviewed-by: Wei Fang Reviewed-by: Frank Li Reviewed-by: Andrew Lunn 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 17e9bddb9ddd..e0d7365e5b4f 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.47.2 From nobody Thu Oct 9 13:19:08 2025 Received: from glittertind.blackshift.org (glittertind.blackshift.org [116.203.23.228]) (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 BBD742E3B0A for ; Tue, 17 Jun 2025 13:25:38 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=116.203.23.228 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1750166742; cv=none; b=dB0akPH6Ip63imC8Vu+ikkvL4a/pC18jTTRsmjMDxAXVGTMoSnxAeTEQksLth7PY0YAEpvXp4HI1L3nuDgjqjpHxavw3fVLhAqG3vSdfzQSdkEDwRqSTUCwELuYkJ8fhc3Q4MuVdUSOoDuVubxS+fdme7WJRMflOx3M6aSC7ibc= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1750166742; c=relaxed/simple; bh=eqt9u0PahhGFb1NEChhjIN3+SH4MC2Q5qUzt3VoERHE=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=W9gjXP7TVqtFMPHcGEbdoiHmFF5QRLSFPERdizb02eKxrmmY9u0b93ZuqIUsknwsPGrqVRnMbjy/FQHHWTwiLRZvdgrvNaItQhrMRECNwOUQatU4TQ3Zykn/o1PMejiTABmhYUNO6W7LA3xCMl8w4IJZgdunjCUdDC37yuKk3Ag= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=pengutronix.de; spf=none smtp.mailfrom=hardanger.blackshift.org; arc=none smtp.client-ip=116.203.23.228 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=pengutronix.de Authentication-Results: smtp.subspace.kernel.org; spf=none smtp.mailfrom=hardanger.blackshift.org Received: from bjornoya.blackshift.org (unknown [IPv6:2003:e3:7f3d:bb00:e2bf:c3f2:96ab:885d]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (secp384r1) client-signature RSA-PSS (4096 bits)) (Client CN "bjornoya.blackshift.org", Issuer "R10" (verified OK)) by glittertind.blackshift.org (Postfix) with ESMTPS id 2645E66ED6A for ; Tue, 17 Jun 2025 13:25:29 +0000 (UTC) Received: from dspam.blackshift.org (localhost [127.0.0.1]) by bjornoya.blackshift.org (Postfix) with SMTP id EB66242A851 for ; Tue, 17 Jun 2025 13:25:28 +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 CC08F42A7A8; Tue, 17 Jun 2025 13:25:21 +0000 (UTC) Received: from hardanger.blackshift.org (localhost [::1]) by hardanger.blackshift.org (OpenSMTPD) with ESMTP id 881f6e66; Tue, 17 Jun 2025 13:25:20 +0000 (UTC) From: Marc Kleine-Budde Date: Tue, 17 Jun 2025 15:24:55 +0200 Subject: [PATCH net-next v3 05/10] 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: <20250617-fec-cleanups-v3-5-a57bfb38993f@pengutronix.de> References: <20250617-fec-cleanups-v3-0-a57bfb38993f@pengutronix.de> In-Reply-To: <20250617-fec-cleanups-v3-0-a57bfb38993f@pengutronix.de> To: Wei Fang , Shenwei Wang , Clark Wang , "David S. Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , Richard Cochran , Andrew Lunn Cc: imx@lists.linux.dev, netdev@vger.kernel.org, linux-kernel@vger.kernel.org, kernel@pengutronix.de, Marc Kleine-Budde , Frank Li , Andrew Lunn X-Mailer: b4 0.15-dev-6f78e X-Developer-Signature: v=1; a=openpgp-sha256; l=1320; i=mkl@pengutronix.de; h=from:subject:message-id; bh=eqt9u0PahhGFb1NEChhjIN3+SH4MC2Q5qUzt3VoERHE=; b=owEBbQGS/pANAwAKAQx0Zd/5kJGcAcsmYgBoUWy16GQU7NQUxS8Y/J7hrv2oXVAPAb6RGgWbX 3NyNWrTrMiJATMEAAEKAB0WIQSf+wzYr2eoX/wVbPMMdGXf+ZCRnAUCaFFstQAKCRAMdGXf+ZCR nG3CCACcg3N7f1pd0K9NkAdj6Q32XsVA36apnjj4a+qXzpqUwZXbKiUNPexL2SpzXo9PLuZmXHK OFgPb7/2V5mlaNurqHMbFD8O9cobBRcvE9TfsxOIFX8Arw94M0WTgFcsirNxUJedOPBXxuvgfH+ 3fymuMrvynBNyR2XVuNzsFSq5AC+prV65jT+ujcDONV8d8KAZo6rrS6LaDkNlqVmtx7HLdJIc/S vGzB/XKcy2XI4lM091eJQjOtdboQyfG9IcqwCvoQcYsIpmkZef1DGaqoC+ErQPpJ67KylnqYpy6 WeWGN/ae4RTnWYsV0/y9D4igRw2eUh3RTexygmDcIe5LNM/B X-Developer-Key: i=mkl@pengutronix.de; a=openpgp; fpr=C1400BA0B3989E6FBC7D5B5C2B5EE211C58AEA54 Replace "1 << 5" for configuring 1000 MBit/s with a defined constant to improve code readability and maintainability. Reviewed-by: Wei Fang Reviewed-by: Frank Li Reviewed-by: Andrew Lunn Signed-off-by: Marc Kleine-Budde --- 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 e0d7365e5b4f..21891baa2fc5 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) @@ -1207,7 +1208,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.47.2 From nobody Thu Oct 9 13:19:08 2025 Received: from glittertind.blackshift.org (glittertind.blackshift.org [116.203.23.228]) (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 0A3A02E266A for ; Tue, 17 Jun 2025 13:25:36 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=116.203.23.228 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1750166738; cv=none; b=AUAwN/mlO4w2sShDUG5DSD3ZP0BwC3eZZq+2sdbrBu4GjfLySaFi838yMJg1UGsusYmIoeyGdjpuB0G9b7+jB/gh9QOPybwebwl7O/Am5agWO///TVh0tTnOxj04Bbp4LuRpDOwLvPqt3cRHDCy6Np9ppy1Akly0elHtGHgsau4= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1750166738; c=relaxed/simple; bh=zZnkF0g1+NgLVLuMRYVtdKFIaIV0BCv/KjxVB6ihNus=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=gvrQ8IASzmOQ38oPz3SQXtDdEhcQXDoTaaShtwXWa+Kjb21GTOlLpmlr1In/uK/kkNoTkdj0eYLs7CemPG3cv0qbWXhPCkEY5RzangYMC0/rb56mpLm6XOLvQ4twTdvn38GyQvS60H5QQsCbYVZIv5rm6fF9bz8f1/qd3XdFQr8= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=pengutronix.de; spf=none smtp.mailfrom=hardanger.blackshift.org; arc=none smtp.client-ip=116.203.23.228 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=pengutronix.de Authentication-Results: smtp.subspace.kernel.org; spf=none smtp.mailfrom=hardanger.blackshift.org Received: from bjornoya.blackshift.org (unknown [IPv6:2003:e3:7f3d:bb00:e2bf:c3f2:96ab:885d]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (secp384r1) client-signature RSA-PSS (4096 bits)) (Client CN "bjornoya.blackshift.org", Issuer "R10" (verified OK)) by glittertind.blackshift.org (Postfix) with ESMTPS id F3AE766ED66 for ; Tue, 17 Jun 2025 13:25:28 +0000 (UTC) Received: from dspam.blackshift.org (localhost [127.0.0.1]) by bjornoya.blackshift.org (Postfix) with SMTP id C16B942A84B for ; Tue, 17 Jun 2025 13:25:28 +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 DEC5042A7AB; Tue, 17 Jun 2025 13:25:21 +0000 (UTC) Received: from hardanger.blackshift.org (localhost [::1]) by hardanger.blackshift.org (OpenSMTPD) with ESMTP id cdadae14; Tue, 17 Jun 2025 13:25:20 +0000 (UTC) From: Marc Kleine-Budde Date: Tue, 17 Jun 2025 15:24:56 +0200 Subject: [PATCH net-next v3 06/10] 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: <20250617-fec-cleanups-v3-6-a57bfb38993f@pengutronix.de> References: <20250617-fec-cleanups-v3-0-a57bfb38993f@pengutronix.de> In-Reply-To: <20250617-fec-cleanups-v3-0-a57bfb38993f@pengutronix.de> To: Wei Fang , Shenwei Wang , Clark Wang , "David S. Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , Richard Cochran , Andrew Lunn Cc: imx@lists.linux.dev, netdev@vger.kernel.org, linux-kernel@vger.kernel.org, kernel@pengutronix.de, Marc Kleine-Budde , Andrew Lunn X-Mailer: b4 0.15-dev-6f78e X-Developer-Signature: v=1; a=openpgp-sha256; l=1492; i=mkl@pengutronix.de; h=from:subject:message-id; bh=zZnkF0g1+NgLVLuMRYVtdKFIaIV0BCv/KjxVB6ihNus=; b=owEBbQGS/pANAwAKAQx0Zd/5kJGcAcsmYgBoUWy22nuNGMEDjC255Pj31pEFlgnX4R4nR+T9L R/Nj384ey6JATMEAAEKAB0WIQSf+wzYr2eoX/wVbPMMdGXf+ZCRnAUCaFFstgAKCRAMdGXf+ZCR nD36B/4klelXCL97pKygjz3uKV3IcqsvEZZhOBHY4KZMiQV/YRMNjLpPt690anhMB+GKEUEXFQG NNFIlOgm7FOJ4p9wcnac++ayRJhd0z6nAnwKjScV9ilZoH34u3LwX4QNtQmQT79eRvR94vxXmhn s35GojXxIkQLpzrGI7HRWOR0jUK2lhG4DgkAHBsamT3UHih8kWEtzrGpNQI7Tu5D2JATjGX0etX 6jTgCGU8qxGyPFld/fTQ6TNDO6ExRlJ4bKxCAaf5Hx4DEkY6l/vOx85TKoBd7w04EKhqaXUh+Lr aoNiO/XQkWKZ532TQ8slerN79w2HdeTLW80fXzH3bVT/yDt6 X-Developer-Key: i=mkl@pengutronix.de; a=openpgp; fpr=C1400BA0B3989E6FBC7D5B5C2B5EE211C58AEA54 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. Align fec_enet_rx_queue() argument order with fec_enet_tx_queue() to make code more readable. Reviewed-by: Wei Fang Reviewed-by: Andrew Lunn 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 21891baa2fc5..6b456372de9a 100644 --- a/drivers/net/ethernet/freescale/fec_main.c +++ b/drivers/net/ethernet/freescale/fec_main.c @@ -1713,7 +1713,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; @@ -1940,7 +1940,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.47.2 From nobody Thu Oct 9 13:19:08 2025 Received: from glittertind.blackshift.org (glittertind.blackshift.org [116.203.23.228]) (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 C84E42E6D38 for ; Tue, 17 Jun 2025 13:25:39 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=116.203.23.228 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1750166741; cv=none; b=jiitUWNTc6talMldYadCy/z/Nhg9jnqIVLezcItHncUosdE2fBHoBHGt++b3t0pAgCbL725mFuj+FO+vy5SDTo8o3ALYfB0CUAREjP5fiFPqyFHK27NuX2SBsLQVKOBUaD/yHgih1iozH+aIZWXFOzAU3yS2a8a2O68Fm1Fo5ho= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1750166741; c=relaxed/simple; bh=sem55EClJLo7e0sBEpRg90jWZ80rps5L0scKJuN10gc=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=b7OOMydWD/ZlgGOnQ8z4VO4Hm0LR4Z7XOSKOK36WN7quWFYCKEKIH2pWvS8R6h1/0cqW4jYYTH0oTc9CqZH1mEj1ApHJRggx6zaNN1ch8Mo3a7/zX7RIYI75oTxBqpu7TZstUMqo3S3mpx+YQU23KVwYM/SRTAw0sV1KLgvT1yU= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=pengutronix.de; spf=none smtp.mailfrom=hardanger.blackshift.org; arc=none smtp.client-ip=116.203.23.228 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=pengutronix.de Authentication-Results: smtp.subspace.kernel.org; spf=none smtp.mailfrom=hardanger.blackshift.org Received: from bjornoya.blackshift.org (unknown [IPv6:2003:e3:7f3d:bb00:e2bf:c3f2:96ab:885d]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (secp384r1) client-signature RSA-PSS (4096 bits)) (Client CN "bjornoya.blackshift.org", Issuer "R10" (verified OK)) by glittertind.blackshift.org (Postfix) with ESMTPS id 3144A66ED6C for ; Tue, 17 Jun 2025 13:25:29 +0000 (UTC) Received: from dspam.blackshift.org (localhost [127.0.0.1]) by bjornoya.blackshift.org (Postfix) with SMTP id 0243E42A853 for ; Tue, 17 Jun 2025 13:25:28 +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 0B73D42A7AF; Tue, 17 Jun 2025 13:25:22 +0000 (UTC) Received: from hardanger.blackshift.org (localhost [::1]) by hardanger.blackshift.org (OpenSMTPD) with ESMTP id 57c6960e; Tue, 17 Jun 2025 13:25:20 +0000 (UTC) From: Marc Kleine-Budde Date: Tue, 17 Jun 2025 15:24:57 +0200 Subject: [PATCH net-next v3 07/10] net: fec: fec_enet_rx_queue(): replace manual VLAN header calculation with 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: <20250617-fec-cleanups-v3-7-a57bfb38993f@pengutronix.de> References: <20250617-fec-cleanups-v3-0-a57bfb38993f@pengutronix.de> In-Reply-To: <20250617-fec-cleanups-v3-0-a57bfb38993f@pengutronix.de> To: Wei Fang , Shenwei Wang , Clark Wang , "David S. Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , Richard Cochran , Andrew Lunn Cc: imx@lists.linux.dev, netdev@vger.kernel.org, linux-kernel@vger.kernel.org, kernel@pengutronix.de, Marc Kleine-Budde , Frank Li , Andrew Lunn X-Mailer: b4 0.15-dev-6f78e X-Developer-Signature: v=1; a=openpgp-sha256; l=1269; i=mkl@pengutronix.de; h=from:subject:message-id; bh=sem55EClJLo7e0sBEpRg90jWZ80rps5L0scKJuN10gc=; b=owGbwMvMwMXIU5J6/+eEiXMYT6slMWQE5uyQ4los48S4VWeh96Xveq8bLe3KPBIvlc9+Vnruy 5JPD/0+dTIaszAwcjHIiimyzP/Nc2N9+or4P6I5n2EGsTKBTGHg4hSAiVS7sf+V3/9vXUFK8Uov sfadzXtl8rnSvyq+6qi2mJ8b/kjAKkKqWDLSY6vZ+/rVJzhzd6q2dM0TZRRW8PvP3hrrwfbk3J/ ZX/3W/OOeu2r7pOxbUls6bpQzcmuvOxWy7N+9A2qLNd0ZFl9w6M/dMddCyyqEe+OKnecFXLufGg dmPY9c6Pc5uSWffb/WtZy/tl+8+r8FHLCQyxMty/6XqcEd7NKhJWqg4rV09uHVvEGedyadUXig+ 15ZImifsvWGyMs8JfLZ05na7Vg+T+K+2NvNdK9oB3/ilvXMpwIXGBxvc5JQEl/AfDk2UylRgDE0 sZDLxEPOPmp37pzst9/Yb+vqTeqeftj4kfB9xv0JTAJzAQ== X-Developer-Key: i=mkl@pengutronix.de; a=openpgp; fpr=C1400BA0B3989E6FBC7D5B5C2B5EE211C58AEA54 For better readability and maintainability, use the provided helper function skb_vlan_eth_hdr() to replace manual the VLAN header calculation, and change the type of vlan_header to struct vlan_ethhdr to take into account that the Ethernet header plus VLAN header is returned. Reviewed-by: Frank Li Reviewed-by: Wei Fang Reviewed-by: Andrew Lunn Signed-off-by: Marc Kleine-Budde --- 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 6b456372de9a..f238cb60aa65 100644 --- a/drivers/net/ethernet/freescale/fec_main.c +++ b/drivers/net/ethernet/freescale/fec_main.c @@ -1860,8 +1860,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.47.2 From nobody Thu Oct 9 13:19:08 2025 Received: from glittertind.blackshift.org (glittertind.blackshift.org [116.203.23.228]) (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 2A1F8293474 for ; Tue, 17 Jun 2025 13:25:36 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=116.203.23.228 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1750166738; cv=none; b=P7GIQp+IfCTu5wRj0SQqKP93wNAnsgo4BugqFZRnqLdwZwotVhU7ptEFVi4wlFbu7UZir/iZV3y+EnPbyfC84yl2HOEBSS3xYbWHT/NXkpd/H/Wjj7rA3RQK2d+Uf/3CFXzvonuxSf+32S1hL/KOMt+lMslf918FWCnTHa7h/Gs= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1750166738; c=relaxed/simple; bh=LyJrLbbVnlKXsSbL7xyqgKeGY8RTbecxMuFSWf+ZNo4=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=F22UBSqG4BnrmbPcNShQi/cBmt8M1w3TRQLk2ODBuFlWdhh6ivTrOWxYCq2x822Vg5FgmqD1/yepTrKf5XukvKp535EA0OT5ha8IZUxqHfWWS7kCny47XnZgd2bMBGIQdkWrsUSf+TxsIilnTA1qmkRyyv0iCelu2uSsIu633MM= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=pengutronix.de; spf=none smtp.mailfrom=hardanger.blackshift.org; arc=none smtp.client-ip=116.203.23.228 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=pengutronix.de Authentication-Results: smtp.subspace.kernel.org; spf=none smtp.mailfrom=hardanger.blackshift.org Received: from bjornoya.blackshift.org (unknown [IPv6:2003:e3:7f3d:bb00:e2bf:c3f2:96ab:885d]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (secp384r1) client-signature RSA-PSS (4096 bits)) (Client CN "bjornoya.blackshift.org", Issuer "R10" (verified OK)) by glittertind.blackshift.org (Postfix) with ESMTPS id 0D09266ED67 for ; Tue, 17 Jun 2025 13:25:29 +0000 (UTC) Received: from dspam.blackshift.org (localhost [127.0.0.1]) by bjornoya.blackshift.org (Postfix) with SMTP id D126342A84C for ; Tue, 17 Jun 2025 13:25:28 +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 412B942A7B4; Tue, 17 Jun 2025 13:25:22 +0000 (UTC) Received: from hardanger.blackshift.org (localhost [::1]) by hardanger.blackshift.org (OpenSMTPD) with ESMTP id 8cdc6968; Tue, 17 Jun 2025 13:25:20 +0000 (UTC) From: Marc Kleine-Budde Date: Tue, 17 Jun 2025 15:24:58 +0200 Subject: [PATCH net-next v3 08/10] 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: <20250617-fec-cleanups-v3-8-a57bfb38993f@pengutronix.de> References: <20250617-fec-cleanups-v3-0-a57bfb38993f@pengutronix.de> In-Reply-To: <20250617-fec-cleanups-v3-0-a57bfb38993f@pengutronix.de> To: Wei Fang , Shenwei Wang , Clark Wang , "David S. Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , Richard Cochran , Andrew Lunn Cc: imx@lists.linux.dev, netdev@vger.kernel.org, linux-kernel@vger.kernel.org, kernel@pengutronix.de, Marc Kleine-Budde , Frank Li X-Mailer: b4 0.15-dev-6f78e X-Developer-Signature: v=1; a=openpgp-sha256; l=1498; i=mkl@pengutronix.de; h=from:subject:message-id; bh=LyJrLbbVnlKXsSbL7xyqgKeGY8RTbecxMuFSWf+ZNo4=; b=owEBbQGS/pANAwAKAQx0Zd/5kJGcAcsmYgBoUWy6MlbPd68yDK91m2mt0VGDy2zEs0zIwzzd+ dSE636IOjGJATMEAAEKAB0WIQSf+wzYr2eoX/wVbPMMdGXf+ZCRnAUCaFFsugAKCRAMdGXf+ZCR nNq+B/9+/DWTvo5vsLnqp4DIBunmLsCexvien5LkGa6hYQGOBuRZKJwcTUZ/ttIUrrdSZe9G+wO JRi5MJ2BMCEwAGEvjpIoYtf5Fd3qwH47oIRo6L7d7qXGoS7AL7BOSBzItcqSbRs7SHKrPqekJZl D4hB30+rxNDX4xY8BCKtdDVlwgdNDK0Gt4vx/Kxaw5mqcOpyLu6CkxF+O57mDJ/OCShjrww+pyI RrswSZ4oOIvoDmMCzQsark8AhkWlsejTnAt3KKV99awekHtZK6li5ZPVQXfsJK2wh+yCFghp91K iwxYCk0MdnsMmmiJCiu6w8RbIDsiErvCflSvHJJBIMU+QiYR X-Developer-Key: i=mkl@pengutronix.de; a=openpgp; fpr=C1400BA0B3989E6FBC7D5B5C2B5EE211C58AEA54 In order to clean up of the VLAN handling, reduce the scope of data. Reviewed-by: Frank Li Reviewed-by: Wei Fang Signed-off-by: Marc Kleine-Budde --- 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 f238cb60aa65..bc547be59dae 100644 --- a/drivers/net/ethernet/freescale/fec_main.c +++ b/drivers/net/ethernet/freescale/fec_main.c @@ -1721,7 +1721,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; @@ -1844,10 +1843,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; @@ -1865,7 +1865,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.47.2 From nobody Thu Oct 9 13:19:08 2025 Received: from glittertind.blackshift.org (glittertind.blackshift.org [116.203.23.228]) (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 BE9D22E3B0B for ; Tue, 17 Jun 2025 13:25:38 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=116.203.23.228 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1750166740; cv=none; b=Wu7gGeA1cTtaRBQF/2pXtRVWaM/n2LOGOhi+ElypXUEq/Ycbrc4yY4ectalEuWI+RSFQsCOvbv9Gt1rZ0BzKbDS+z5QSWrmVC3YI1AviTaZJ9uEsKTIMnBEmhJzTIfy1ksFrtPO3exrjr6iAY6kerS7mr3QgKmussCH7t5TeWrU= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1750166740; c=relaxed/simple; bh=zxr1W4n2Z/cWnxc0Gq4EvhifvDpWYxQwAgl7scCcZBk=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=YPqqsMLv0wxXi2pVKwUuVDVgqkNM2JOmRT7SomojDHJR71UIsSzWENWJ5fJRtxo3v9HcEz1+yZSnB/lFuYdZQRB0nMOYTqv22g34V0tp44eoXYkAgsgfa+FUToUGxw8XcSK/zmM1GLzl69yYhHABLYQ+FJCcfZf+LvXERTKmPr8= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=pengutronix.de; spf=none smtp.mailfrom=hardanger.blackshift.org; arc=none smtp.client-ip=116.203.23.228 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=pengutronix.de Authentication-Results: smtp.subspace.kernel.org; spf=none smtp.mailfrom=hardanger.blackshift.org Received: from bjornoya.blackshift.org (unknown [IPv6:2003:e3:7f3d:bb00:e2bf:c3f2:96ab:885d]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (secp384r1) client-signature RSA-PSS (4096 bits)) (Client CN "bjornoya.blackshift.org", Issuer "R10" (verified OK)) by glittertind.blackshift.org (Postfix) with ESMTPS id 1CBFF66ED69 for ; Tue, 17 Jun 2025 13:25:29 +0000 (UTC) Received: from dspam.blackshift.org (localhost [127.0.0.1]) by bjornoya.blackshift.org (Postfix) with SMTP id DCDE642A84D for ; Tue, 17 Jun 2025 13:25:28 +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 5E3A042A7B7; Tue, 17 Jun 2025 13:25:22 +0000 (UTC) Received: from hardanger.blackshift.org (localhost [::1]) by hardanger.blackshift.org (OpenSMTPD) with ESMTP id c8d4ead2; Tue, 17 Jun 2025 13:25:20 +0000 (UTC) From: Marc Kleine-Budde Date: Tue, 17 Jun 2025 15:24:59 +0200 Subject: [PATCH net-next v3 09/10] 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: <20250617-fec-cleanups-v3-9-a57bfb38993f@pengutronix.de> References: <20250617-fec-cleanups-v3-0-a57bfb38993f@pengutronix.de> In-Reply-To: <20250617-fec-cleanups-v3-0-a57bfb38993f@pengutronix.de> To: Wei Fang , Shenwei Wang , Clark Wang , "David S. Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , Richard Cochran , Andrew Lunn Cc: imx@lists.linux.dev, netdev@vger.kernel.org, linux-kernel@vger.kernel.org, kernel@pengutronix.de, Marc Kleine-Budde , Frank Li X-Mailer: b4 0.15-dev-6f78e X-Developer-Signature: v=1; a=openpgp-sha256; l=2262; i=mkl@pengutronix.de; h=from:subject:message-id; bh=zxr1W4n2Z/cWnxc0Gq4EvhifvDpWYxQwAgl7scCcZBk=; b=owEBbQGS/pANAwAKAQx0Zd/5kJGcAcsmYgBoUWy8+oRNY51w7QgIjOSBRBvUEbdUDtIXlZbAD 0xDBUGv+EmJATMEAAEKAB0WIQSf+wzYr2eoX/wVbPMMdGXf+ZCRnAUCaFFsvAAKCRAMdGXf+ZCR nMJqCACUKoyU2globAd5F5QtVm+1l+wzDDs7AajSrqYnDcTX8FCS57j3cHfzJ8Jjphgix9jN4/k qQ2dLWbH37DeVLAlvAlyzMw+uHWE9f9pY+QWtAFs9FnnEXI86yyE7ugKz0W6jwGM8TsLTaobnf7 /PaiJN+nm89yqyphMKB/7k2uAlY3IIJRc1NXEaQz/IR3eHPUt6vzL5JjKtYwNb7Oq0YNwyU7FJi lpJyWXMxAG4Xcfdt+roOvxMYe1h2JauUsSFrCeiQZ7zIvJ6fI9I19kC1UuNbyBIjKDkQmywGJoS TfAQD/Yc4UkwPGC4JeLr/8xQfS2HKPvmNBTW316sq4mX57nd X-Developer-Key: i=mkl@pengutronix.de; a=openpgp; fpr=C1400BA0B3989E6FBC7D5B5C2B5EE211C58AEA54 Move __vlan_hwaccel_put_tag() into the if statement that sets vlan_packet_rcvd =3D true. This change eliminates the unnecessary vlan_packet_rcvd variable, simplifying the code and improving clarity. Reviewed-by: Frank Li Reviewed-by: Wei Fang Signed-off-by: Marc Kleine-Budde --- 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 bc547be59dae..021cf7c2dcf6 100644 --- a/drivers/net/ethernet/freescale/fec_main.c +++ b/drivers/net/ethernet/freescale/fec_main.c @@ -1723,8 +1723,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); @@ -1855,18 +1853,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); @@ -1886,12 +1884,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.47.2 From nobody Thu Oct 9 13:19:08 2025 Received: from glittertind.blackshift.org (glittertind.blackshift.org [116.203.23.228]) (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 2A0EA28D85F for ; Tue, 17 Jun 2025 13:25:36 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=116.203.23.228 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1750166738; cv=none; b=Vq7sCZL4kJ7muZUfraZM78YhriwsnnJgEG3lS239+BZTiPo00sn12XbPULSsBAqanDbq06+CHJvgNeHKxC6iFxBvbkaNwQ0F/MI0iPoZaZilvgAnab8iwt0sU2MSV4Svb14QdIRWIqY6gzzINyUYJtF8DUCssCb8I5Vz+e4MXHE= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1750166738; c=relaxed/simple; bh=fQ4LxAZsa4WZr7runtQggvEmU2rQ7E01a9lhK4ivd8k=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=VHJW3FDtzkJrJA0NCx8ilCKlcqpciVk1/7bweCZkGASNu9lwk+HwcciS/o0KpOPdq89lXCmfPWjRc2E4lLOCTeAcn0W3Enp7sqckZs95nCxSY1d/DVLJO48q9oRB7xKelvu1Q2PiQTPez6a4Y0ChYI9u6qhFfjVyO8ZCKrZ8Vqw= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=pengutronix.de; spf=none smtp.mailfrom=hardanger.blackshift.org; arc=none smtp.client-ip=116.203.23.228 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=pengutronix.de Authentication-Results: smtp.subspace.kernel.org; spf=none smtp.mailfrom=hardanger.blackshift.org Received: from bjornoya.blackshift.org (unknown [IPv6:2003:e3:7f3d:bb00:e2bf:c3f2:96ab:885d]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (secp384r1) client-signature RSA-PSS (4096 bits)) (Client CN "bjornoya.blackshift.org", Issuer "R10" (verified OK)) by glittertind.blackshift.org (Postfix) with ESMTPS id 1C78266ED68 for ; Tue, 17 Jun 2025 13:25:29 +0000 (UTC) Received: from dspam.blackshift.org (localhost [127.0.0.1]) by bjornoya.blackshift.org (Postfix) with SMTP id E194A42A84E for ; Tue, 17 Jun 2025 13:25:28 +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 74B3342A7B9; Tue, 17 Jun 2025 13:25:22 +0000 (UTC) Received: from hardanger.blackshift.org (localhost [::1]) by hardanger.blackshift.org (OpenSMTPD) with ESMTP id c7ff7475; Tue, 17 Jun 2025 13:25:20 +0000 (UTC) From: Marc Kleine-Budde Date: Tue, 17 Jun 2025 15:25:00 +0200 Subject: [PATCH net-next v3 10/10] 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: <20250617-fec-cleanups-v3-10-a57bfb38993f@pengutronix.de> References: <20250617-fec-cleanups-v3-0-a57bfb38993f@pengutronix.de> In-Reply-To: <20250617-fec-cleanups-v3-0-a57bfb38993f@pengutronix.de> To: Wei Fang , Shenwei Wang , Clark Wang , "David S. Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , Richard Cochran , Andrew Lunn Cc: imx@lists.linux.dev, netdev@vger.kernel.org, linux-kernel@vger.kernel.org, kernel@pengutronix.de, Marc Kleine-Budde , Frank Li X-Mailer: b4 0.15-dev-6f78e X-Developer-Signature: v=1; a=openpgp-sha256; l=2287; i=mkl@pengutronix.de; h=from:subject:message-id; bh=fQ4LxAZsa4WZr7runtQggvEmU2rQ7E01a9lhK4ivd8k=; b=owEBbQGS/pANAwAKAQx0Zd/5kJGcAcsmYgBoUWy+yiMoeNV/nrWhL7BADIeRU2sAiW0B5gxxk RFRkAewp9+JATMEAAEKAB0WIQSf+wzYr2eoX/wVbPMMdGXf+ZCRnAUCaFFsvgAKCRAMdGXf+ZCR nOeSB/9u4MKgbtCB1vOWwZM+ZO3wzS8kw7KW343LNISPRQR58GfBA9j+rBwZPgxmna3yckCrLEI zJ1NvZdLqSeQgN4dd1HGxv47iI0iUHGbqAgT2GkZX4ug4TUVIoFO8U9FrIhEc84dC6jHsZ3Dc0M /VT6W7pPi7XPmDrSXB+Lm+g1DIjaEj3X9rRc/4clBX73C70AYphJUU72sxdCGHkWNp7RA8HYCaz 8o18wI5mKPH+ethW64it2evqi/FE3qaKcHOhbOq0NFK3sgBBW5IFp7gWMPZfRlt41bX89O3haxS u0MmewuStFTzHycZbfnD2XTTEMyOyg4YvLkD/cia333RrHBe X-Developer-Key: i=mkl@pengutronix.de; a=openpgp; fpr=C1400BA0B3989E6FBC7D5B5C2B5EE211C58AEA54 In order to clean up of the VLAN handling, factor out the VLAN handling into separate function fec_enet_rx_vlan(). Reviewed-by: Frank Li Signed-off-by: Marc Kleine-Budde --- 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 021cf7c2dcf6..24dd1b280da0 100644 --- a/drivers/net/ethernet/freescale/fec_main.c +++ b/drivers/net/ethernet/freescale/fec_main.c @@ -1707,6 +1707,22 @@ fec_enet_run_xdp(struct fec_enet_private *fep, struc= t bpf_prog *prog, return ret; } =20 +static void fec_enet_rx_vlan(const struct net_device *ndev, struct sk_buff= *skb) +{ + if (ndev->features & NETIF_F_HW_VLAN_CTAG_RX) { + const struct vlan_ethhdr *vlan_header =3D skb_vlan_eth_hdr(skb); + const u16 vlan_tag =3D ntohs(vlan_header->h_vlan_TCI); + + /* Push and remove the vlan tag */ + + 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, @@ -1853,19 +1869,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.47.2