mirror of
git://nv-tegra.nvidia.com/kernel/nvethernetrm.git
synced 2025-12-25 11:04:28 +03:00
osi: dma: Clear TX SWCX during DMA init
Issue: In QNX, DMA ring params are initialized during interface only. When interface is is stop and re-inited, DMA ring params are not re-allocated but re-used again. During this process, TX software context is not cleared. This results in presense of any stale value, that causes failure. Fix info: Clean TX software context during DMA init. Bug 200603660 Change-Id: I96c967a676c7fcdeb22b0a235301dee9d1d2b4c7 Signed-off-by: Nagarjuna Kristam <nkristam@nvidia.com> Reviewed-on: https://git-master.nvidia.com/r/c/kernel/nvethernetrm/+/2327716 Reviewed-by: automaticguardword <automaticguardword@nvidia.com> Reviewed-by: Automatic_Commit_Validation_User Reviewed-by: Bhadram Varka <vbhadram@nvidia.com> Reviewed-by: Rakesh Goyal <rgoyal@nvidia.com> Reviewed-by: Gaurav Asati <gasati@nvidia.com> Reviewed-by: svc-mobile-coverity <svc-mobile-coverity@nvidia.com> Reviewed-by: svc-mobile-misra <svc-mobile-misra@nvidia.com> Reviewed-by: svc-mobile-cert <svc-mobile-cert@nvidia.com> Reviewed-by: Srinivas Ramachandran <srinivasra@nvidia.com> Reviewed-by: Krishna Thota <kthota@nvidia.com> Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com> Tested-by: mobile promotions <svcmobile_promotions@nvidia.com> GVS: Gerrit_Virtual_Submit
This commit is contained in:
committed by
mobile promotions
parent
c23d06344f
commit
8dfaa8483c
@@ -926,6 +926,7 @@ static void tx_dma_desc_init(struct osi_dma_priv_data *osi_dma)
|
||||
{
|
||||
struct osi_tx_ring *tx_ring = OSI_NULL;
|
||||
struct osi_tx_desc *tx_desc = OSI_NULL;
|
||||
struct osi_tx_swcx *tx_swcx = OSI_NULL;
|
||||
struct osi_dma_chan_ops *ops = osi_dma->ops;
|
||||
unsigned int chan = 0;
|
||||
unsigned int i, j;
|
||||
@@ -936,11 +937,17 @@ static void tx_dma_desc_init(struct osi_dma_priv_data *osi_dma)
|
||||
|
||||
for (j = 0; j < TX_DESC_CNT; j++) {
|
||||
tx_desc = tx_ring->tx_desc + j;
|
||||
tx_swcx = tx_ring->tx_swcx + j;
|
||||
|
||||
tx_desc->tdes0 = 0;
|
||||
tx_desc->tdes1 = 0;
|
||||
tx_desc->tdes2 = 0;
|
||||
tx_desc->tdes3 = 0;
|
||||
|
||||
tx_swcx->len = 0;
|
||||
tx_swcx->buf_virt_addr = OSI_NULL;
|
||||
tx_swcx->buf_phy_addr = 0;
|
||||
tx_swcx->is_paged_buf = 0;
|
||||
}
|
||||
|
||||
tx_ring->cur_tx_idx = 0;
|
||||
|
||||
Reference in New Issue
Block a user