Re: [net-next PATCH v2 2/3] net: macb: Add support for jumbo frames

From: Harini Katakam
Date: Tue May 05 2015 - 00:21:54 EST


Hi,

On Tue, May 5, 2015 at 12:32 AM, Jaeden Amero <jaeden.amero@xxxxxx> 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 <harinik@xxxxxxxxxx>
>> Reviewed-by: Punnaiah Choudary Kalluri <punnaia@xxxxxxxxxx>
>> ---
>>
>> 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
<snip>
>> @@ -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@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/