[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date: Tue, 4 Apr 2017 21:28:49 +0200
From: Thierry Reding <treding@...dia.com>
To: Joao Pinto <Joao.Pinto@...opsys.com>
CC: <davem@...emloft.net>, <clabbe.montjoie@...il.com>,
<niklas.cassel@...s.com>, <netdev@...r.kernel.org>
Subject: Re: [PATCH 4/4] net: stmmac: adding multiple napi mechanism
On Tue, Apr 04, 2017 at 06:54:27PM +0100, Joao Pinto wrote:
[...]
> diff --git a/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c b/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c
[...]
> @@ -1259,7 +1317,6 @@ static int init_dma_tx_desc_rings(struct net_device *dev)
> /* TX INITIALIZATION */
> for (i = 0; i < DMA_TX_SIZE; i++) {
> struct dma_desc *p;
> -
> if (priv->extend_desc)
> p = &((tx_q->dma_etx + i)->basic);
> else
I think checkpatch would complain about this now because we're supposed
to separate variable declarations from code by a single blank line.
> - netif_napi_add(ndev, &priv->napi, stmmac_poll, 64);
> + ret = alloc_dma_desc_resources(priv);
> + if (ret < 0) {
> + netdev_err(priv->dev, "%s: DMA descriptors allocation failed\n",
> + __func__);
> + goto init_dma_error;
> + }
> +
> + ret = init_dma_desc_rings(priv->dev, GFP_KERNEL);
> + if (ret < 0) {
> + netdev_err(priv->dev, "%s: DMA descriptors initialization failed\n",
> + __func__);
> + goto init_dma_error;
> + }
> +
> + for (queue = 0; queue < priv->plat->rx_queues_to_use; queue++) {
> + struct stmmac_rx_queue *rx_q = &priv->rx_queue[queue];
> +
> + netif_napi_add(ndev, &rx_q->napi, stmmac_poll,
> + (8 * priv->plat->rx_queues_to_use));
> + }
Why is this moving to ->probe() now?
This works on Tegra186, so:
Reviewed-by: Thierry Reding <treding@...dia.com>
Download attachment "signature.asc" of type "application/pgp-signature" (834 bytes)
Powered by blists - more mailing lists