netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [RFC PATCH 1/2] net: macb: Correct CAPS mask
@ 2016-08-01  7:20 Harini Katakam
  2016-08-01  7:20 ` [RFC PATCH 2/2] net: macb: Add 64 bit addressing support for GEM Harini Katakam
  2016-08-04 14:07 ` [RFC PATCH 1/2] net: macb: Correct CAPS mask Nicolas Ferre
  0 siblings, 2 replies; 21+ messages in thread
From: Harini Katakam @ 2016-08-01  7:20 UTC (permalink / raw)
  To: nicolas.ferre, davem, harinikatakamlinux
  Cc: netdev, linux-kernel, harinik, punnaia, michals

USRIO and JUMBO CAPS have the same mask.
Fix the same.

Signed-off-by: Harini Katakam <harinik@xilinx.com>
---
 drivers/net/ethernet/cadence/macb.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/net/ethernet/cadence/macb.h b/drivers/net/ethernet/cadence/macb.h
index 36893d8..b6fcf10 100644
--- a/drivers/net/ethernet/cadence/macb.h
+++ b/drivers/net/ethernet/cadence/macb.h
@@ -403,11 +403,11 @@
 #define MACB_CAPS_USRIO_DEFAULT_IS_MII_GMII	0x00000004
 #define MACB_CAPS_NO_GIGABIT_HALF		0x00000008
 #define MACB_CAPS_USRIO_DISABLED		0x00000010
+#define MACB_CAPS_JUMBO				0x00000020
 #define MACB_CAPS_FIFO_MODE			0x10000000
 #define MACB_CAPS_GIGABIT_MODE_AVAILABLE	0x20000000
 #define MACB_CAPS_SG_DISABLED			0x40000000
 #define MACB_CAPS_MACB_IS_GEM			0x80000000
-#define MACB_CAPS_JUMBO				0x00000010
 
 /* Bit manipulation macros */
 #define MACB_BIT(name)					\
-- 
2.7.4

^ permalink raw reply related	[flat|nested] 21+ messages in thread
* Re: [RFC PATCH 2/2] net: macb: Add 64 bit addressing support for GEM
@ 2016-11-17 11:50 Rafal Ozieblo
  2016-11-17 12:21 ` Harini Katakam
  0 siblings, 1 reply; 21+ messages in thread
From: Rafal Ozieblo @ 2016-11-17 11:50 UTC (permalink / raw)
  To: harini.katakam@xilinx.com
  Cc: nicolas.ferre@atmel.com, netdev@vger.kernel.org,
	linux-kernel@vger.kernel.org

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

 

^ permalink raw reply	[flat|nested] 21+ messages in thread

end of thread, other threads:[~2016-11-18 11:28 UTC | newest]

Thread overview: 21+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-08-01  7:20 [RFC PATCH 1/2] net: macb: Correct CAPS mask Harini Katakam
2016-08-01  7:20 ` [RFC PATCH 2/2] net: macb: Add 64 bit addressing support for GEM Harini Katakam
2016-08-04 14:07 ` [RFC PATCH 1/2] net: macb: Correct CAPS mask Nicolas Ferre
2016-08-05  4:18   ` Harini Katakam
  -- strict thread matches above, loose matches on Subject: below --
2016-11-17 11:50 [RFC PATCH 2/2] net: macb: Add 64 bit addressing support for GEM Rafal Ozieblo
2016-11-17 12:21 ` Harini Katakam
2016-11-17 12:57   ` Rafal Ozieblo
2016-11-17 13:28   ` Nicolas Ferre
2016-11-17 13:35     ` Rafal Ozieblo
2016-11-18  4:29       ` Harini Katakam
2016-11-18  8:59         ` Rafal Ozieblo
2016-11-18  9:10           ` Nicolas Ferre
2016-11-18  9:30             ` Rafal Ozieblo
2016-11-18  9:43               ` Harini Katakam
2016-11-18  9:59                 ` Rafal Ozieblo
2016-11-18 10:03                   ` Harini Katakam
2016-11-18 10:14                   ` Nicolas Ferre
2016-11-18 10:07                 ` Andrei Pistirica
2016-11-18 10:32                   ` Harini Katakam
2016-11-18  9:58           ` Harini Katakam
2016-11-18 11:28             ` Rafal Ozieblo

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).