Skip to content

Commit

Permalink
net: netcp: fix improper initialization in netcp_ndo_open()
Browse files Browse the repository at this point in the history
commit 194ac06 upstream.

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 <[email protected]>
Signed-off-by: David S. Miller <[email protected]>
Signed-off-by: Sekhar Nori <[email protected]>
  • Loading branch information
Karicheri, Muralidharan authored and nsekhar committed Jul 29, 2015
1 parent 136f1b4 commit 3449ebe
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/net/ethernet/ti/netcp_core.c
Original file line number Diff line number Diff line change
Expand Up @@ -1618,11 +1618,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;
Expand Down

0 comments on commit 3449ebe

Please sign in to comment.