From 1525bb9c8adad8ae83b1f4c8708ea13e66a4407b Mon Sep 17 00:00:00 2001 From: Himanshu Agarwal Date: Wed, 30 Nov 2016 19:07:46 +0530 Subject: [PATCH] qcacld-3.0: Move TXRX_PRINT outside peer_map_unmap_lock spinlock In some cases, this TXRX_PRINT is taking more time to process as some other printks' are already in progress. As this printk is inside spinlock, so when some other core is also competiting for this spinlock, that core keeps iterating in a loop. After some time spinlock bug is triggered as it is suspected that this core is locked on this spinlock. This fix moves the TXRX_PRINT outside spinlock so that the other core don't have to wait to acquire spinlock due to this printk. Change-Id: Ie0fa7addd4f2a1272a4d5e287635b6a0f016ba97 CRs-Fixed: 1095406 --- core/dp/txrx/ol_txrx_peer_find.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/core/dp/txrx/ol_txrx_peer_find.c b/core/dp/txrx/ol_txrx_peer_find.c index dfd7da2a40a4..e39b18f1393c 100644 --- a/core/dp/txrx/ol_txrx_peer_find.c +++ b/core/dp/txrx/ol_txrx_peer_find.c @@ -550,12 +550,12 @@ void ol_rx_peer_unmap_handler(ol_txrx_pdev_handle pdev, uint16_t peer_id) /* This peer_id belongs to a peer already deleted */ qdf_atomic_dec(&pdev->peer_id_to_obj_map[peer_id]. del_peer_id_ref_cnt); + qdf_spin_unlock_bh(&pdev->peer_map_unmap_lock); TXRX_PRINT(TXRX_PRINT_LEVEL_ERR, "%s: Remove the ID %d reference to deleted peer. del_peer_id_ref_cnt %d", __func__, peer_id, qdf_atomic_read(&pdev->peer_id_to_obj_map[peer_id]. del_peer_id_ref_cnt)); - qdf_spin_unlock_bh(&pdev->peer_map_unmap_lock); return; } peer = pdev->peer_id_to_obj_map[peer_id].peer; @@ -566,10 +566,10 @@ void ol_rx_peer_unmap_handler(ol_txrx_pdev_handle pdev, uint16_t peer_id) * If the peer ID is for a vdev, then the peer pointer stored * in peer_id_to_obj_map will be NULL. */ + qdf_spin_unlock_bh(&pdev->peer_map_unmap_lock); TXRX_PRINT(TXRX_PRINT_LEVEL_ERR, "%s: peer not found for peer_id %d", __func__, peer_id); - qdf_spin_unlock_bh(&pdev->peer_map_unmap_lock); return; }