linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
From: Jakub Kicinski <kuba@kernel.org>
To: Parvathi Pudi <parvathi@couthit.com>
Cc: vigneshr@ti.com, praneeth@ti.com, edumazet@google.com,
	glaroque@baylibre.com, pmohan@couthit.com, diogo.ivo@siemens.com,
	robh@kernel.org, javier.carrasco.cruz@gmail.com,
	saikrishnag@marvell.com, m-karicheri2@ti.com,
	jacob.e.keller@intel.com, pabeni@redhat.com,
	richardcochran@gmail.com, devicetree@vger.kernel.org,
	conor+dt@kernel.org, mohan@couthit.com, s.hauer@pengutronix.de,
	prajith@ti.com, rogerq@kernel.org, basharath@couthit.com,
	ssantosh@kernel.org, vadim.fedorenko@linux.dev,
	linux-arm-kernel@lists.infradead.org, rogerq@ti.com, srk@ti.com,
	pratheesh@ti.com, m-malladi@ti.com, netdev@vger.kernel.org,
	linux-kernel@vger.kernel.org, danishanwar@ti.com, afd@ti.com,
	andrew+netdev@lunn.ch, horms@kernel.org, krishna@couthit.com,
	krzk+dt@kernel.org, davem@davemloft.net
Subject: Re: [PATCH net-next v10 03/11] net: ti: prueth: Adds PRUETH HW and SW configuration
Date: Tue, 8 Jul 2025 17:53:01 -0700	[thread overview]
Message-ID: <20250708175301.599c82b8@kernel.org> (raw)
In-Reply-To: <20250702140633.1612269-4-parvathi@couthit.com>

On Wed,  2 Jul 2025 19:36:25 +0530 Parvathi Pudi wrote:
> diff --git a/drivers/net/ethernet/ti/icssm/icssm_prueth.c b/drivers/net/ethernet/ti/icssm/icssm_prueth.c
> index aed5cdc402b5..f52858da89d4 100644
> --- a/drivers/net/ethernet/ti/icssm/icssm_prueth.c
> +++ b/drivers/net/ethernet/ti/icssm/icssm_prueth.c
> +	txcfg = PRUSS_MII_RT_TXCFG_TX_ENABLE |
> +		PRUSS_MII_RT_TXCFG_TX_AUTO_PREAMBLE |
> +		PRUSS_MII_RT_TXCFG_TX_32_MODE_EN |
> +		(TX_START_DELAY << PRUSS_MII_RT_TXCFG_TX_START_DELAY_SHIFT) |
> +		(TX_CLK_DELAY_100M << PRUSS_MII_RT_TXCFG_TX_CLK_DELAY_SHIFT);

> +	/* Min frame length should be set to 64 to allow receive of standard
> +	 * Ethernet frames such as PTP, LLDP that will not have the tag/rct.
> +	 * Actual size written to register is size - 1 per TRM. This also
> +	 * includes CRC/FCS.
> +	 */
> +	txcfg = (((PRUSS_MII_RT_RX_FRMS_MIN_FRM - 1) <<
> +			PRUSS_MII_RT_RX_FRMS_MIN_FRM_SHIFT) &
> +			PRUSS_MII_RT_RX_FRMS_MIN_FRM_MASK);

Please use FIELD_PREP() instead of defining separate _MASK and _SHIFT
values.

> +	/* For EMAC, set Max frame size to 1528 i.e size with VLAN.
> +	 * Actual size written to register is size - 1 as per TRM.
> +	 * Since driver support run time change of protocol, driver
> +	 * must overwrite the values based on Ethernet type.
> +	 */
> +	txcfg |= (((PRUSS_MII_RT_RX_FRMS_MAX_SUPPORT_EMAC - 1) <<
> +			   PRUSS_MII_RT_RX_FRMS_MAX_FRM_SHIFT)	&
> +			   PRUSS_MII_RT_RX_FRMS_MAX_FRM_MASK);

> +struct prueth_queue_desc {
> +	u16 rd_ptr;
> +	u16 wr_ptr;
> +	u8 busy_s;
> +	u8 status;
> +	u8 max_fill_level;
> +	u8 overflow_cnt;
> +} __packed;

Please don't use __packed if the struct will be packed anyway based on
C packing rules.


  reply	other threads:[~2025-07-09  0:55 UTC|newest]

Thread overview: 25+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-07-02 14:06 [PATCH net-next v10 00/11] PRU-ICSSM Ethernet Driver Parvathi Pudi
2025-07-02 14:06 ` [PATCH net-next v10 01/11] dt-bindings: net: ti: Adds DUAL-EMAC mode support on PRU-ICSS2 for AM57xx, AM43xx and AM33xx SOCs Parvathi Pudi
2025-07-02 14:06 ` [PATCH net-next v10 02/11] net: ti: prueth: Adds ICSSM Ethernet driver Parvathi Pudi
2025-07-09  0:44   ` Jakub Kicinski
2025-07-11 12:25     ` Parvathi Pudi
2025-07-02 14:06 ` [PATCH net-next v10 03/11] net: ti: prueth: Adds PRUETH HW and SW configuration Parvathi Pudi
2025-07-09  0:53   ` Jakub Kicinski [this message]
2025-07-11 12:28     ` Parvathi Pudi
2025-07-02 15:17 ` [PATCH net-next v10 04/11] net: ti: prueth: Adds link detection, RX and TX support Parvathi Pudi
2025-07-09  1:01   ` Jakub Kicinski
2025-07-11 12:33     ` Parvathi Pudi
2025-07-16 13:11       ` Parvathi Pudi
2025-07-16 21:09         ` Jakub Kicinski
2025-07-18 10:47           ` Parvathi Pudi
2025-07-18 17:09             ` Jakub Kicinski
2025-07-02 15:17 ` [PATCH net-next v10 05/11] net: ti: prueth: Adds ethtool support for ICSSM PRUETH Driver Parvathi Pudi
2025-07-02 15:17 ` [PATCH net-next v10 06/11] net: ti: prueth: Adds HW timestamping support for PTP using PRU-ICSS IEP module Parvathi Pudi
2025-07-03 22:52   ` Vadim Fedorenko
2025-07-02 15:17 ` [PATCH net-next v10 07/11] net: ti: prueth: Adds support for network filters for traffic control supported by PRU-ICSS Parvathi Pudi
2025-07-02 16:24 ` [PATCH net-next v10 08/11] net: ti: prueth: Adds support for RX interrupt coalescing/pacing Parvathi Pudi
2025-07-02 16:24 ` [PATCH net-next v10 09/11] net: ti: prueth: Adds power management support for PRU-ICSS Parvathi Pudi
2025-07-02 16:24 ` [PATCH net-next v10 10/11] net: ti: prueth: Adds support for PRUETH on AM33x and AM43x SOCs Parvathi Pudi
2025-07-02 16:24 ` [PATCH net-next v10 11/11] net: ti: prueth: Adds PTP OC Support for AM335x and AM437x Parvathi Pudi
2025-07-09  0:33 ` [PATCH net-next v10 00/11] PRU-ICSSM Ethernet Driver Jakub Kicinski
2025-07-11 12:20   ` Parvathi Pudi

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20250708175301.599c82b8@kernel.org \
    --to=kuba@kernel.org \
    --cc=afd@ti.com \
    --cc=andrew+netdev@lunn.ch \
    --cc=basharath@couthit.com \
    --cc=conor+dt@kernel.org \
    --cc=danishanwar@ti.com \
    --cc=davem@davemloft.net \
    --cc=devicetree@vger.kernel.org \
    --cc=diogo.ivo@siemens.com \
    --cc=edumazet@google.com \
    --cc=glaroque@baylibre.com \
    --cc=horms@kernel.org \
    --cc=jacob.e.keller@intel.com \
    --cc=javier.carrasco.cruz@gmail.com \
    --cc=krishna@couthit.com \
    --cc=krzk+dt@kernel.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=m-karicheri2@ti.com \
    --cc=m-malladi@ti.com \
    --cc=mohan@couthit.com \
    --cc=netdev@vger.kernel.org \
    --cc=pabeni@redhat.com \
    --cc=parvathi@couthit.com \
    --cc=pmohan@couthit.com \
    --cc=prajith@ti.com \
    --cc=praneeth@ti.com \
    --cc=pratheesh@ti.com \
    --cc=richardcochran@gmail.com \
    --cc=robh@kernel.org \
    --cc=rogerq@kernel.org \
    --cc=rogerq@ti.com \
    --cc=s.hauer@pengutronix.de \
    --cc=saikrishnag@marvell.com \
    --cc=srk@ti.com \
    --cc=ssantosh@kernel.org \
    --cc=vadim.fedorenko@linux.dev \
    --cc=vigneshr@ti.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).