]> git.karo-electronics.de Git - linux-beck.git/commitdiff
net: netcp: fix improper initialization in netcp_ndo_open()
authorKaricheri, Muralidharan <m-karicheri2@ti.com>
Thu, 16 Jul 2015 19:32:14 +0000 (15:32 -0400)
committerDavid S. Miller <davem@davemloft.net>
Tue, 21 Jul 2015 03:37:39 +0000 (20:37 -0700)
The keystone qmss will raise interrupt when packet arrive at the
receive queue. Only control available to avoid interrupt from happening
is to keep the free descriptor queue (FDQ) empty in the receive side.
So the filling of descriptors into the FDQ has to happen after
request_irq() call is made as part of knav_queue_enable_notify(). So
move the function netcp_rxpool_refill() after this call.

Signed-off-by: Murali Karicheri <m-karicheri2@ti.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/ti/netcp_core.c

index 5ec4ed3f6c8def7a6a6cf527cd9ac7ca73c09844..ec8ed30196f3b8bd8e0ecf670d35a80c93ad4639 100644 (file)
@@ -1617,11 +1617,11 @@ static int netcp_ndo_open(struct net_device *ndev)
        }
        mutex_unlock(&netcp_modules_lock);
 
-       netcp_rxpool_refill(netcp);
        napi_enable(&netcp->rx_napi);
        napi_enable(&netcp->tx_napi);
        knav_queue_enable_notify(netcp->tx_compl_q);
        knav_queue_enable_notify(netcp->rx_queue);
+       netcp_rxpool_refill(netcp);
        netif_tx_wake_all_queues(ndev);
        dev_dbg(netcp->ndev_dev, "netcp device %s opened\n", ndev->name);
        return 0;