From nobody Thu Oct 9 08:57:32 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 6B39D2DFF10 for ; Wed, 18 Jun 2025 12:00: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=1750248041; cv=none; b=AfEDDt/KieiIKafvZK4aDQO8gl3VoTJZplzcja/oD1Uxbgni0f2RlqotreAwGbjEogVOebD37l9GXIQ493QHTRKVCEKJZuA/DB1XyHdGiQI9goJcBYKEyP1N+0X+VLJ1YGb19zM7thERWU1pp4RDInQ7zJTIDl7xkqF+7/6Nh3Y= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1750248041; c=relaxed/simple; bh=TImvkETCV7p7PD/nkYjqoMCUVxOt2SMtL7fqY4urm/k=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=HWR9WYtz/zZlntkDeDl9U8nx5Gr4/gUI6a+h4+7pXj49vB7+SxV8EGX/HpETyXncC0rafG7gwPBdtvE/0n+HG3rTMBmocHBekX+B6btGsDREErE8pe5naHYkOi0JT/2f8ru3+I+Coomfx6bjbEhuamK34HVBoMsYUTF+N6y1quE= 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:d189:60c:9a01:7dca]) (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 9ACD166FC4D for ; Wed, 18 Jun 2025 12:00:33 +0000 (UTC) Received: from dspam.blackshift.org (localhost [127.0.0.1]) by bjornoya.blackshift.org (Postfix) with SMTP id 679B742B565 for ; Wed, 18 Jun 2025 12:00:33 +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 EAE9C42B50A; Wed, 18 Jun 2025 12:00:28 +0000 (UTC) Received: from hardanger.blackshift.org (localhost [::1]) by hardanger.blackshift.org (OpenSMTPD) with ESMTP id e484d653; Wed, 18 Jun 2025 12:00:28 +0000 (UTC) From: Marc Kleine-Budde Date: Wed, 18 Jun 2025 14:00:01 +0200 Subject: [PATCH net-next v4 01/11] 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: <20250618-fec-cleanups-v4-1-c16f9a1af124@pengutronix.de> References: <20250618-fec-cleanups-v4-0-c16f9a1af124@pengutronix.de> In-Reply-To: <20250618-fec-cleanups-v4-0-c16f9a1af124@pengutronix.de> To: Wei Fang , Shenwei Wang , Clark Wang , "David S. Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , Richard Cochran , Andrew Lunn , Alexander Lobakin Cc: imx@lists.linux.dev, netdev@vger.kernel.org, linux-kernel@vger.kernel.org, kernel@pengutronix.de, bpf@vger.kernel.org, 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/5kJGcAcsmYgBoUqpEYbBmibsZ8F4V6mO7sqtEnOP4B0MK11krt 5NbgWh5rC+JATMEAAEKAB0WIQSf+wzYr2eoX/wVbPMMdGXf+ZCRnAUCaFKqRAAKCRAMdGXf+ZCR nJc4B/9GV8kgGqfAQADmyrFqXjpWI0LRQ1Dtirb3vO7M1gOoXcqn8ZJGzO0afW/tiTxUx3xt+Lw q4Yw1yE4k61qxBqWDmvWT108HjEJNBdtgsJlH86OeIFOd2IZTQRbCkOPXAflNtuOn52OZyEdbCW YlR0b0PIQbXeud51R+Jmd3EKSA+Chjm6sELq4zkUb4cBlrgMJk7M0FDGXogFKWd0EE0j4Qy9jER eCBHx1sgPOqRyHGNdRDAkRkBX0Fc6GKOMa0i81FZ6NTfa9iU9Wt6ePqozGIr4HL9T6PqzGbMSeR biTos8AL+aLQX6ZL5e/cMSM3JZSa+1sRRpNp20nyShGuE9oq 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 08:57:32 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 3DFE62DFF00 for ; Wed, 18 Jun 2025 12:00: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=1750248039; cv=none; b=WB++vgiZ8dw0POokw9Vh7PXF5+yT0V+jPnhGohNiDiQIVAOslaRVe/N6H2yrz3ADc7mA9fLkNiT9I2rdDCmS/ae/GvghiFF3YYvtm75nAJ2te6xfYVzWc8ACJBQPdf2M1e6uH5U4FQ08j4bIsraAAX6aOluRv0+fu3myl+h/8Go= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1750248039; c=relaxed/simple; bh=sA04u1PdDgRmLuhc7IHhWUv+JPtsYb7W1PMpqmuQz+g=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=jyfiv6l+hGG+xMRQxNXC7YDHXbb0cZJ0ZJ7YP3RkDXaWPlQI+H9Z0othOzXwV2Q3RQHjRb8zNYlB3928vAC3xazhBEPJ/1H75NLtQnxGLv8I9qP8umPU6L6hX26OsGcFoLF0BWFXjBCeifvKmG5IN+GCetgOVT7zDjQ+U3Mp4W0= 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:d189:60c:9a01:7dca]) (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 AC5D666FC51 for ; Wed, 18 Jun 2025 12:00:33 +0000 (UTC) Received: from dspam.blackshift.org (localhost [127.0.0.1]) by bjornoya.blackshift.org (Postfix) with SMTP id 7154E42B569 for ; Wed, 18 Jun 2025 12:00:33 +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 09BC842B50B; Wed, 18 Jun 2025 12:00:29 +0000 (UTC) Received: from hardanger.blackshift.org (localhost [::1]) by hardanger.blackshift.org (OpenSMTPD) with ESMTP id 7141dbd4; Wed, 18 Jun 2025 12:00:28 +0000 (UTC) From: Marc Kleine-Budde Date: Wed, 18 Jun 2025 14:00:02 +0200 Subject: [PATCH net-next v4 02/11] 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: <20250618-fec-cleanups-v4-2-c16f9a1af124@pengutronix.de> References: <20250618-fec-cleanups-v4-0-c16f9a1af124@pengutronix.de> In-Reply-To: <20250618-fec-cleanups-v4-0-c16f9a1af124@pengutronix.de> To: Wei Fang , Shenwei Wang , Clark Wang , "David S. Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , Richard Cochran , Andrew Lunn , Alexander Lobakin Cc: imx@lists.linux.dev, netdev@vger.kernel.org, linux-kernel@vger.kernel.org, kernel@pengutronix.de, bpf@vger.kernel.org, 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=kA0DAAoBDHRl3/mQkZwByyZiAGhSqkahux7b8pEGV48hgTPjvgsVEoF/MhMJowe+KK1is1Czb YkBMwQAAQoAHRYhBJ/7DNivZ6hf/BVs8wx0Zd/5kJGcBQJoUqpGAAoJEAx0Zd/5kJGc7nQIAJTo N/fzhUb43E4oLTJlc3gdzyV7UqD5BaUED+IWZkfkV25Kzlfub3CwHU0xXGCCWP6rl2IREY8+YRl 4R6HFvlvkTebMhC0boQNBlTRR/KKwRuEEJytT4Oq+S83jEsSgJbSrE7vXYLyNPrln9Bl3KKJiC/ 7OgkK7G99RqYVgfFIaGzN0RCXn3dPiHwyjE7DTNyILbzaJwavFN+QpiToiAhmAZwKyjSPfwNDh7 opVPhbOk2/DYR1YdKs12d9WEeEuclrigJ3DPhObWDrEG9TeQjFsMwLKm6WSvX3WC1NLiUVxUhgC jZkjfXQ7n+NHgJ3iZrFWTyed9VtlH+s88P7Wza0= 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 08:57:32 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 E6E8E29ACEA for ; Wed, 18 Jun 2025 12:00:34 +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=1750248036; cv=none; b=X58OlvI7N9xzpF5mtSGUPM1tHA89DxPQCS+KJcW6HFLASkR4SUvwTPGAeGV0Fq5pBKfQa4SwL7teoV8fcT/YBEGRT9W5vyExPmtGdBF5FNJTJeAnP89C5waSR26JCY4xa/k3zJPDi8luhMBWHd0I7KYRn7FfrhpXXi3hLt+Q4XQ= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1750248036; c=relaxed/simple; bh=2iqO7eQNAV+YgDrv6QeqkeUmG4rDnaxv9v7CVkxZzwk=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=fHFXAiyyJJbL3asahnRjvTrxmB7aGhyzK+sf2NrO0wp6O4+DIQWvFbYyRVfNZDSAOYSUyajPSIrbl4iJN6qRm8UwKMLYQQ1EWcjoELS3FCYEkWdWTNm51+tGIWMQIVzd0qH3ZdkUTi1kozuXd/Fg4A2GkOQEEPmVWhYSmT4Zbxc= 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:d189:60c:9a01:7dca]) (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 2E07066FC41 for ; Wed, 18 Jun 2025 12:00:33 +0000 (UTC) Received: from dspam.blackshift.org (localhost [127.0.0.1]) by bjornoya.blackshift.org (Postfix) with SMTP id EAFAB42B55C for ; Wed, 18 Jun 2025 12:00:32 +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 29EEB42B50D; Wed, 18 Jun 2025 12:00:29 +0000 (UTC) Received: from hardanger.blackshift.org (localhost [::1]) by hardanger.blackshift.org (OpenSMTPD) with ESMTP id 560da31b; Wed, 18 Jun 2025 12:00:28 +0000 (UTC) From: Marc Kleine-Budde Date: Wed, 18 Jun 2025 14:00:03 +0200 Subject: [PATCH net-next v4 03/11] net: fec: switch from asm/cacheflush.h to linux/cacheflush.h 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: <20250618-fec-cleanups-v4-3-c16f9a1af124@pengutronix.de> References: <20250618-fec-cleanups-v4-0-c16f9a1af124@pengutronix.de> In-Reply-To: <20250618-fec-cleanups-v4-0-c16f9a1af124@pengutronix.de> To: Wei Fang , Shenwei Wang , Clark Wang , "David S. Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , Richard Cochran , Andrew Lunn , Alexander Lobakin Cc: imx@lists.linux.dev, netdev@vger.kernel.org, linux-kernel@vger.kernel.org, kernel@pengutronix.de, bpf@vger.kernel.org, Marc Kleine-Budde X-Mailer: b4 0.15-dev-6f78e X-Developer-Signature: v=1; a=openpgp-sha256; l=913; i=mkl@pengutronix.de; h=from:subject:message-id; bh=2iqO7eQNAV+YgDrv6QeqkeUmG4rDnaxv9v7CVkxZzwk=; b=owEBbQGS/pANAwAKAQx0Zd/5kJGcAcsmYgBoUqpIOh+pePAfrUw9h11M1LbpjtWPktc4wOq4A eYyf2THEs+JATMEAAEKAB0WIQSf+wzYr2eoX/wVbPMMdGXf+ZCRnAUCaFKqSAAKCRAMdGXf+ZCR nCVWB/0RELPYGv01SjxvDftWfmQ9L9dLEyHXry0UNyxoHcG9pWCxLMD5GUyHw/bewdnSLMlAd4q Jr6Obc8ClsM4S0JBc5LPvR4Zx8i8OPPvl+vIpKjpyLvk5gnny61k0M7pPNZgFi9s7Co8IZf7RN9 eekfj0AkzClDDERXhKbO+vQCvHpcTkOjNJgUdWTa+tMEbpNRLE0yj3PQIOdaLc30GkCAJpuY9Jz RYubuwtKmOit3B98Ybe1FTnCN3encL8lwTziXIo/r+bcAqdfkZaiXBLKhNv68bg5RVJACtkFGhm lQj6efYOgI9WW2h4b6AGvlE+qPyOt8wnh9xXko96/C1juOXP X-Developer-Key: i=mkl@pengutronix.de; a=openpgp; fpr=C1400BA0B3989E6FBC7D5B5C2B5EE211C58AEA54 To fix the checkpatch warning, use linux/cacheflush.h instead of asm/cacheflush.h. 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 17e9bddb9ddd..dbfc191bcde1 100644 --- a/drivers/net/ethernet/freescale/fec_main.c +++ b/drivers/net/ethernet/freescale/fec_main.c @@ -49,6 +49,7 @@ #include #include #include +#include #include #include #include @@ -71,8 +72,6 @@ #include #include =20 -#include - #include "fec.h" =20 static void set_multicast_list(struct net_device *ndev); --=20 2.47.2 From nobody Thu Oct 9 08:57:32 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 D39822DE21F for ; Wed, 18 Jun 2025 12:00:37 +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=1750248039; cv=none; b=DVMzuhuApIigrHRpj2MXlfZnwfIRk1KszZOVzoG5GM5id2vvuTXOXgiyzb4IdGIjM7a0iR6iZRudU+vpjoqNfWK7Z1qXFB+tf5EnXDXNPCTlmsxKK6t79wRrwCrKp7n24NaoiGqLZG5WzTgwK6OdW9FIQd5hiR9RVlxYeXQmJPE= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1750248039; c=relaxed/simple; bh=VYJMovtGxdXZkHpWqywTu3uAJHSI58Pp1fUIXcI9pgw=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=qFXa2iml3JXbSg6+2V9qvPch4N/OeIw2qEA3Z9zOtB4wOXWSX7RSf4XWUyHsj5XeHexq4M1X3DFabLXY2+63IubjGdWnWrgrbk2o8vXHHtEbOF26fDT4hOCVRXEtWoVcjANRQ80PuFmTV1xYzCiFtiCROWgQCCw5ajbnp+XsFjI= 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:d189:60c:9a01:7dca]) (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 6959366FC48 for ; Wed, 18 Jun 2025 12:00:33 +0000 (UTC) Received: from dspam.blackshift.org (localhost [127.0.0.1]) by bjornoya.blackshift.org (Postfix) with SMTP id 312BB42B563 for ; Wed, 18 Jun 2025 12:00:33 +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 488EE42B50F; Wed, 18 Jun 2025 12:00:29 +0000 (UTC) Received: from hardanger.blackshift.org (localhost [::1]) by hardanger.blackshift.org (OpenSMTPD) with ESMTP id 950a2536; Wed, 18 Jun 2025 12:00:28 +0000 (UTC) From: Marc Kleine-Budde Date: Wed, 18 Jun 2025 14:00:04 +0200 Subject: [PATCH net-next v4 04/11] net: fec: sort the includes by alphabetic 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: <20250618-fec-cleanups-v4-4-c16f9a1af124@pengutronix.de> References: <20250618-fec-cleanups-v4-0-c16f9a1af124@pengutronix.de> In-Reply-To: <20250618-fec-cleanups-v4-0-c16f9a1af124@pengutronix.de> To: Wei Fang , Shenwei Wang , Clark Wang , "David S. Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , Richard Cochran , Andrew Lunn , Alexander Lobakin Cc: imx@lists.linux.dev, netdev@vger.kernel.org, linux-kernel@vger.kernel.org, kernel@pengutronix.de, bpf@vger.kernel.org, Marc Kleine-Budde X-Mailer: b4 0.15-dev-6f78e X-Developer-Signature: v=1; a=openpgp-sha256; l=5783; i=mkl@pengutronix.de; h=from:subject:message-id; bh=VYJMovtGxdXZkHpWqywTu3uAJHSI58Pp1fUIXcI9pgw=; b=owEBbQGS/pANAwAKAQx0Zd/5kJGcAcsmYgBoUqpKv55JNsh2H9F4WAzaA5+/vQfJC1Zv+Fw4U sFpmuUoomeJATMEAAEKAB0WIQSf+wzYr2eoX/wVbPMMdGXf+ZCRnAUCaFKqSgAKCRAMdGXf+ZCR nJj/B/9toLY5u7rFfv4LwgM9yTMa8J2CBVOo8eNXWYnuFFY1EKhLs66QhzuqxxAazM361yL0c4R xygMznzya02W7i8HwSiAYu3M0Qp/eHr4pEGANV3m0i88j1esisDdtIWlQ9QHT0B6rvU0m7ZMRFU UwzNSR/o6ZFKP9Ho8ER73CDnM1DmMhWlZmKe3TViDfcMySbIVoRpwYW91ng/+H+hCDEIWLzj0Qo YA+LvMGGiL62/dPk1cnfdIil5vK5amCFRQtowZD1e/X1bDadY8SUu/Hbb3COYHB1279JVbUSY8m QESE4BUTrdCa0KtfVvxSezMYNdqXrZe+8qKwfECOWk/vGFnO X-Developer-Key: i=mkl@pengutronix.de; a=openpgp; fpr=C1400BA0B3989E6FBC7D5B5C2B5EE211C58AEA54 This is a preparation patch to make addition of new includes easier without breaking the alphabetic order. Suggested-by: Alexander Lobakin Signed-off-by: Marc Kleine-Budde --- drivers/net/ethernet/freescale/fec.h | 6 +-- drivers/net/ethernet/freescale/fec_main.c | 80 +++++++++++++++------------= ---- drivers/net/ethernet/freescale/fec_ptp.c | 38 +++++++-------- 3 files changed, 62 insertions(+), 62 deletions(-) diff --git a/drivers/net/ethernet/freescale/fec.h b/drivers/net/ethernet/fr= eescale/fec.h index ce1e4fe4d492..5c8fdcef759b 100644 --- a/drivers/net/ethernet/freescale/fec.h +++ b/drivers/net/ethernet/freescale/fec.h @@ -14,14 +14,14 @@ #define FEC_H /*************************************************************************= ***/ =20 +#include +#include #include +#include #include #include -#include #include #include -#include -#include #include =20 #if defined(CONFIG_M523x) || defined(CONFIG_M527x) || defined(CONFIG_M528x= ) || \ diff --git a/drivers/net/ethernet/freescale/fec_main.c b/drivers/net/ethern= et/freescale/fec_main.c index dbfc191bcde1..3b1a4506caa6 100644 --- a/drivers/net/ethernet/freescale/fec_main.c +++ b/drivers/net/ethernet/freescale/fec_main.c @@ -22,55 +22,55 @@ * Copyright (C) 2010-2011 Freescale Semiconductor, Inc. */ =20 -#include -#include -#include -#include -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include +#include #include -#include +#include #include -#include +#include +#include +#include +#include +#include #include +#include +#include +#include #include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include #include #include #include #include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include #include -#include -#include -#include =20 #include "fec.h" =20 diff --git a/drivers/net/ethernet/freescale/fec_ptp.c b/drivers/net/etherne= t/freescale/fec_ptp.c index d6d9f0d6ca99..afe162c9eed8 100644 --- a/drivers/net/ethernet/freescale/fec_ptp.c +++ b/drivers/net/ethernet/freescale/fec_ptp.c @@ -7,30 +7,30 @@ =20 #define pr_fmt(fmt) KBUILD_MODNAME ": " fmt =20 -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include #include -#include -#include #include -#include -#include +#include +#include +#include #include +#include +#include +#include +#include +#include +#include +#include #include #include +#include +#include +#include +#include +#include +#include +#include +#include +#include =20 #include "fec.h" =20 --=20 2.47.2 From nobody Thu Oct 9 08:57:32 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 AFD2E2E4279 for ; Wed, 18 Jun 2025 12:00:41 +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=1750248043; cv=none; b=KZbDsHmnF82GP2VhkR5INwHzXuiHRgZXaXAWV+UL/RZkJc45gXXiiwV5dMRSeOozkHmXUYU4D/ErHvVvfQZdAqd7scNbvZzyQUzYui2/BTNbtzDl49cfOr3yVwfIwrIXOtKozyRyDgTs6ahOF1oIe3R+ODGetgpxYGxXChi0vUY= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1750248043; c=relaxed/simple; bh=v0eNcyhCb/H6fOglEC4oyKMmpYlgNDBGl8yAHjYgF3E=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=pkE6S4bzDGUz3Bnbx+50ScTZjAGDcktcQhGzRLZeW9pLRKrW9DTUNtABVEXDddgAgytRjuZqL5o41gKSExkwuaZdea3P6FpPlGvsjMDCEeBG1EVGXvfkYhNQw0XcdqusGxL8kar6edAVHrtLnpK10ADYANMZuilLxc6KJy0UQ1g= 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:d189:60c:9a01:7dca]) (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 BDEB666FCFD for ; Wed, 18 Jun 2025 12:00:37 +0000 (UTC) Received: from dspam.blackshift.org (localhost [127.0.0.1]) by bjornoya.blackshift.org (Postfix) with SMTP id 89FD442B5D4 for ; Wed, 18 Jun 2025 12:00:37 +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 5BB9942B511; Wed, 18 Jun 2025 12:00:29 +0000 (UTC) Received: from hardanger.blackshift.org (localhost [::1]) by hardanger.blackshift.org (OpenSMTPD) with ESMTP id 2c4de2cb; Wed, 18 Jun 2025 12:00:28 +0000 (UTC) From: Marc Kleine-Budde Date: Wed, 18 Jun 2025 14:00:05 +0200 Subject: [PATCH net-next v4 05/11] 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: <20250618-fec-cleanups-v4-5-c16f9a1af124@pengutronix.de> References: <20250618-fec-cleanups-v4-0-c16f9a1af124@pengutronix.de> In-Reply-To: <20250618-fec-cleanups-v4-0-c16f9a1af124@pengutronix.de> To: Wei Fang , Shenwei Wang , Clark Wang , "David S. Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , Richard Cochran , Andrew Lunn , Alexander Lobakin Cc: imx@lists.linux.dev, netdev@vger.kernel.org, linux-kernel@vger.kernel.org, kernel@pengutronix.de, bpf@vger.kernel.org, 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=v0eNcyhCb/H6fOglEC4oyKMmpYlgNDBGl8yAHjYgF3E=; b=owEBbQGS/pANAwAKAQx0Zd/5kJGcAcsmYgBoUqpMwiS+eVHIAbEW0j7ZGvI08Uxuj0A1KTmqA Z060H/EBieJATMEAAEKAB0WIQSf+wzYr2eoX/wVbPMMdGXf+ZCRnAUCaFKqTAAKCRAMdGXf+ZCR nAf4B/0UA4K02s0g7QBYh+xpfUOGX8f24ggQeV2R+SbtkgPOeSacvORzuI+cHaXTVsYg/nnHzlf SXl2YjtmUGbaFJAr6RuuvBrDEtxiGW91TfZoVMarwGmBSbHdjFNKMHHkKk4MZLNd9xNyagkc8tU yp0pZXOcvdULYuOj36EEkKnS1+TubMEninu/u8kc88YAAMqm2f+6xhp00BWHMWnd/ZcDxiqk3xX KGQ0AVEdGQxng36x0rvQiG88ViuKQX9gMbWW6/o213pARZTSBMwZFkzBq0Q2Jgvg6naNZ0/jVms jgjszAqAdFnvPOywpLAaTh4PAlflcE6FVHBH2GebbxHFAmlZ 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 3b1a4506caa6..083b7e07a9d1 100644 --- a/drivers/net/ethernet/freescale/fec_main.c +++ b/drivers/net/ethernet/freescale/fec_main.c @@ -130,7 +130,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 | @@ -195,7 +195,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 08:57:32 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 5EF472DFF12 for ; Wed, 18 Jun 2025 12:00:42 +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=1750248044; cv=none; b=efkWu4tMh95ttsyrI+7pQSbO2a1b7rUvAu/KaB7Koh6+Oei3uPcyJJMeJVTu713y+t0OUEQS8DgYWNB3/m65MorCXfxbwFRGtFZWAkkGZo4fJ4wkVkLXSBaFukqUt5sYbbN5iCmcQVRWX7FGlKGI7jej0aPGI2llvVINuh8+tW0= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1750248044; c=relaxed/simple; bh=HLPx1m+m8OBpx0jIA9w5+WqHbeIWeNqmWWt4rHfMWgo=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=Lf0SrsJeKV0qipIxegXYrnu0U36rxYkSKpSOx82Y52+MLkb6Rnspj5oU97KxL0XZD3T4bk7+giVwyhQn4a3Gx48OMnuNGtF+Glb/pDQ2uAsPBZQdzyiYt1Y3i/ys5yXnnyk77/TW7xYthi66AdmgZ3NazkhHhJsD1c84D3N7AWM= 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:d189:60c:9a01:7dca]) (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 ECF4866FD04 for ; Wed, 18 Jun 2025 12:00:37 +0000 (UTC) Received: from dspam.blackshift.org (localhost [127.0.0.1]) by bjornoya.blackshift.org (Postfix) with SMTP id BC6F242B5DA for ; Wed, 18 Jun 2025 12:00:37 +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 7442542B514; Wed, 18 Jun 2025 12:00:29 +0000 (UTC) Received: from hardanger.blackshift.org (localhost [::1]) by hardanger.blackshift.org (OpenSMTPD) with ESMTP id a4e44d1b; Wed, 18 Jun 2025 12:00:28 +0000 (UTC) From: Marc Kleine-Budde Date: Wed, 18 Jun 2025 14:00:06 +0200 Subject: [PATCH net-next v4 06/11] 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: <20250618-fec-cleanups-v4-6-c16f9a1af124@pengutronix.de> References: <20250618-fec-cleanups-v4-0-c16f9a1af124@pengutronix.de> In-Reply-To: <20250618-fec-cleanups-v4-0-c16f9a1af124@pengutronix.de> To: Wei Fang , Shenwei Wang , Clark Wang , "David S. Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , Richard Cochran , Andrew Lunn , Alexander Lobakin Cc: imx@lists.linux.dev, netdev@vger.kernel.org, linux-kernel@vger.kernel.org, kernel@pengutronix.de, bpf@vger.kernel.org, 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=HLPx1m+m8OBpx0jIA9w5+WqHbeIWeNqmWWt4rHfMWgo=; b=owEBbQGS/pANAwAKAQx0Zd/5kJGcAcsmYgBoUqpNDiZE0Sr1rTttZvnuVsD1qKnX9uYiRl1Mf +XLQBf/xEeJATMEAAEKAB0WIQSf+wzYr2eoX/wVbPMMdGXf+ZCRnAUCaFKqTQAKCRAMdGXf+ZCR nEK3B/9DeIeJwg6n4mToTOv9cyYpKhOAwh9a71Lg+P3v85jYE6HD6yXL10poW2xOwaQRGY5Lxtz NGjUpJTT8Is/rB4rEihyVLNCzQly9bo/XIs6kiq/Up+yZ+2YS5gEGFsrT8zzLncoulu66IH+/b2 i8W0GzbMkz2lqg2imanhYDEUkp3KDcZo7L6Zr9zJuvK3/y5ORMyiup4mA/m606XzhOQi52ffnIZ BY94E+k0isWE2y8jQTpUW/E8QY9Xr/okIZ/kYrhSqIz1YhxB6IH5SRirZGQUDMalnzcuvQ1nYyi NmJoD4EQ4S0qBfB76pkrDzqw1+TMgE4R/Ljzr6ngTQQ4G85f 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 083b7e07a9d1..e4fc1baf114d 100644 --- a/drivers/net/ethernet/freescale/fec_main.c +++ b/drivers/net/ethernet/freescale/fec_main.c @@ -275,6 +275,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) @@ -1206,7 +1207,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 08:57:32 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 1B7A42E54BE for ; Wed, 18 Jun 2025 12:00:41 +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=1750248044; cv=none; b=Jyn0GYaRoG8bzbW2FxOo6p4T6JXfHDr8D4A5vgVrwn9xDmMSOs+QLHwQLFdgzo9YX0dx52FL1/Q3UEgpTGg6uSRrBvWLsjS6Dsz/PDq+VlkTdZbwbVC9lU3eqW+Alz9nIIUG0IDr60isFeWEcmhpqTxL/KOCIO3SSKw3nh6/MBk= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1750248044; c=relaxed/simple; bh=MPShEsvVEvNuf0LjmYHvci6KO6a8CpEr7YMK5VwHOTo=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=XjlKh0hPmXVVVuZ4dAn7ODMqzs7rehY1ub6MdGYpWi8IXjJWfZyeeYl0xzKs7Mzn4Clw4+EL7sgd2RWsUDYEK6errO+PlEjk75zXSL9/r3U709VqJS0wAkFnuL3TST0AcyZmunoDAxopfRbgxIhBDSbJAmQS+AsT63GgbRbot6M= 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:d189:60c:9a01:7dca]) (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 D989666FD02 for ; Wed, 18 Jun 2025 12:00:37 +0000 (UTC) Received: from dspam.blackshift.org (localhost [127.0.0.1]) by bjornoya.blackshift.org (Postfix) with SMTP id A8E5C42B5D8 for ; Wed, 18 Jun 2025 12:00:37 +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 A776042B519; Wed, 18 Jun 2025 12:00:29 +0000 (UTC) Received: from hardanger.blackshift.org (localhost [::1]) by hardanger.blackshift.org (OpenSMTPD) with ESMTP id 2f0dd5d3; Wed, 18 Jun 2025 12:00:28 +0000 (UTC) From: Marc Kleine-Budde Date: Wed, 18 Jun 2025 14:00:07 +0200 Subject: [PATCH net-next v4 07/11] 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: <20250618-fec-cleanups-v4-7-c16f9a1af124@pengutronix.de> References: <20250618-fec-cleanups-v4-0-c16f9a1af124@pengutronix.de> In-Reply-To: <20250618-fec-cleanups-v4-0-c16f9a1af124@pengutronix.de> To: Wei Fang , Shenwei Wang , Clark Wang , "David S. Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , Richard Cochran , Andrew Lunn , Alexander Lobakin Cc: imx@lists.linux.dev, netdev@vger.kernel.org, linux-kernel@vger.kernel.org, kernel@pengutronix.de, bpf@vger.kernel.org, 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=MPShEsvVEvNuf0LjmYHvci6KO6a8CpEr7YMK5VwHOTo=; b=owEBbQGS/pANAwAKAQx0Zd/5kJGcAcsmYgBoUqpPl9ICbGyxU/EDp687zMOkAL2bHhyOXMvOD NG3He515a6JATMEAAEKAB0WIQSf+wzYr2eoX/wVbPMMdGXf+ZCRnAUCaFKqTwAKCRAMdGXf+ZCR nBJHB/0egSKcFOAFfweyaha55ag/it4mNYc5fbQsbnoDuTKN+ODJ4QkioqCm4JZA9fE4cQmFCLg v+Mw/oOoFRct/Gk50wiGoi+GyFDgrYk5jEdp//Rgdux/YR0+MZB6sgj2Dqt8Jtf3pzI6EKum1Xy 2wsBVYwcF4Wtfccerfwl9MAquvsmxDlhVf7Wa7K42EtxHLWrdGbAmTi1z+iqQD+LXBvOIBvFpF8 aVQtPQAjULhJRCLetS+BshjMHmUIifJ9SY7x2iBU7nPnWypN5mCL3aDL9FH/CBN53AFsDQ8ylYF x54s1BzMYPKPiUD6LQtVWDF/k0pJ1gpdyGozMTKCkr+TKK1Y 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 e4fc1baf114d..9e4164fc0cd1 100644 --- a/drivers/net/ethernet/freescale/fec_main.c +++ b/drivers/net/ethernet/freescale/fec_main.c @@ -1712,7 +1712,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; @@ -1939,7 +1939,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 08:57:32 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 DEB622E54D2 for ; Wed, 18 Jun 2025 12:00:42 +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=1750248046; cv=none; b=Jw1PmE6fAjBHATfpCieVs0euIn595lhGD5KL68P7fz9PSEbxg6NHpsKcV0c2LBqkRHbNABx5nVu5xW+54PsAn2Oo4MjD0JJhi1aONf4HR7ym/2HNjc1wxnzlKtAVqNOZswxOZTvH0hMDk+xE8nkUL/ZOb2ePmWoiut9QSeb5ZTE= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1750248046; c=relaxed/simple; bh=d2s47WrGXyJ55EikpwIGb0io5Gno7Udfij0nMkKw7Io=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=hAJs6Kkw+9+vvyoU1y/nXsiUK3eEKwGxFAum6AviBE/SCtW6EPYf4bYTcp9hAo8ZfyLm3eXn2SrjWx29iWp0JDbjB5aSUDXGuJD95jNvkEmBELiDCc7hs8/oHJ7WlKtUXLCRoGB0Q4CXxx2N5KcFcAnA+PDux99Qa3xluzFxHT4= 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:d189:60c:9a01:7dca]) (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 1E8D266FD0B for ; Wed, 18 Jun 2025 12:00:38 +0000 (UTC) Received: from dspam.blackshift.org (localhost [127.0.0.1]) by bjornoya.blackshift.org (Postfix) with SMTP id E282E42B5DF for ; Wed, 18 Jun 2025 12:00:37 +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 C6E0A42B51C; Wed, 18 Jun 2025 12:00:29 +0000 (UTC) Received: from hardanger.blackshift.org (localhost [::1]) by hardanger.blackshift.org (OpenSMTPD) with ESMTP id d27fa505; Wed, 18 Jun 2025 12:00:28 +0000 (UTC) From: Marc Kleine-Budde Date: Wed, 18 Jun 2025 14:00:08 +0200 Subject: [PATCH net-next v4 08/11] 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: <20250618-fec-cleanups-v4-8-c16f9a1af124@pengutronix.de> References: <20250618-fec-cleanups-v4-0-c16f9a1af124@pengutronix.de> In-Reply-To: <20250618-fec-cleanups-v4-0-c16f9a1af124@pengutronix.de> To: Wei Fang , Shenwei Wang , Clark Wang , "David S. Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , Richard Cochran , Andrew Lunn , Alexander Lobakin Cc: imx@lists.linux.dev, netdev@vger.kernel.org, linux-kernel@vger.kernel.org, kernel@pengutronix.de, bpf@vger.kernel.org, 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=d2s47WrGXyJ55EikpwIGb0io5Gno7Udfij0nMkKw7Io=; b=owEBbQGS/pANAwAKAQx0Zd/5kJGcAcsmYgBoUqpRgYy8jVpqGZQV8JkBw+i4c36erghOVhgux LxSGaGwkwyJATMEAAEKAB0WIQSf+wzYr2eoX/wVbPMMdGXf+ZCRnAUCaFKqUQAKCRAMdGXf+ZCR nFTDB/9LbEev/vhMNGqh8wJxBiYanmMEUtiZt8mWJPwNKwE1O435hiWtSdPg7kvFhFlUwwUfkR5 qNYfy69JgBV3yfhy9xq8Luu9IIeKxjJuxMLhp5KZbUAsh40fON6mO8VkELVzRyfIPKRLkv9dZcm fPNLED/tQUtKOZu5yezmRmQwm4f3craw3aOpk8AsXiMTwmD9CMlIRZRzcPKE85PaFkem8h9pJ6u tT2Ze+HwIBE49Pl+Pt4AO45aggRfYVRTs3K/qE+82FEgHCZga+RkwoD1wnWl240vjDVRk14+ibk nUxmgIixgFSRdlsjng9I5cj1+RP7gSkkRwmIEGzpSfR1XpUo 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 9e4164fc0cd1..45dd96f4786e 100644 --- a/drivers/net/ethernet/freescale/fec_main.c +++ b/drivers/net/ethernet/freescale/fec_main.c @@ -1859,8 +1859,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 08:57:32 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 0496D2E54AC for ; Wed, 18 Jun 2025 12:00:41 +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=1750248044; cv=none; b=YWl9ByYir1xSGmzbWLvdE2rN5pvNnhHJhK9BVba1GDqUZnJ8fDtjwmiHjK+NkzhvdPrG0ivGAm+k0rulZpCaH2a5zo0jsvS+we36DXi2hsfibHs4TY4I9RU97AE2R18Zg/l6aqXtmAkuXPxYVtA2pMADvKXRw7d6/sfxrxqMBdk= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1750248044; c=relaxed/simple; bh=d5vyFFOVdCxOdhaOgum7MrsgoFVZGuWdIIJfimLcWNA=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=G7CDWyJh/m+m5xyHDJdESvwhPb2lF83uIOt1LlmumvFtUqQOW5fsqoKTift7gXa/UGKUlkwPRuJpl5A2msa1FQoycbBHV6UNkEbwL53nIPFzy0eUCohoJAYyKAahQCoh78vsWhls7qqavLlcb+VwAk+NNeVNReEiktE67hIzXUE= 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:d189:60c:9a01:7dca]) (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 C9D6466FD01 for ; Wed, 18 Jun 2025 12:00:37 +0000 (UTC) Received: from dspam.blackshift.org (localhost [127.0.0.1]) by bjornoya.blackshift.org (Postfix) with SMTP id 9755342B5D7 for ; Wed, 18 Jun 2025 12:00:37 +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 E26DD42B520; Wed, 18 Jun 2025 12:00:29 +0000 (UTC) Received: from hardanger.blackshift.org (localhost [::1]) by hardanger.blackshift.org (OpenSMTPD) with ESMTP id db7b2a1d; Wed, 18 Jun 2025 12:00:28 +0000 (UTC) From: Marc Kleine-Budde Date: Wed, 18 Jun 2025 14:00:09 +0200 Subject: [PATCH net-next v4 09/11] 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: <20250618-fec-cleanups-v4-9-c16f9a1af124@pengutronix.de> References: <20250618-fec-cleanups-v4-0-c16f9a1af124@pengutronix.de> In-Reply-To: <20250618-fec-cleanups-v4-0-c16f9a1af124@pengutronix.de> To: Wei Fang , Shenwei Wang , Clark Wang , "David S. Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , Richard Cochran , Andrew Lunn , Alexander Lobakin Cc: imx@lists.linux.dev, netdev@vger.kernel.org, linux-kernel@vger.kernel.org, kernel@pengutronix.de, bpf@vger.kernel.org, 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=d5vyFFOVdCxOdhaOgum7MrsgoFVZGuWdIIJfimLcWNA=; b=owEBbQGS/pANAwAKAQx0Zd/5kJGcAcsmYgBoUqpTWgYTMe2LV11WvghToiwQGpm6PRxRpnFZ3 r0rzzyVr6eJATMEAAEKAB0WIQSf+wzYr2eoX/wVbPMMdGXf+ZCRnAUCaFKqUwAKCRAMdGXf+ZCR nJ+hCACnkhZqRATGz26U2r/1jt0e6Aq6xiCVwF9Qv+qbzHbWIBS6RHNlv921A53zHuaBp4O1qbS 6DYT5I/tK9VTvYHIMWOGwfC5Oa6FwSqA//SpQjIk584RJvjr2wceLknxhrbaK/EdRwCR4Oahvfx yR8KX9m8tATTCzx3A9twvC5JJe7xq6qc5K8FoxrHw3dd5LYyyQOkWv45qBGOzw/pQsHzszYcbVC XOuHXNNxduKzjYEgmhhxCnqYtt5+nl4Y+hk9AXFRjkRINZj4dviniBjRGphBsamqmkSaawrHxau DIB60bwJzIPfQpcE87P01uO3d2SmnCXestI5T3E4c45CrAGq 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 45dd96f4786e..84dd08473280 100644 --- a/drivers/net/ethernet/freescale/fec_main.c +++ b/drivers/net/ethernet/freescale/fec_main.c @@ -1720,7 +1720,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; @@ -1843,10 +1842,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; @@ -1864,7 +1864,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 08:57:32 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 E0C8C2E54D4 for ; Wed, 18 Jun 2025 12:00:42 +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=1750248045; cv=none; b=KDSfdvKZBHbHLNVrvr+tavO2CaDCUEzYd3unHmnik1Z7qFuEg1GjmWTfoc8ilNn7pwl310AvPdBewaWlw+RQnQh11s8oBEN6JSNiCIhwBIf6bULPOhIkAPqP2+pFq6fi3gbR32snmAfJa4zKjv0aRJQDpDNvo4LfjhuuqiSpZ+8= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1750248045; c=relaxed/simple; bh=QeKkEP7CAP29y+fcW+jLOVozLyq2xKCYF8wclT9C4qw=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=hx+kijzwYJqQKiwudnatWvFN8yHxX7zyiAFuq/SkwzH2iDo7J8JAeB72U/zOGnIKLdIerdZD8OCb+uW/hoeht2Hf7CPB94wWj6N8c+kRm15t1GJO8lw6YLy9t5dr8CYAManywofjodrJMR0vYAVNFua2LaERD0NkvAFM1NgKYx0= 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:d189:60c:9a01:7dca]) (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 0987666FD09 for ; Wed, 18 Jun 2025 12:00:38 +0000 (UTC) Received: from dspam.blackshift.org (localhost [127.0.0.1]) by bjornoya.blackshift.org (Postfix) with SMTP id C920942B5DD for ; Wed, 18 Jun 2025 12:00:37 +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 07D1B42B522; Wed, 18 Jun 2025 12:00:30 +0000 (UTC) Received: from hardanger.blackshift.org (localhost [::1]) by hardanger.blackshift.org (OpenSMTPD) with ESMTP id 9fc1adae; Wed, 18 Jun 2025 12:00:28 +0000 (UTC) From: Marc Kleine-Budde Date: Wed, 18 Jun 2025 14:00:10 +0200 Subject: [PATCH net-next v4 10/11] 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: <20250618-fec-cleanups-v4-10-c16f9a1af124@pengutronix.de> References: <20250618-fec-cleanups-v4-0-c16f9a1af124@pengutronix.de> In-Reply-To: <20250618-fec-cleanups-v4-0-c16f9a1af124@pengutronix.de> To: Wei Fang , Shenwei Wang , Clark Wang , "David S. Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , Richard Cochran , Andrew Lunn , Alexander Lobakin Cc: imx@lists.linux.dev, netdev@vger.kernel.org, linux-kernel@vger.kernel.org, kernel@pengutronix.de, bpf@vger.kernel.org, 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=QeKkEP7CAP29y+fcW+jLOVozLyq2xKCYF8wclT9C4qw=; b=owEBbQGS/pANAwAKAQx0Zd/5kJGcAcsmYgBoUqpYA9XBfvj93nnhx/7Q5jcyqmRl1R4QTxbXN k2GT+kyv4KJATMEAAEKAB0WIQSf+wzYr2eoX/wVbPMMdGXf+ZCRnAUCaFKqWAAKCRAMdGXf+ZCR nGMTCACDpTpLM++3UmmvDZiKmd3oXJNdtyTshheMzc2enORyzkVNlvr8SoKZAyHHUYWVWuJ5NTE MIG0a55434Pb6NRn+jxfRbzNhSQnMNP+5PQ//hd6Vb4Q7tN5Vo/Ym3S65mKTq5AN6tLIxhlpj1M oEjm1unv3cpKeQiE6i8oFPFFUFT5bpA7pa8yojSCgarRpQkKY0c/ODCBMyzO/CLjSx03zx3HtXt WY0l+29lAwjgmtTamErh49JCah0QUc0kJCX3lOF0GXMzywSrZT5B4CBuYCdmHytVy+myP5VnaiF aw/TchvbBR0ljjlDPU+MW0D5GiRhKN66IFiTTXx6yrHcKMo1 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 84dd08473280..6797aa1ed639 100644 --- a/drivers/net/ethernet/freescale/fec_main.c +++ b/drivers/net/ethernet/freescale/fec_main.c @@ -1722,8 +1722,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); @@ -1854,18 +1852,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); @@ -1885,12 +1883,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 08:57:32 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 260E32E54C3 for ; Wed, 18 Jun 2025 12:00:42 +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=1750248044; cv=none; b=MWq2i7K3aHrfe5wybT8rK84D7HdcNKdMl9qbPylh/4LDpVKsKF8Sw8pdL/g/M5MyBzq96qu5RrbfvN/9k5lcCPYJGYGRGoKc2Tw57uw5i3qEBII/BDC1va1t9wGpRPaFsun6gvwnacrRiLJp365pBrQmMd/CUkAVRVVB5sFqa7I= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1750248044; c=relaxed/simple; bh=PMHgw81XIjkNeSXXll/6bz9Ldxq3m67MxfOiZzQjVBc=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=OYzHfBffDkLnCoziloMXkY7xaFr7wP8UiAMfhzJjDYA6ChPj3SKk7Sr8KVz6X/M6TvsZqnYTrh3sUdcImlJ9D9au8Ptmbnkue0xGSBk+Eq7s2BOwoFGQvNZc188XWMLw4AHtDdOiQanmMU6nG7hyC4lEgtSRlHcRPVoF7JqT9Fw= 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:d189:60c:9a01:7dca]) (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 074D966FD06 for ; Wed, 18 Jun 2025 12:00:38 +0000 (UTC) Received: from dspam.blackshift.org (localhost [127.0.0.1]) by bjornoya.blackshift.org (Postfix) with SMTP id C656542B5DB for ; Wed, 18 Jun 2025 12:00:37 +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 2A35642B527; Wed, 18 Jun 2025 12:00:30 +0000 (UTC) Received: from hardanger.blackshift.org (localhost [::1]) by hardanger.blackshift.org (OpenSMTPD) with ESMTP id b7be5052; Wed, 18 Jun 2025 12:00:28 +0000 (UTC) From: Marc Kleine-Budde Date: Wed, 18 Jun 2025 14:00:11 +0200 Subject: [PATCH net-next v4 11/11] 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: <20250618-fec-cleanups-v4-11-c16f9a1af124@pengutronix.de> References: <20250618-fec-cleanups-v4-0-c16f9a1af124@pengutronix.de> In-Reply-To: <20250618-fec-cleanups-v4-0-c16f9a1af124@pengutronix.de> To: Wei Fang , Shenwei Wang , Clark Wang , "David S. Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , Richard Cochran , Andrew Lunn , Alexander Lobakin Cc: imx@lists.linux.dev, netdev@vger.kernel.org, linux-kernel@vger.kernel.org, kernel@pengutronix.de, bpf@vger.kernel.org, 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=PMHgw81XIjkNeSXXll/6bz9Ldxq3m67MxfOiZzQjVBc=; b=owEBbQGS/pANAwAKAQx0Zd/5kJGcAcsmYgBoUqpaYjb2JWZO8kIHnOfp7gBUnRqDhgsRyzGUj VoR9B7PbSqJATMEAAEKAB0WIQSf+wzYr2eoX/wVbPMMdGXf+ZCRnAUCaFKqWgAKCRAMdGXf+ZCR nMKjB/4xBAVWZp3BXyWtzQ6eCDsmjQfRkrCPp/XxunVoQLzdqKi7NTYRBoTcfq3IxppHa50pewJ WKlJe79myDdO9SdD2zNBtZALu5FwYrgsmV7aqQlvit3awPdmxX0rk1OCR3N4pBf8PFgKMXlMhPE IPSckb00+pTWPJF7h+Cd8YWO+eCaxajwEWKfUittCXPopSNe8Umi/xZvWf8KR1iRpohAzL/8Uo6 D/SrkRkurA/NSUteXMow9aBHkbn/veIpKhAoW7CdCLc0da5MgiMDGRkI/GhAdli3syl9tZz25oM RR6mLdKyJSsvicJDyO9wihl3lOfA3p3KmgWprYYuyb2iOLuN 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 6797aa1ed639..63dac4272045 100644 --- a/drivers/net/ethernet/freescale/fec_main.c +++ b/drivers/net/ethernet/freescale/fec_main.c @@ -1706,6 +1706,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, @@ -1852,19 +1868,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