lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAFcVEC+K-jX4rU20Qa1BEi-KCLKCFb=3Q3OKgknTgP-Zhn10Fg@mail.gmail.com>
Date:	Mon, 21 Sep 2015 23:18:06 +0530
From:	Harini Katakam <harinikatakamlinux@...il.com>
To:	Harini Katakam <harini.katakam@...inx.com>
Cc:	Nicolas Ferre <nicolas.ferre@...el.com>, davem@...emloft.net,
	Rob Herring <robh+dt@...nel.org>,
	Pawel Moll <pawel.moll@....com>,
	Mark Rutland <mark.rutland@....com>,
	"ijc+devicetree@...lion.org.uk" <ijc+devicetree@...lion.org.uk>,
	Kumar Gala <galak@...eaurora.org>,
	Boris Brezillon <boris.brezillon@...e-electrons.com>,
	alexandre.belloni@...e-electrons.com, netdev@...r.kernel.org,
	"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
	"devicetree@...r.kernel.org" <devicetree@...r.kernel.org>,
	Punnaiah Choudary Kalluri <punnaia@...inx.com>,
	"michals@...inx.com" <michals@...inx.com>, anirudh@...inx.com
Subject: Re: [RFC PATCH 1/3] net: macb: Add support for extended BD with a
 config option

On Fri, Sep 11, 2015 at 1:27 PM, Harini Katakam
<harini.katakam@...inx.com> wrote:
> Cadence GEM supports extended buffer descriptors.
> This patch adds a config option to enable use of extended BD.
> This adds two extra words to the TX BD and RX BD by configuring the
> necessary registers. Corresponding variables are added to the
> macb_dma_desc structure.
>
> Signed-off-by: Harini Katakam <harinik@...inx.com>
> ---
>  drivers/net/ethernet/cadence/Kconfig |    8 ++++++++
>  drivers/net/ethernet/cadence/macb.c  |    4 ++++
>  drivers/net/ethernet/cadence/macb.h  |    8 ++++++++
>  3 files changed, 20 insertions(+)
>
> diff --git a/drivers/net/ethernet/cadence/Kconfig b/drivers/net/ethernet/cadence/Kconfig
> index f0bcb15..33e4198 100644
> --- a/drivers/net/ethernet/cadence/Kconfig
> +++ b/drivers/net/ethernet/cadence/Kconfig
> @@ -31,4 +31,12 @@ config MACB
>           To compile this driver as a module, choose M here: the module
>           will be called macb.
>
> +config MACB_EXT_BD
> +       tristate "Cadence MACB/GEM extended buffer descriptor"
> +       depends on HAS_DMA && MACB
> +       ---help---
> +         The Cadence MACB host supports use of extended buffer descriptor.
> +         This option enables additon of two extra words to TX BD and RX BD.
> +         These two extra words are currently used to obtain PTP timestamp.
> +
>  endif # NET_CADENCE
> diff --git a/drivers/net/ethernet/cadence/macb.c b/drivers/net/ethernet/cadence/macb.c
> index 88c1e1a..bb2932c 100644
> --- a/drivers/net/ethernet/cadence/macb.c
> +++ b/drivers/net/ethernet/cadence/macb.c
> @@ -1665,6 +1665,10 @@ static void macb_configure_dma(struct macb *bp)
>                         dmacfg |= GEM_BIT(TXCOEN);
>                 else
>                         dmacfg &= ~GEM_BIT(TXCOEN);
> +#ifdef CONFIG_MACB_EXT_BD
> +               dmacfg |= GEM_BIT(RXBDEXT);
> +               dmacfg |= GEM_BIT(TXBDEXT);
> +#endif
>                 netdev_dbg(bp->dev, "Cadence configure DMA with 0x%08x\n",
>                            dmacfg);
>                 gem_writel(bp, DMACFG, dmacfg);
> diff --git a/drivers/net/ethernet/cadence/macb.h b/drivers/net/ethernet/cadence/macb.h
> index 6e1faea..58c9870 100644
> --- a/drivers/net/ethernet/cadence/macb.h
> +++ b/drivers/net/ethernet/cadence/macb.h
> @@ -244,6 +244,10 @@
>  #define GEM_RXBS_SIZE          8
>  #define GEM_DDRP_OFFSET                24 /* disc_when_no_ahb */
>  #define GEM_DDRP_SIZE          1
> +#define GEM_RXBDEXT_OFFSET     28 /* Extended RX BD */
> +#define GEM_RXBDEXT_SIZE       1
> +#define GEM_TXBDEXT_OFFSET     29 /* Extended TX BD */
> +#define GEM_TXBDEXT_SIZE       1
>
>
>  /* Bitfields in NSR */
> @@ -466,6 +470,10 @@
>  struct macb_dma_desc {
>         u32     addr;
>         u32     ctrl;
> +#ifdef CONFIG_MACB_EXT_BD
> +       u32     tsl;
> +       u32     tsh;
> +#endif
>  };
>
>  /* DMA descriptor bitfields */
> --
> 1.7.9.5
>

Any comment on this?

Regards,
Harini
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ