diff mbox

ath10k: fix num_sends_allowed replenishing

Message ID 1379510537-8731-1-git-send-email-michal.kazior@tieto.com (mailing list archive)
State Not Applicable, archived
Headers show

Commit Message

Michal Kazior Sept. 18, 2013, 1:22 p.m. UTC
Recent ce_sendlist removal patch has broken
num_sends_allowed incrementing. num_sends_allowed
exceeded initial values and could overflow.

This code was supposed to replenish
num_sends_allowed for partial sendlist items (i.e.
before final sendlist item from a sendlist was
completed and could be processed by completion
handlers).

Fortunately it seems it cause any major breakage,
yet.

Signed-off-by: Michal Kazior <michal.kazior@tieto.com>
---
 drivers/net/wireless/ath/ath10k/pci.c |    4 ----
 1 file changed, 4 deletions(-)

Comments

Kalle Valo Sept. 20, 2013, 5:06 a.m. UTC | #1
Michal Kazior <michal.kazior@tieto.com> writes:

> Recent ce_sendlist removal patch has broken
> num_sends_allowed incrementing. num_sends_allowed
> exceeded initial values and could overflow.
>
> This code was supposed to replenish
> num_sends_allowed for partial sendlist items (i.e.
> before final sendlist item from a sendlist was
> completed and could be processed by completion
> handlers).
>
> Fortunately it seems it cause any major breakage,
> yet.
>
> Signed-off-by: Michal Kazior <michal.kazior@tieto.com>

Doh, I broke this. Sorry about that.

Applied, but I changed the commit log. Especially notice the changes in
the last sentence:

commit 1073ab2e9b0d45f318052a3f3690405fc04eda75
Author: Michal Kazior <michal.kazior@tieto.com>
Date:   Wed Sep 18 15:22:17 2013 +0200

    ath10k: fix num_sends_allowed replenishing
    
    Commit e9bb0aa39 ("ath10k: delete struct ce_sendlist") broke
    num_sends_allowed incrementing. num_sends_allowed
    exceeded initial values and could overflow.
    
    This code was supposed to replenish
    num_sends_allowed for partial sendlist items (i.e.
    before final sendlist item from a sendlist was
    completed and could be processed by completion
    handlers).
    
    Fortunately it seems it did not cause any major breakage,
    yet.
    
    Signed-off-by: Michal Kazior <michal.kazior@tieto.com>
    Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
diff mbox

Patch

diff --git a/drivers/net/wireless/ath/ath10k/pci.c b/drivers/net/wireless/ath/ath10k/pci.c
index f1faf46..dff23d9 100644
--- a/drivers/net/wireless/ath/ath10k/pci.c
+++ b/drivers/net/wireless/ath/ath10k/pci.c
@@ -626,10 +626,6 @@  static void ath10k_pci_ce_send_done(struct ath10k_ce_pipe *ce_state)
 	while (ath10k_ce_completed_send_next(ce_state, &transfer_context,
 					     &ce_data, &nbytes,
 					     &transfer_id) == 0) {
-		spin_lock_bh(&pipe_info->pipe_lock);
-		pipe_info->num_sends_allowed++;
-		spin_unlock_bh(&pipe_info->pipe_lock);
-
 		compl = get_free_compl(pipe_info);
 		if (!compl)
 			break;