[PATCH v3 3/4] net: nb8800: Move HW init to ndo_open()

Måns Rullgård mans at mansr.com
Wed Nov 15 07:11:30 PST 2017


Marc Gonzalez <marc_gonzalez at sigmadesigns.com> writes:

> On 14/11/2017 17:55, Måns Rullgård wrote:
>
>> Marc Gonzalez wrote:
>> 
>>> I will run iperf3 tests with RX_DESC_COUNT lowered to 2.
>>> Would that produce conclusive results?
>>> Do you have other suggestions?
>> 
>> Leave RX_DESC_COUNT alone but add a delay in the nb8800_poll() loop.
>> That should ensure that queue is drained slowly enough for the buffers
>> to run out.
>
> Using the following patch:
>
> diff --git a/drivers/net/ethernet/aurora/nb8800.c b/drivers/net/ethernet/aurora/nb8800.c
> index 31c3f0f10fbb..646300bb53b6 100644
> --- a/drivers/net/ethernet/aurora/nb8800.c
> +++ b/drivers/net/ethernet/aurora/nb8800.c
> @@ -317,6 +317,7 @@ static int nb8800_poll(struct napi_struct *napi, int budget)
>
>                 len = RX_BYTES_TRANSFERRED(rxd->report);
>
> +               udelay(200);
>                 if (IS_RX_ERROR(rxd->report))
>                         nb8800_rx_error(dev, rxd->report);
>                 else
> @@ -1416,9 +1417,9 @@ static int nb8800_probe(struct platform_device *pdev)
>         netdev_info(dev, "MAC address %pM\n", dev->dev_addr);
>
>         /* Auto-negotiate by default */
> -       priv->pause_aneg = true;
> -       priv->pause_rx = true;
> -       priv->pause_tx = true;
> +       priv->pause_aneg = false;
> +       priv->pause_rx = false;
> +       priv->pause_tx = false;
>
>         priv->ops = match->data;
>         priv->ops->power_down(dev);
> diff --git a/drivers/net/ethernet/aurora/nb8800.h b/drivers/net/ethernet/aurora/nb8800.h
> index 23fefca54804..9b59ea776e4a 100644
> --- a/drivers/net/ethernet/aurora/nb8800.h
> +++ b/drivers/net/ethernet/aurora/nb8800.h
> @@ -7,7 +7,7 @@
>  #include <linux/clk.h>
>  #include <linux/bitops.h>
>
> -#define RX_DESC_COUNT                  256
> +#define RX_DESC_COUNT                  16
>  #define TX_DESC_COUNT                  256
>
>  #define NB8800_DESC_LOW                        4
>
> I saw both tango4 and tango5 wedged... :-(

Well, that's not good.  I'll see if I can replicate it later this week.

-- 
Måns Rullgård



More information about the linux-arm-kernel mailing list