All of lore.kernel.org
 help / color / mirror / Atom feed
* Re: [PATCH 2/2 v2] KS8695: fix ks8695_rx() unreasonable action.
  2009-11-16 14:58 ` [PATCH 2/2 v2] KS8695: fix ks8695_rx() unreasonable action zeal
@ 2009-11-12 17:16   ` Figo.zhang
  2009-11-17  7:52     ` David Miller
  0 siblings, 1 reply; 3+ messages in thread
From: Figo.zhang @ 2009-11-12 17:16 UTC (permalink / raw)
  To: zeal; +Cc: netdev, ben, davem

On Mon, 2009-11-16 at 22:58 +0800, zeal wrote:
> From: zeal <zealcook@gmail.com>
> 
> ks8695_rx() will call refill_buffers() for every incoming packet.
> Its not necessary. We just need do it after finishing receiving thing.
> And the 'RX dma engine' is in the same situation.
> This blocks our user space application. The following patch may fix it.
> 

yes, it is right.

Best,
Figo.zhang

> Signed-off-by: zeal <zealcook@gmail.com>
> ---
>  drivers/net/arm/ks8695net.c |   13 ++++++-------
>  1 files changed, 6 insertions(+), 7 deletions(-)
> 
> diff --git a/drivers/net/arm/ks8695net.c b/drivers/net/arm/ks8695net.c
> index e15451a..be256b3 100644
> --- a/drivers/net/arm/ks8695net.c
> +++ b/drivers/net/arm/ks8695net.c
> @@ -544,14 +544,13 @@ rx_finished:
>  				ksp->next_rx_desc_read =
>  					(last_rx_processed + 1) &
>  					MAX_RX_DESC_MASK;
> -
> -			/* And refill the buffers */
> -			ks8695_refill_rxbuffers(ksp);
> -
> -			/* Kick the RX DMA engine, in case it became
> -			 *  suspended */
> -			ks8695_writereg(ksp, KS8695_DRSC, 0);
>  	}
> +	/* And refill the buffers */
> +	ks8695_refill_rxbuffers(ksp);
> +
> +	/* Kick the RX DMA engine, in case it became
> +	 *  suspended */
> +	ks8695_writereg(ksp, KS8695_DRSC, 0);
>  	return received;
>  }
>  



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

* [PATCH 2/2 v2] KS8695: fix ks8695_rx() unreasonable action.
       [not found] <1258383490-13341-1-git-send-email-zeal>
@ 2009-11-16 14:58 ` zeal
  2009-11-12 17:16   ` Figo.zhang
  0 siblings, 1 reply; 3+ messages in thread
From: zeal @ 2009-11-16 14:58 UTC (permalink / raw)
  To: netdev; +Cc: ben, davem, figo1802, zeal

From: zeal <zealcook@gmail.com>

ks8695_rx() will call refill_buffers() for every incoming packet.
Its not necessary. We just need do it after finishing receiving thing.
And the 'RX dma engine' is in the same situation.
This blocks our user space application. The following patch may fix it.

Signed-off-by: zeal <zealcook@gmail.com>
---
 drivers/net/arm/ks8695net.c |   13 ++++++-------
 1 files changed, 6 insertions(+), 7 deletions(-)

diff --git a/drivers/net/arm/ks8695net.c b/drivers/net/arm/ks8695net.c
index e15451a..be256b3 100644
--- a/drivers/net/arm/ks8695net.c
+++ b/drivers/net/arm/ks8695net.c
@@ -544,14 +544,13 @@ rx_finished:
 				ksp->next_rx_desc_read =
 					(last_rx_processed + 1) &
 					MAX_RX_DESC_MASK;
-
-			/* And refill the buffers */
-			ks8695_refill_rxbuffers(ksp);
-
-			/* Kick the RX DMA engine, in case it became
-			 *  suspended */
-			ks8695_writereg(ksp, KS8695_DRSC, 0);
 	}
+	/* And refill the buffers */
+	ks8695_refill_rxbuffers(ksp);
+
+	/* Kick the RX DMA engine, in case it became
+	 *  suspended */
+	ks8695_writereg(ksp, KS8695_DRSC, 0);
 	return received;
 }
 
-- 
1.5.6.5


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

* Re: [PATCH 2/2 v2] KS8695: fix ks8695_rx() unreasonable action.
  2009-11-12 17:16   ` Figo.zhang
@ 2009-11-17  7:52     ` David Miller
  0 siblings, 0 replies; 3+ messages in thread
From: David Miller @ 2009-11-17  7:52 UTC (permalink / raw)
  To: figo1802; +Cc: zealcook, netdev, ben

From: "Figo.zhang" <figo1802@gmail.com>
Date: Fri, 13 Nov 2009 01:16:34 +0800

> On Mon, 2009-11-16 at 22:58 +0800, zeal wrote:
>> From: zeal <zealcook@gmail.com>
>> 
>> ks8695_rx() will call refill_buffers() for every incoming packet.
>> Its not necessary. We just need do it after finishing receiving thing.
>> And the 'RX dma engine' is in the same situation.
>> This blocks our user space application. The following patch may fix it.
>> 
> 
> yes, it is right.
> 
> Best,
> Figo.zhang
> 
>> Signed-off-by: zeal <zealcook@gmail.com>

Patch applied.

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

end of thread, other threads:[~2009-11-17  7:51 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <1258383490-13341-1-git-send-email-zeal>
2009-11-16 14:58 ` [PATCH 2/2 v2] KS8695: fix ks8695_rx() unreasonable action zeal
2009-11-12 17:16   ` Figo.zhang
2009-11-17  7:52     ` David Miller

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.