Commit Graph

35650 Commits

Author SHA1 Message Date
Gregory Nutt
4ae09a3b80 net/netlink: Redesign the logic that handles notifications of when response data is available. Signal handlers are sub-optimal inside the OS (especially after the preceding change which forces the hand). Instead, use the work queue notifiers as is done with all other network notifiers. 2019-11-28 14:20:40 -06:00
Gregory Nutt
69318b1024 Re-implements reverted commit 344f7bc9f6 in a way that should not have the undesired side-effect. include/nuttx/sched.h: Add a bit to the TCB flags to indicat the thread is a user thread in a syscall. sched/nuttx/nxsig_dispatch.c: Delay dispatching to signal handlers if within a system call. In all syscall implementations: Process delayed signal handling when exiting system call. 2019-11-28 12:47:36 -06:00
Gregory Nutt
cbdd590c82 Revert "include/nuttx/sched.h: Add storage for a previous signal mask. arch/: In all syscall implementations, block all signals before dispatching a system call; resotre signal mask when the system call returns."
Using the sigprocmask() for this purpose has too many side-effects.

This reverts commit 344f7bc9f6.
2019-11-28 11:57:54 -06:00
Gregory Nutt
7dcd57aa4a boars/arm/imxrt/imxrt10x0-evk/include/board.h: Define IMXRT_TRACE_CLK_SELECT with arbitrary value just to get through build testing. 2019-11-28 11:18:42 -06:00
Gregory Nutt
344f7bc9f6 include/nuttx/sched.h: Add storage for a previous signal mask. arch/: In all syscall implemenations, block all signals before dispatching a system call; resotre signal mask when the system call returnes. 2019-11-28 10:51:29 -06:00
Beat Küng
fe49dcf622 Merged in bkueng/nuttx/fix_h7_dmamux_defines (pull request #1079)
fix stm32h7x3xx_dmamux.h: add missing underscore to defines

Approved-by: Gregory Nutt <gnutt@nuttx.org>
2019-11-28 12:23:20 +00:00
Gregory Nutt
d1593bb336 Squashed commit of the following:
net/netlink/netlink_sockif.c:  At implementation of response available signal handler needed for POLLIN logic.
    net/netlink/netlink_sockif.c:  Add logic to set up signal handler to receive the response notification.
2019-11-27 21:30:01 -06:00
Gregory Nutt
a8f3c3651a net/netlink/netlink_conn.c: Use nxsig_queue() instead of nxsig_kill() so that we can pass a reference to the connection structure with the signal. 2019-11-27 19:31:23 -06:00
Xiang Xiao
e1e192fc33 net/: icmp[v6] fix ping[6] complain 'WARNING: Received after timeout'. The root cause is that icmp[v6]_pollsetup monitors ICMP[v6]_NEWDATA, but icmp[v6]_input reports ICMP[v6]_ECHOREPLY. This change lets icmp[v6]_input report report ICMP[v6]_NEWDATA to fix this issue and remove ICMP[v6]_ECHOREPLY to avoid the wrong usage in the future. 2019-11-27 08:09:51 -06:00
Xiang Xiao
250bde034d net/: icmp[v6]_pollsetup should always return POLLWRNORM if the caller requests it since ICMP[v6] doesn't utilize IOB buffer for sending and always needs to wait for an ICMP[v6]_POLL. 2019-11-27 08:04:14 -06:00
Xiang Xiao
ea666877f2 net/devif/devif_callback.c: Restore cf9f2c56cb. That restored change plus the following additional commits reolves the issue raised by Valmantas Palikša. 2019-11-27 07:59:52 -06:00
Xiang Xiao
b7b85251cf fs/mmap/fs_munmap.c: Fix 'warning: variable 'newaddr' set but not used' 2019-11-27 07:51:35 -06:00
kyChu
01cda09aba Merged in kyChuGit/nuttx (pull request #1077)
STM23L4 LPTIM PWM support with multi-channel

* arch/arm/src/stm32l4/stm32l4_pwm.c:
        fixed some bugs
    arch/arm/src/stm32l4/stm32l4_pwm.h:
        support LPTIM PWM if PWM multi-channel is selected
        Channel mode for LPTIM are not available

* arch/arm/src/stm32l4/Kconfig:  add new configuration for STM32L4 LPTIM support

* arch/arm/src/stm32l4/stm32l4_pwm.c:  fix warning: resetbit may be used uninitialized

Approved-by: Gregory Nutt <gnutt@nuttx.org>
2019-11-27 13:45:41 +00:00
Gregory Nutt
93ed8b66d9 net/netlink: Add partial support for the NETLINK poll() operation. Still missing is some signal handling logic that actually wakes up the poll() when an asynchronous NETLLINK response is available.
So although the poll() implemenation is still not yet usable, the commit is useful because it (1) does not harm, and (2) incidentally fixes a few other issues in the NETLONK response queuing that I noted in the process.
2019-11-26 18:52:22 -06:00
Dave Marples
c2211d8d3c arch/arm/src/imxrt/imxrt_lowputc.c: This commit removes a largely redundant check in the imxrt lowputc code which will speed it up a little.
I did suspect that it was just about possible that there's a use for this check (specifically, when you're changing serial the clock immediately after the character is sent) but since we're only testing that the character has left the holding register and not that it's actually been sent to line I don't think it's valid even for this case.
2019-11-26 17:45:23 -06:00
Dave Marples
7f56da62f1 arch/arm/src/imxrt: This commit fixes the clock configuration for the imxrt family. This allows WFI to be re-enabled. It also adds a few wait-for-sync loops which are necessary according to the specification but which weren't in the code. It's possible I've added a more than are strictly needed, but for this I figure erring on the side of caution is the right thing to do. 2019-11-26 17:41:54 -06:00
Gregory Nutt
f945edaf7a boards/sim/sim/sim: Remove apps/grephics/traveler configuration 2019-11-25 16:47:17 -06:00
Xiang Xiao
8214973f80 net/usrsock/usrsock_poll.c: usrsock_pollsetup() doesn't need logic and with fds->events since line 279 will do the same thing:
fds->revents &= (~(POLLOUT | POLLIN) | info->fds->events);
2019-11-25 11:44:58 -06:00
Xiang Xiao
1905e01fda net/: ICMP/ICMPv6/TCP/UDP poll shouldn't set POLLHUP and POLLOUT at the same time the standard require that only report POLLHUP:
https://pubs.opengroup.org/onlinepubs/009695399/functions/poll.html.
2019-11-25 09:59:50 -06:00
Xiang Xiao
34ec7c97eb net/icmp/icmp_netpoll.c and icmpv6/icmpv6_netpoll.c: ICMP/ICMPv6 should always report POLLHUP and POLLERR, regardless of requested 'events'. 2019-11-25 09:57:49 -06:00
Xiang Xiao
af9c67ab58 net/tcp/tcp_netpoll.c and net/udp/udp_netpoll.c: In [tcp|udp]_iob_work fix the wrong condition logic (& vs &&). 2019-11-25 09:32:24 -06:00
Gregory Nutt
c86fabb9b2 STM32 F4 LPTIM: Cosmetic changes from application of tools/nxstyle to all files modified in last PR. 2019-11-25 08:04:45 -06:00
kyChu
e423e15a56 Merged in kyChuGit/nuttx (pull request #1076)
stm32l4 peripheral driver update

* arch/arm/src/stm32l4/hardware/stm32l4_spi.h:  change the spi speed limitation to 40MHz.

* arch/arm/src/stm32l4/stm32l4_lptim.c:  clear the warning message of "-Wundef".

Approved-by: Gregory Nutt <gnutt@nuttx.org>
2019-11-25 14:01:39 +00:00
Gregory Nutt
f691d774cc STM32 F7 SDMMC: Cosmetic changes from application of tools/nxstyle to all files modified in last PR. 2019-11-25 08:00:45 -06:00
OSer
56f8af5db3 Merged in OSer916/nuttx/stm32f746g_disco_sd_card (pull request #1075)
Stm32f746g disco sd card

* arch/arm/src/stm32f7/stm32_sdmmc.c: fix compile error

* boards/arm/stm32f7/stm32f746g-disco: add SD/TF Card Support

Approved-by: Gregory Nutt <gnutt@nuttx.org>
2019-11-25 13:54:45 +00:00
Gregory Nutt
f1ffb300da net/devif/devif_callback.c: This commit reverts the core of commit cf9f2c56cb pending further investigation. Valmantas Palikša reports that this change cause timeout errors during pinging. 2019-11-25 07:34:41 -06:00
Xiang Xiao
c5a7da5b7a mm/iob/Kconfig: Make the default of IOB_NCHAINS same as IOB_NBUFFERS. It is reasonable default value since iob_qentry_s is much small than iob_s and could avoid the buffer can be allocated but the chain can't: 'tcp_datahandler: ERROR: Failed to queue the I/O buffer chain: -12' 2019-11-24 10:43:45 -06:00
Xiang Xiao
506b83f8d9 net/inet/inet_close.c: In tcp_close_eventhandler(), check TCP_NEWDATA flag before process and don't eat the flag for TCP_DISCONN_EVENTS 2019-11-24 10:41:11 -06:00
Xiang Xiao
98fc60eb75 [tcp|udp]_poll_eventhandler check psock_[tcp|udp]_cansend before report POLLOUT. Change the unbuffered psock_[tcp|udp]_cansend return OK to unify the code logic and remove the unnecessary [tcp|udp]_poll_txnotify call. 2019-11-24 10:30:48 -06:00
Xiang Xiao
673f812c4e net/tcp/tcp_netpoll.c: Monitor TCP_POLL/TCP_NEWDATA/TCP_BACKLOG per the request like UDP counterpart. 2019-11-24 10:20:01 -06:00
Xiang Xiao
893fc6e1cf net/udp/udp_netpoll.c: Report POLLHUP and POLLERR in 'revents' regardless the requested 'events' set. Per Opengroup.org, these bits must be ignored in the 'events' set. 2019-11-24 10:18:08 -06:00
Xiang Xiao
cf9f2c56cb et/devif/devif_callback.c: devif_event_trigger shouldn't return true if triggers & DEVPOLL_MASK equal zero() 2019-11-24 10:11:19 -06:00
Gregory Nutt
9efadaefc1 net/tcp: Be consistent with units of TIME_WAIT. Units were unspecified in tcp/Kconfig, but assumed to be in units of half seconds in tcp/timer.h. include/nuttx/netconfig does not indicate the units but is apparently assuming seconds. This commit unifies all delays to clearly specified units of seconds. 2019-11-24 09:19:54 -06:00
Matias N
1a56fefb9f tools/configure.sh and configure.c: Debug option now also shows make olddefconfig output. 2019-11-23 14:47:59 -06:00
Ouss4
4e3e9fabc7 arch/mips/src/pic32mz/pic32mz-ethernet.c: Clean/invalidate descriptors and buffers when needed to account for an enabled cache. 2019-11-23 09:28:14 -06:00
Ouss4
bd45193a79 arch/mips: Add cache operations. Cache is initialized at startup (head.S) and the different operations are implemented in up_cache.S. 2019-11-23 09:16:41 -06:00
Ouss4
0970d742e9 arch/mips/src/pic32mz/pic32mz-lowinit.c: Remove the pic32mz_k0cache function, this was actually enabling cache in KSEG2. Correct (as per the datasheet) the values for initializing the prefetch module. Add a function to disable all ADC inputs at startup. When ADC is used each pin will be enabled individually. 2019-11-23 09:05:13 -06:00
Ouss4
54e09340d5 boards/mips/pic32mz/pic32mz-starterkit/src/pic32mz_userleds.c: Use the pinset_t type when manipulating IOs. 2019-11-23 09:00:43 -06:00
Ouss4
fd1b82ae4b arch/mips/src/pic32mz/pic32mz-gpio.h: Include stdbool and stdint, they are used in this file. 2019-11-23 08:59:02 -06:00
Ouss4
5a3c9c914c arch/mips/src/pic32mz/pic32mz-i2c.c: When perfoming an i2c reset, the pins were used uninitialized. 2019-11-23 08:57:43 -06:00
Ouss4
a284896ce1 drivers/mtd/sst26.c: Default memory type is 0x26. 2019-11-23 08:49:51 -06:00
Ouss4
cbc72f756c arch/mips/src/pic32mz/pic32mz-spi.c: Transfers can now be configured to use DMA. 2019-11-23 08:48:29 -06:00
Ouss4
fcc1410485 arch/mips/src/pic32mz/pic32mz-dma.c: Add a way to reconfigure a DMA channel. 2019-11-23 08:35:48 -06:00
Ouss4
b853a5c750 arch/mips/src/pic32mz/pic32mz-dma.c: Make the DMA interrupt event configurable when setting up a transfer. This allows changing the event without deallocating a channel first. Clear the DMA interrupt flag when the ISR is called. Change some misleading names. 2019-11-23 08:33:06 -06:00
Xiang Xiao
afb40d87fb fs/mmap/fs_mmap.c: Add support for MAP_PRIVATE. 2019-11-23 08:07:04 -06:00
Xiang Xiao
e0307fcd8f boards/sim/sim/sim/src/sim_bringup.c: Mount tmpfs to CONFIG_LIBC_TMPDIR in sim_bringup if CONFIG_FS_TMPFS is defined. 2019-11-23 07:58:50 -06:00
Gregory Nutt
de45c3f607 Documentation/NuttShell.html: Update to include a description of the 'dmesg' command which was apparently never documented. 2019-11-21 12:25:50 -06:00
Gregory Nutt
a83ea83e91 Documentation/NuttX.html: Fix URLs to reflect new location of the Obsoleted repository. 2019-11-21 12:25:31 -06:00
Gregory Nutt
27b6132601 Run files changed in last PR through tools/nxstyle, fix several coding standard violations. 2019-11-21 07:50:37 -06:00
OSer
e1f904c943 Merged in OSer916/nuttx/stm32f746g-disco-n25q (pull request #1074)
stm32f746g-disco board add n25q128 support

* arch/arm/src/stm32f7/hardware/stm32f74xx75xx_pinmap.h: fix QSPI pin
    config.

* arch/arm/src/stm32f7/stm32_qspi.c: fix gpio_dumpgpioconfig() function,
    fix qspi_command() function

* boards/arm/stm32f7/stm32f746g-disco/README.txt: fix board path

* boards/arm/stm32f7/stm32f746g-disco: add n25q128 function

* boards/arm/stm32f7/stm32f746g-disco/scripts/Make.defs: use st-flash tool to write fireware on Linux

Approved-by: Gregory Nutt <gnutt@nuttx.org>
2019-11-21 13:39:45 +00:00