KS8695: fix ks8695_rx() unreasonable action.
authorzeal <zealcook@gmail.com>
Mon, 16 Nov 2009 04:58:10 +0000 (04:58 +0000)
committerDavid S. Miller <davem@davemloft.net>
Tue, 17 Nov 2009 07:51:47 +0000 (23:51 -0800)
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>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/arm/ks8695net.c

index e15451a85107fc13e80fb985e715deb1a27b9b14..be256b34cea88c5b890ad752e5e9d0e40c28b544 100644 (file)
@@ -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;
 }
 
This page took 0.032137 seconds and 5 git commands to generate.