Browse Source

KS8695: fix ks8695_rx() unreasonable action.

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>
zeal 15 years ago
parent
commit
5c427ff9e4
1 changed files with 6 additions and 7 deletions
  1. 6 7
      drivers/net/arm/ks8695net.c

+ 6 - 7
drivers/net/arm/ks8695net.c

@@ -544,14 +544,13 @@ rx_finished:
 				ksp->next_rx_desc_read =
 				ksp->next_rx_desc_read =
 					(last_rx_processed + 1) &
 					(last_rx_processed + 1) &
 					MAX_RX_DESC_MASK;
 					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;
 	return received;
 }
 }