Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1524416

Re: [RFC PATCH 2/2] net: macb: Add 64 bit addressing support for GEM

From Rafal Ozieblo <rafalo@cadence.com>
Newsgroups linux.kernel
Subject Re: [RFC PATCH 2/2] net: macb: Add 64 bit addressing support for GEM
Date 2016-11-17 13:00 +0100
Message-ID <sEtwd-b3-1@gated-at.bofh.it> (permalink)
Organization linux.* mail to news gateway

Show all headers | View raw


Hello,
I think, there could a bug in your patch.

> +
> +#ifdef CONFIG_ARCH_DMA_ADDR_T_64BIT
> +             dmacfg |= GEM_BIT(ADDR64);
> +#endif

You enable 64 bit addressing (64b dma bus width) always when appropriate architecture config option is enabled.
But there are some legacy controllers which do not support that feature. According Cadence hardware team:
"64 bit addressing was added in July 2013. Earlier version do not have it.
This feature was enhanced in release August 2014 to have separate upper address values for transmit and receive."

> /* Bitfields in NSR */
> @@ -474,6 +479,10 @@
>  struct macb_dma_desc {
 >	u32	addr;
>  	u32	ctrl;
> +#ifdef CONFIG_ARCH_DMA_ADDR_T_64BIT
> +	u32     addrh;
> +	u32     resvd;
> +#endif
>  };

It will not work for legacy hardware. Old descriptor is 2 words wide, the new one is 4 words wide.
If you enable CONFIG_ARCH_DMA_ADDR_T_64BIT but hardware doesn't support it at all,
you will miss every second descriptor.

Regards,
Rafal

 

Back to linux.kernel | Previous | NextNext in thread | Find similar | Unroll thread


Thread

Re: [RFC PATCH 2/2] net: macb: Add 64 bit addressing support for GEM Rafal Ozieblo <rafalo@cadence.com> - 2016-11-17 13:00 +0100
  Re: [RFC PATCH 2/2] net: macb: Add 64 bit addressing support for GEM Nicolas Ferre <nicolas.ferre@atmel.com> - 2016-11-17 15:30 +0100
    RE: [RFC PATCH 2/2] net: macb: Add 64 bit addressing support for GEM Rafal Ozieblo <rafalo@cadence.com> - 2016-11-17 19:10 +0100
      Re: [RFC PATCH 2/2] net: macb: Add 64 bit addressing support for GEM Harini Katakam <harinikatakamlinux@gmail.com> - 2016-11-18 05:40 +0100
        Re: [RFC PATCH 2/2] net: macb: Add 64 bit addressing support for GEM Nicolas Ferre <nicolas.ferre@atmel.com> - 2016-11-18 10:20 +0100
          Re: [RFC PATCH 2/2] net: macb: Add 64 bit addressing support for GEM Harini Katakam <harinikatakamlinux@gmail.com> - 2016-11-18 10:50 +0100
            Re: [RFC PATCH 2/2] net: macb: Add 64 bit addressing support for GEM Harini Katakam <harinikatakamlinux@gmail.com> - 2016-11-18 11:10 +0100
            RE: [RFC PATCH 2/2] net: macb: Add 64 bit addressing support for GEM Rafal Ozieblo <rafalo@cadence.com> - 2016-11-18 11:20 +0100
              Re: [RFC PATCH 2/2] net: macb: Add 64 bit addressing support for GEM Nicolas Ferre <nicolas.ferre@atmel.com> - 2016-11-18 11:20 +0100
            Re: [RFC PATCH 2/2] net: macb: Add 64 bit addressing support for GEM Andrei Pistirica <andrei.pistirica@microchip.com> - 2016-11-18 11:20 +0100
              Re: [RFC PATCH 2/2] net: macb: Add 64 bit addressing support for GEM Harini Katakam <harinikatakamlinux@gmail.com> - 2016-11-18 11:40 +0100
          RE: [RFC PATCH 2/2] net: macb: Add 64 bit addressing support for GEM Rafal Ozieblo <rafalo@cadence.com> - 2016-11-18 10:50 +0100
        RE: [RFC PATCH 2/2] net: macb: Add 64 bit addressing support for GEM Rafal Ozieblo <rafalo@cadence.com> - 2016-11-18 10:40 +0100
          Re: [RFC PATCH 2/2] net: macb: Add 64 bit addressing support for GEM Harini Katakam <harinikatakamlinux@gmail.com> - 2016-11-18 11:20 +0100
            RE: [RFC PATCH 2/2] net: macb: Add 64 bit addressing support for GEM Rafal Ozieblo <rafalo@cadence.com> - 2016-11-18 12:30 +0100
  RE: [RFC PATCH 2/2] net: macb: Add 64 bit addressing support for GEM Rafal Ozieblo <rafalo@cadence.com> - 2016-11-17 18:40 +0100
  Re: [RFC PATCH 2/2] net: macb: Add 64 bit addressing support for GEM Harini Katakam <harinikatakamlinux@gmail.com> - 2016-11-17 20:10 +0100

csiph-web