linux-wireless.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] ath10k:  Initialize nbytes to 0
@ 2017-01-05 22:00 greearb
  2017-05-22 14:53 ` Kalle Valo
  2017-06-01 12:58 ` Kalle Valo
  0 siblings, 2 replies; 4+ messages in thread
From: greearb @ 2017-01-05 22:00 UTC (permalink / raw)
  To: linux-wireless; +Cc: ath10k, Ben Greear

From: Ben Greear <greearb@candelatech.com>

ath10k firmware checks nbytes == 0 as part of determining if DMA
has completed successfully.  To help make this work more often,
have the driver initialize nbytes to zero when freeing the descriptor
slot.

Signed-off-by: Ben Greear <greearb@candelatech.com>
---

I am not yet sure if this actually fixes a real problem or not...curious
if others think this is an improvement.

 drivers/net/wireless/ath/ath10k/ce.c | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/drivers/net/wireless/ath/ath10k/ce.c b/drivers/net/wireless/ath/ath10k/ce.c
index da9998e..15bc7fb 100644
--- a/drivers/net/wireless/ath/ath10k/ce.c
+++ b/drivers/net/wireless/ath/ath10k/ce.c
@@ -595,6 +595,7 @@ int ath10k_ce_completed_send_next_nolock(struct ath10k_ce_pipe *ce_state,
 	unsigned int nentries_mask = src_ring->nentries_mask;
 	unsigned int sw_index = src_ring->sw_index;
 	unsigned int read_index;
+	struct ce_desc *desc;
 
 	if (src_ring->hw_index == sw_index) {
 		/*
@@ -624,6 +625,9 @@ int ath10k_ce_completed_send_next_nolock(struct ath10k_ce_pipe *ce_state,
 
 	/* sanity */
 	src_ring->per_transfer_context[sw_index] = NULL;
+	desc = CE_SRC_RING_TO_DESC(src_ring->base_addr_owner_space,
+				   sw_index);
+	desc->nbytes = 0;
 
 	/* Update sw_index */
 	sw_index = CE_RING_IDX_INCR(nentries_mask, sw_index);
-- 
2.4.11

^ permalink raw reply related	[flat|nested] 4+ messages in thread

* Re: ath10k: Initialize nbytes to 0
  2017-01-05 22:00 [PATCH] ath10k: Initialize nbytes to 0 greearb
@ 2017-05-22 14:53 ` Kalle Valo
  2017-05-22 16:17   ` Ben Greear
  2017-06-01 12:58 ` Kalle Valo
  1 sibling, 1 reply; 4+ messages in thread
From: Kalle Valo @ 2017-05-22 14:53 UTC (permalink / raw)
  To: Ben Greear; +Cc: linux-wireless, ath10k, Ben Greear

Ben Greear <greearb@candelatech.com> wrote:
> From: Ben Greear <greearb@candelatech.com>
> 
> ath10k firmware checks nbytes == 0 as part of determining if DMA
> has completed successfully.  To help make this work more often,
> have the driver initialize nbytes to zero when freeing the descriptor
> slot.
> 
> Signed-off-by: Ben Greear <greearb@candelatech.com>

This patch was in linux-wireless patchwork instance but not in ath10k instance,
which means that the patch was not delivered to ath10k list. I guesss mailing
list problems?

But anyway, I didn't see any comments. Is this still valid?

-- 
https://patchwork.kernel.org/patch/9499733/

https://wireless.wiki.kernel.org/en/developers/documentation/submittingpatches

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: ath10k: Initialize nbytes to 0
  2017-05-22 14:53 ` Kalle Valo
@ 2017-05-22 16:17   ` Ben Greear
  0 siblings, 0 replies; 4+ messages in thread
From: Ben Greear @ 2017-05-22 16:17 UTC (permalink / raw)
  To: Kalle Valo; +Cc: linux-wireless, ath10k

On 05/22/2017 07:53 AM, Kalle Valo wrote:
> Ben Greear <greearb@candelatech.com> wrote:
>> From: Ben Greear <greearb@candelatech.com>
>>
>> ath10k firmware checks nbytes == 0 as part of determining if DMA
>> has completed successfully.  To help make this work more often,
>> have the driver initialize nbytes to zero when freeing the descriptor
>> slot.
>>
>> Signed-off-by: Ben Greear <greearb@candelatech.com>
>
> This patch was in linux-wireless patchwork instance but not in ath10k instance,
> which means that the patch was not delivered to ath10k list. I guesss mailing
> list problems?
>
> But anyway, I didn't see any comments. Is this still valid?

 From my reading of the firmware, it appears the patch is a good idea.
It at least does not seem to make anything worse as it has not
been implicated in any problems in our testing and it has been in our kernel
since I posted the patch.

So, I think it should be applied.

Thanks,
Ben

-- 
Ben Greear <greearb@candelatech.com>
Candela Technologies Inc  http://www.candelatech.com

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: ath10k: Initialize nbytes to 0
  2017-01-05 22:00 [PATCH] ath10k: Initialize nbytes to 0 greearb
  2017-05-22 14:53 ` Kalle Valo
@ 2017-06-01 12:58 ` Kalle Valo
  1 sibling, 0 replies; 4+ messages in thread
From: Kalle Valo @ 2017-06-01 12:58 UTC (permalink / raw)
  To: Ben Greear; +Cc: linux-wireless, ath10k, Ben Greear

Ben Greear <greearb@candelatech.com> wrote:

> ath10k firmware checks nbytes == 0 as part of determining if DMA
> has completed successfully.  To help make this work more often,
> have the driver initialize nbytes to zero when freeing the descriptor
> slot.
> 
> Signed-off-by: Ben Greear <greearb@candelatech.com>
> Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>

Patch applied to ath-next branch of ath.git, thanks.

4f40b423339b ath10k: initialize nbytes to 0

-- 
https://patchwork.kernel.org/patch/9499733/

https://wireless.wiki.kernel.org/en/developers/documentation/submittingpatches

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2017-06-01 12:58 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-01-05 22:00 [PATCH] ath10k: Initialize nbytes to 0 greearb
2017-05-22 14:53 ` Kalle Valo
2017-05-22 16:17   ` Ben Greear
2017-06-01 12:58 ` Kalle Valo

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).