From ce9b97b8f5847d93162f67562197292504593013 Mon Sep 17 00:00:00 2001 From: patacongo Date: Sun, 26 Aug 2012 23:29:37 +0000 Subject: More patches/bugfixes from Kate git-svn-id: https://nuttx.svn.sourceforge.net/svnroot/nuttx/trunk@5056 7fd9a85b-ad96-42d3-883c-3090e2eb8679 --- apps/ChangeLog.txt | 2 ++ apps/nshlib/nsh_parse.c | 2 +- nuttx/ChangeLog | 8 ++++++++ nuttx/arch/arm/src/lpc17xx/lpc17_ethernet.c | 20 ++++++++++++++++++++ nuttx/sched/sched_setuptaskfiles.c | 4 ++-- nuttx/syscall/syscall.csv | 4 ++-- 6 files changed, 35 insertions(+), 5 deletions(-) diff --git a/apps/ChangeLog.txt b/apps/ChangeLog.txt index 6c151ae50..0f60338a4 100755 --- a/apps/ChangeLog.txt +++ b/apps/ChangeLog.txt @@ -283,4 +283,6 @@ * apps/netutils/thttpd/thttpd_cgi.c: Missing NULL in argv[] list (contributed by Kate). + * apps/nshlib/nsh_parse.c: CONFIG_NSH_DISABLE_WGET not CONFIG_NSH_DISABLE_GET + in one location (found by Kate). diff --git a/apps/nshlib/nsh_parse.c b/apps/nshlib/nsh_parse.c index 165f842fc..ba597a062 100644 --- a/apps/nshlib/nsh_parse.c +++ b/apps/nshlib/nsh_parse.c @@ -370,7 +370,7 @@ static const struct cmdmap_s g_cmdmap[] = #endif #if defined(CONFIG_NET_TCP) && CONFIG_NFILE_DESCRIPTORS > 0 -# ifndef CONFIG_NSH_DISABLE_GET +# ifndef CONFIG_NSH_DISABLE_WGET { "wget", cmd_wget, 2, 4, "[-o ] " }, # endif #endif diff --git a/nuttx/ChangeLog b/nuttx/ChangeLog index cb7f4079d..c4e914658 100644 --- a/nuttx/ChangeLog +++ b/nuttx/ChangeLog @@ -3185,3 +3185,11 @@ This list handling was probably causing errors reported by Mike Smith * sched/sched_waitpid.c: Fix a possible issue with logic logic that should be brought into a critical section (suggested by Mike Smith) + * sched/sched_setuptaskfiles.c: Should be 'struct socket' not + 'struct sockets'. How did this compile before? (found by Kate) + * syscall/syscall.csv: Fix prototype for usleep() and prctl() (also + from Kate). + * arch/arm/src/lpc17xx/lpc17_ethernet.c: Conditionally elide setting PHY + speed/duplex. This does not work for certain PHYs. Still some unresolved + issues (also from Kate). + diff --git a/nuttx/arch/arm/src/lpc17xx/lpc17_ethernet.c b/nuttx/arch/arm/src/lpc17xx/lpc17_ethernet.c index a3bc9d951..6d927892b 100644 --- a/nuttx/arch/arm/src/lpc17xx/lpc17_ethernet.c +++ b/nuttx/arch/arm/src/lpc17xx/lpc17_ethernet.c @@ -2100,9 +2100,29 @@ static inline int lpc17_phyinit(struct lpc17_driver_s *priv) /* Disable auto-configuration. Set the fixed speed/duplex mode. * (probably more than little redundant). + * + * REVISIT: Revisit the following CONFIG_PHY_CEMENT_DISABLE work-around: + * + * "... I found this using a LPC1768 dev board with a DP83848I PHY. I'm + * using CONFIG_PHY_DP83848C for that ... I found that a static + * configuration for the PHY gave errors. I didn't investigate why. + * + * "My problem however was that autonegotiation seemingly failed - + * however on debugging I saw the calls for autonegotation were actually + * successful. I tracked the code down to [the following logic] and + * I saw that after the negotation completes, those negotiated + * parameters are then used to set a fixed speed and duplex, "just + * in case". It was that setting of a static configuration which + * failed for me." + * + * "I'm not sure if that's required for other situations or not, so I + * added a #define to optionally elide the call to cement the + * configuration. My PHY appears to be happy with this for the moment." */ +#ifndef CONFIG_PHY_CEMENT_DISABLE ret = lpc17_phymode(phyaddr, priv->lp_mode); +#endif lpc17_showmii(phyaddr, "After final configuration"); return ret; } diff --git a/nuttx/sched/sched_setuptaskfiles.c b/nuttx/sched/sched_setuptaskfiles.c index 7f754e151..fe0b14143 100644 --- a/nuttx/sched/sched_setuptaskfiles.c +++ b/nuttx/sched/sched_setuptaskfiles.c @@ -148,8 +148,8 @@ static inline void sched_dupsockets(FAR _TCB *tcb) /* The parent task is the one at the head of the ready-to-run list */ FAR _TCB *rtcb = (FAR _TCB*)g_readytorun.head; - FAR struct sockets *parent; - FAR struct sockets *child; + FAR struct socket *parent; + FAR struct socket *child; int i; /* Duplicate the socket descriptors of all sockets opened by the parent diff --git a/nuttx/syscall/syscall.csv b/nuttx/syscall/syscall.csv index 22b45df9d..4ccd53f9d 100644 --- a/nuttx/syscall/syscall.csv +++ b/nuttx/syscall/syscall.csv @@ -40,7 +40,7 @@ "open","fcntl.h","CONFIG_NFILE_DESCRIPTORS > 0","int","const char*","int","..." "opendir","dirent.h","CONFIG_NFILE_DESCRIPTORS > 0","FAR DIR*","FAR const char*" "pipe","unistd.h","CONFIG_NFILE_DESCRIPTORS > 0","int","int [2]|int*" -"prctl", sys/prctl.h, "CONFIG_TASK_NAME_SIZE > 0","int","int","..." +"prctl","sys/prctl.h", "CONFIG_TASK_NAME_SIZE > 0","int","int","..." "clock_systimer","nuttx/clock.h","!defined(CONFIG_DISABLE_CLOCK)","uint32_t" "poll","poll.h","!defined(CONFIG_DISABLE_POLL) && (CONFIG_NSOCKET_DESCRIPTORS > 0 || CONFIG_NFILE_DESCRIPTORS > 0)","int","FAR struct pollfd*","nfds_t","int" "pthread_barrier_destroy","pthread.h","!defined(CONFIG_DISABLE_PTHREAD)","int","FAR pthread_barrier_t*" @@ -135,7 +135,7 @@ #"up_assert","assert.h","","void" "up_assert_code","assert.h","","void","FAR const uint8_t*","int","int" #"up_assert_code","assert.h","","void","int" -"usleep","unistd.h","!defined(CONFIG_DISABLE_SIGNALS)","void","useconds_t" +"usleep","unistd.h","!defined(CONFIG_DISABLE_SIGNALS)","int","useconds_t" #"wait","sys/wait.h","","pid_t","int*" #"waitid","sys/wait.h","","int","idtype_t","id_t id","siginfo_t*","int" "waitpid","sys/wait.h","defined(CONFIG_SCHED_WAITPID)","pid_t","pid_t","int*","int" -- cgit v1.2.3