netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Giuseppe CAVALLARO <peppe.cavallaro@st.com>
To: Deepak SIKRI <deepak.sikri@st.com>
Cc: spear-devel@list.st.com, netdev@vger.kernel.org
Subject: Re: [PATCH 1/6] stmmac: Define CSUM offload engine Types
Date: Mon, 05 Mar 2012 15:13:28 +0100	[thread overview]
Message-ID: <4F54CA08.7050207@st.com> (raw)
In-Reply-To: <1330692928-30330-2-git-send-email-deepak.sikri@st.com>

Hello Deepak

On 3/2/2012 1:55 PM, Deepak SIKRI wrote:
> This patch explicitly defines the CSUM offload engine type which need
> (not mandatory) to be passed from the platform code.
> STMMAC core supports two check sum offload engine types- Type-1 & Type-2.
> Also, there are STMMAC cores that do not have the check sum offload
> capabilities.
> The behaviour of Type-1 & Type-2 cores related to provision of checksum
> increases the packet length for Type-1 cores by 2, as the checksum is appended
> at the end of data packet and the same is made accountable in the DMA status.
> The STMMAC cores beyond Version-3.5 provide HW interface registers which allows
> the user to read the HW capabilities, while to support the previous cores the
> information related to HW capabilities has to be provided from the platform
> code.
> The Type-1 cores which do not have the HW register interface need this
> information.

this patch is useful but I've some notes.

Pay attention that, new GMAC devices have the HW capability register to
understand if the rx_coe_type is TYPE1 or TYPE2.
These values should always override the ones come from the platform.
This check is missing in your code.
Can I ask you to rename csum_off_engine_type as rx_coe_type to be
aligned to the name convention used inside the driver.

Regards
Peppe

> Signed-off-by: Deepak Sikri <deepak.sikri@st.com>
> ---
>  include/linux/stmmac.h |   13 +++++++++++++
>  1 files changed, 13 insertions(+), 0 deletions(-)
> 
> diff --git a/include/linux/stmmac.h b/include/linux/stmmac.h
> index 0dddc9e..aa0d99e 100644
> --- a/include/linux/stmmac.h
> +++ b/include/linux/stmmac.h
> @@ -28,6 +28,18 @@
>  
>  #include <linux/platform_device.h>
>  
> +/* Checksum offload engine Types */
> +/* STMMAC core supports two check sum offloading engine types
> + * Type-1 & Type-2
> + * These are configurable portion of the MAC core and hence could be
> + * also made off. 
> + * The Type-0 Macro defined below covers the core which do not support
> + * the checksum offloading.
> + */
> +#define STMMAC_CSUM_T0	0
> +#define STMMAC_CSUM_T1	1
> +#define STMMAC_CSUM_T2	2
> +
>  /* Platfrom data for platform device structure's platform_data field */
>  
>  struct stmmac_mdio_bus_data {
> @@ -57,5 +69,6 @@ struct plat_stmmacenet_data {
>  	void (*exit)(struct platform_device *pdev);
>  	void *custom_cfg;
>  	void *bsp_priv;
> +	int csum_off_engine_type;
>  };
>  #endif

  parent reply	other threads:[~2012-03-05 14:14 UTC|newest]

Thread overview: 32+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-03-02 12:55 [PATCH 0/6] stmmac: Driver Updates Deepak Sikri
2012-03-02 12:55 ` [PATCH 1/6] stmmac: Define CSUM offload engine Types Deepak Sikri
2012-03-02 12:55   ` [PATCH 2/6] stmmac: Define MDC clock selection macros Deepak Sikri
2012-03-02 12:55     ` [PATCH 3/6] stmmac: Add support for CPU freq notifiers Deepak Sikri
2012-03-02 12:55       ` [PATCH 4/6] stmmac: Update stmmac descriptor checks for stmmac core prior to Rev-3.5 Deepak Sikri
2012-03-02 12:55         ` [PATCH 5/6] stmmac: configure burst related GMAC DMA parameters Deepak Sikri
2012-03-02 12:55           ` [PATCH 6/6] stmmac: Replace infinite loops by timeouts in mdio r/w Deepak Sikri
2012-03-06  7:55             ` Giuseppe CAVALLARO
2012-03-05  1:52           ` [PATCH 5/6] stmmac: configure burst related GMAC DMA parameters David Miller
2012-03-07  5:39             ` deepaksi
2012-03-06  7:43           ` Giuseppe CAVALLARO
2012-03-07  6:18             ` deepaksi
2012-03-05  1:51         ` [PATCH 4/6] stmmac: Update stmmac descriptor checks for stmmac core prior to Rev-3.5 David Miller
2012-03-05  4:01           ` Shiraz Hashim
2012-03-05  4:59             ` David Miller
2012-03-07  8:26           ` deepaksi
2012-03-06  7:10         ` Giuseppe CAVALLARO
2012-03-07  8:25           ` deepaksi
2012-03-07  8:45             ` Giuseppe CAVALLARO
2012-03-05  1:50       ` [PATCH 3/6] stmmac: Add support for CPU freq notifiers David Miller
2012-03-07  7:18         ` deepaksi
2012-03-05 15:05       ` Giuseppe CAVALLARO
2012-03-06  8:04         ` Giuseppe CAVALLARO
2012-03-07  8:28           ` deepaksi
2012-03-07  7:17         ` deepaksi
2012-03-05 14:34     ` [PATCH 2/6] stmmac: Define MDC clock selection macros Giuseppe CAVALLARO
2012-03-07  6:55       ` deepaksi
2012-03-07  7:19         ` Giuseppe CAVALLARO
2012-03-07  8:30           ` deepaksi
2012-03-05 14:13   ` Giuseppe CAVALLARO [this message]
2012-03-07  6:50     ` [PATCH 1/6] stmmac: Define CSUM offload engine Types deepaksi
2012-03-05 15:31 ` [PATCH 0/6] stmmac: Driver Updates Giuseppe CAVALLARO

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=4F54CA08.7050207@st.com \
    --to=peppe.cavallaro@st.com \
    --cc=deepak.sikri@st.com \
    --cc=netdev@vger.kernel.org \
    --cc=spear-devel@list.st.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).