nvethernet: add MAC core deinit in remove

1. Call MAC de init incase of remove.
2. Fix ether_select_queue iteration count

Bug 200512422

Change-Id: Ic0abc30c97efbab02dab1ae73ac39c96df36ac7c
Signed-off-by: Narayan Reddy <narayanr@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/2145731
GVS: Gerrit_Virtual_Submit
Reviewed-by: Automatic_Commit_Validation_User
Reviewed-by: Bhadram Varka <vbhadram@nvidia.com>
Reviewed-by: Bitan Biswas <bbiswas@nvidia.com>
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
This commit is contained in:
Narayan Reddy
2019-06-30 00:07:22 +05:30
committed by Revanth Kumar Uppala
parent 4fcd7633cd
commit db777e2ece

View File

@@ -1321,8 +1321,8 @@ static int ether_close(struct net_device *dev)
/* PTP de-init */ /* PTP de-init */
ether_ptp_remove(pdata); ether_ptp_remove(pdata);
/* Stop the MAC */ /* MAC deinit which inturn stop MAC Tx,Rx */
osi_stop_mac(pdata->osi_core); osi_hw_core_deinit(pdata->osi_core);
ether_napi_disable(pdata); ether_napi_disable(pdata);
@@ -1628,7 +1628,7 @@ static unsigned short ether_select_queue(struct net_device *dev,
unsigned short txqueue_select = 0; unsigned short txqueue_select = 0;
unsigned int i, chan; unsigned int i, chan;
for (i = 0; i < OSI_EQOS_MAX_NUM_CHANS; i++) { for (i = 0; i < osi_dma->num_dma_chans; i++) {
chan = osi_dma->dma_chans[i]; chan = osi_dma->dma_chans[i];
if (pdata->txq_prio[chan] == skb->priority) { if (pdata->txq_prio[chan] == skb->priority) {
txqueue_select = (unsigned short)chan; txqueue_select = (unsigned short)chan;
@@ -3475,8 +3475,6 @@ static int ether_remove(struct platform_device *pdev)
mdiobus_unregister(pdata->mii); mdiobus_unregister(pdata->mii);
} }
ether_disable_clks(pdata);
ether_put_clks(pdata); ether_put_clks(pdata);
/* Assert MAC RST gpio */ /* Assert MAC RST gpio */