From 47b3a226af80250ac81e09752863e853733aa113 Mon Sep 17 00:00:00 2001 From: patacongo Date: Thu, 6 Dec 2007 23:12:48 +0000 Subject: [PATCH] C5471 ethernet debug git-svn-id: svn://svn.code.sf.net/p/nuttx/code/trunk@431 42af7a65-404d-4744-a932-0658087f49c3 --- TODO | 7 ++++++- arch/arm/src/c5471/c5471_ethernet.c | 4 ++-- configs/c5471evm/defconfig | 1 + configs/c5471evm/netconfig | 1 + 4 files changed, 10 insertions(+), 3 deletions(-) diff --git a/TODO b/TODO index 33bf5bab76..8e60cabb11 100644 --- a/TODO +++ b/TODO @@ -43,6 +43,8 @@ o Network used concurrently by two threads. Minimal fix: Add mutex to support exclusion. - IPv6 support is incomplete - Incoming UDP broadcast should only be accepted if listening on INADDR_ANY(?) +- Should add some driver call to support throttling... when there is no listener + for new data, the driver should be throttled. o USB - Implement USB device support @@ -76,7 +78,10 @@ o ARM user stack allocation larger than needed. o ARM/C5471 -- Needs an Ethernet driver +- Ethernet driver has problems on receive side. The cause of the problem seems + to be that the hardware waits for about 3 seconds before interrupting the driver. + By then, the sender has already retransmitted and things are out of sync. + Probable cause: TX configuration problem. o ARM/DM320 - It seems that when a lot of debug statements are added, the system no diff --git a/arch/arm/src/c5471/c5471_ethernet.c b/arch/arm/src/c5471/c5471_ethernet.c index 1d680e7469..8ec28a7854 100644 --- a/arch/arm/src/c5471/c5471_ethernet.c +++ b/arch/arm/src/c5471/c5471_ethernet.c @@ -1486,7 +1486,7 @@ static int c5471_interrupt(int irq, FAR void *context) /* Handle interrupts according to status bit settings */ /* Check if we received an incoming packet, if so, call c5471_receive() */ - if (EIM_STATUS_CPU_TX & c5471->c_eimstatus) + if ((EIM_STATUS_CPU_TX & c5471->c_eimstatus) != 0) { /* An incoming packet has been received by the EIM from the network and * the interrupt associated with EIM's CPU TX queue has been asserted. It @@ -1508,7 +1508,7 @@ static int c5471_interrupt(int irq, FAR void *context) /* Check is a packet transmission just completed. If so, call c5471_txdone */ - if (EIM_STATUS_CPU_RX & c5471->c_eimstatus) + if ((EIM_STATUS_CPU_RX & c5471->c_eimstatus) != 0) { /* An outgoing packet has been processed by the EIM and the interrupt * associated with EIM's CPU RX que has been asserted. It is the EIM's diff --git a/configs/c5471evm/defconfig b/configs/c5471evm/defconfig index d262c7cb6d..0ca8e9b516 100644 --- a/configs/c5471evm/defconfig +++ b/configs/c5471evm/defconfig @@ -279,6 +279,7 @@ CONFIG_NET_SOCKOPTS=y CONFIG_NET_BUFSIZE=420 CONFIG_NET_TCP=n CONFIG_NET_TCP_CONNS=40 +CONFIG_NET_NTCP_READAHEAD_BUFFERS=8 CONFIG_NET_MAX_LISTENPORTS=40 CONFIG_NET_UDP=n CONFIG_NET_UDP_CHECKSUMS=y diff --git a/configs/c5471evm/netconfig b/configs/c5471evm/netconfig index 4d7a065000..2a8f970107 100644 --- a/configs/c5471evm/netconfig +++ b/configs/c5471evm/netconfig @@ -279,6 +279,7 @@ CONFIG_NET_SOCKOPTS=y CONFIG_NET_BUFSIZE=420 CONFIG_NET_TCP=y CONFIG_NET_TCP_CONNS=8 +CONFIG_NET_NTCP_READAHEAD_BUFFERS=32 CONFIG_NET_MAX_LISTENPORTS=8 CONFIG_NET_UDP=n CONFIG_NET_UDP_CHECKSUMS=y