Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754057AbbEEEVw (ORCPT ); Tue, 5 May 2015 00:21:52 -0400 Received: from mail-lb0-f171.google.com ([209.85.217.171]:36314 "EHLO mail-lb0-f171.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751940AbbEEEVn (ORCPT ); Tue, 5 May 2015 00:21:43 -0400 MIME-Version: 1.0 In-Reply-To: <5547C23B.2080509@ni.com> References: <1430725960-8441-1-git-send-email-harinik@xilinx.com> <5547C23B.2080509@ni.com> Date: Tue, 5 May 2015 09:51:41 +0530 Message-ID: Subject: Re: [net-next PATCH v2 2/3] net: macb: Add support for jumbo frames From: Harini Katakam To: Jaeden Amero Cc: Harini Katakam , nicolas.ferre@atmel.com, davem@davemloft.net, Rob Herring , Pawel Moll , Mark Rutland , "ijc+devicetree@hellion.org.uk" , Kumar Gala , boris.brezillon@free-electrons.com, alexandre.belloni@free-electrons.com, netdev@vger.kernel.org, "linux-kernel@vger.kernel.org" , "devicetree@vger.kernel.org" , Punnaiah Choudary Kalluri , "michals@xilinx.com" Content-Type: text/plain; charset=UTF-8 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1948 Lines: 48 Hi, On Tue, May 5, 2015 at 12:32 AM, Jaeden Amero wrote: > On 05/04/2015 02:52 AM, Harini Katakam wrote: >> Check for "cdns,zynqmp-gem" compatible string and enable jumbo frame support >> in NWCFG register, update descriptor length masks and registers accordingly. >> Jumbo max length register should be set according to support in SoC; it is >> set to 10240 for Zynq Ultrascale+ MPSoC. >> >> Signed-off-by: Harini Katakam >> Reviewed-by: Punnaiah Choudary Kalluri >> --- >> >> On v1, Michal commented that I should use macb_config for jumbo parameters >> instead of defining them by reading the compatible string directly. >> I can use .caps for isjumbo. But jumbo-max-length needs to be defined. >> Can I add this to the structure? Any suggestions on how to handle this? >> >> v2: >> Add constant definition and update SoC name >> >> --- >> drivers/net/ethernet/cadence/macb.c | 21 ++++++++++++++++++--- >> drivers/net/ethernet/cadence/macb.h | 8 ++++++++ >> 2 files changed, 26 insertions(+), 3 deletions(-) >> >> diff --git a/drivers/net/ethernet/cadence/macb.c b/drivers/net/ethernet/cadence/macb.c >> @@ -2762,6 +2772,11 @@ static int macb_probe(struct platform_device *pdev) >> bp->pclk = pclk; >> bp->hclk = hclk; >> bp->tx_clk = tx_clk; >> + if (of_device_is_compatible(pdev->dev.of_node, "cdns,zynqmp-gem")) { >> + bp->isjumbo = 1; >> + bp->jumbo_max_len = GEM_ZYNQMP_JUMBO_MAX; > > Could you use the bottom 16 bits of DCFG2 instead of GEM_ZYNQMP_JUMBO_MAX? The bottom 16 bits are 0x3FFF but the ZynqMP SoC actually supports only upto 10K (0x2800). Regards, Harini -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/