Commit Graph

29700 Commits

Author SHA1 Message Date
Masayuki Ishikawa 7591bbc15a Merge branch 'master' into bug_fix_by_sony 2017-05-19 17:22:25 +09:00
Masayuki Ishikawa e72a6adeeb Merged nuttx/nuttx into master 2017-05-19 17:21:10 +09:00
Yasuhiro Osaki b1008477ac binfmt: Fix .dtor memory allocation
Jira: PDFW15IS-265
Coverity-ID: 11053
Signed-off-by: Masayuki Ishikawa <Masayuki.Ishikawa@jp.sony.com>
2017-05-19 17:01:48 +09:00
Masayuki Ishikawa 4a93c2aaa4 Merged in masayuki2009/nuttx.nuttx/network_test (pull request #373)
net procfs: Fix buffer corruption and refactor netdev_statistics.c

Approved-by: Gregory Nutt <gnutt@nuttx.org>
2017-05-19 01:24:23 +00:00
Masayuki Ishikawa 0260891c96 net procfs: Fix buffer corruption and refactor netdev_statistics.c
Signed-off-by: Masayuki Ishikawa <masayuki.ishikawa@gmail.com>
2017-05-19 06:09:06 +09:00
Masayuki Ishikawa 3633b5b6d5 Merged nuttx/nuttx into master 2017-05-19 06:01:47 +09:00
Gregory Nutt 49a70079c1 Update TODO list 2017-05-18 09:51:36 -06:00
Masayuki Ishikawa 19e1d98734 Merged nuttx/nuttx into master 2017-05-18 21:14:42 +09:00
Masayuki Ishikawa 2d6ef32d27 Merged in masayuki2009/nuttx.nuttx/network_test (pull request #372)
IOBs: Fix build break

Approved-by: Gregory Nutt <gnutt@nuttx.org>
2017-05-18 11:35:01 +00:00
Masayuki Ishikawa 980b17d951 IPv6: Fix net_ipv6_pref2mask()
Signed-off-by: Masayuki Ishikawa <masayuki.ishikawa@gmail.com>
2017-05-18 20:26:24 +09:00
Masayuki Ishikawa f10e10e465 IOBs: Fix build break
Signed-off-by: Masayuki Ishikawa <masayuki.ishikawa@gmail.com>
2017-05-18 13:59:03 +09:00
Gregory Nutt 989195cec8 STM32 Ethernet: Last patch breaks every board that does not use the KSZ80801 PHY. 2017-05-17 15:36:57 -06:00
Gregory Nutt aac3a3df8e STM32 Ethernet: Should not stm32_phyintenable() return a failure if it could not enable the PHY interrupt? 2017-05-17 10:07:09 -06:00
Sebastien Lorquet 2c6ea23aee STM32 Ethernet: Add support for KSZ8081 PHY interrupts. 2017-05-17 10:04:49 -06:00
Juha Niskanen 8896f91f53 STM32L4: remove duplicate USART selects from Kconfig 2017-05-17 08:05:24 -06:00
Jussi Kivilinna 9169ff6a15 stm32_serial: fix freezing serial port. Serial interrupt enable/disable functions do not disable interrupts and can freeze device when serial interrupt is received while execution is at those functions.
Trivially triggered with two or more threads write to regular syslog stream and to emergency stream. In this case, freeze happens because of mismatch of priv->ie (TXEIE == 0) and actually enabled interrupts in USART registers (TXEIE == 1), which leads to unhandled TXE interrupt
and causes interrupt storm for USART.
2017-05-17 06:50:46 -06:00
Gregory Nutt 5ce2ece134 syslog: Add header file inclusion to eliminate a warning; mm/iob: private function needs static storage class. 2017-05-16 12:26:23 -06:00
Gregory Nutt 6a3800f611 There can be a failure in IOB allocation to some asynchronous behavior caused by the use of sem_post(). Consider this scenario:
Task A holds an IOB.  There are no further IOBs.  The value of semcount is zero.
Task B calls iob_alloc().  Since there are not IOBs, it calls sem_wait().  The v
alue of semcount is now -1.

Task A frees the IOB.  iob_free() adds the IOB to the free list and calls sem_post() this makes Task B ready to run and sets semcount to zero NOT 1.  There is one IOB in the free list and semcount is zero.  When Task B wakes up it would increment the sem_count back to the correct value.

But an interrupt or another task runs occurs before Task B executes.  The interrupt or other tak takes the IOB off of the free list and decrements the semcount.  But since semcount is then < 0, this causes the assertion because that is an invalid state in the interrupt handler.

So I think that the root cause is that there the asynchrony between incrementing the semcount.  This change separates the list of IOBs:  Currently there is only a free list of IOBs.  The problem, I believe, is because of asynchronies due sem_post() post cause the semcount and the list content to become out of sync.  This change adds a new 'committed' list:  When there is a task waiting for an IOB, it will go into the committed list rather than the free list before the semaphore is posted.  On the waiting side, when awakened from the semaphore wait, it will expect to find its IOB in the committed list, rather than free list.

In this way, the content of the free list and the value of the semaphore count always remain in sync.
2017-05-16 11:03:35 -06:00
Jussi Kivilinna a6e556d31c I had to make following change to fix interrupt context syslog (INTBUFFER untested) 2017-05-16 10:56:49 -06:00
EunBong Song 5ef00f0b91 drivers/bch: BCH character driver bch_ioctl() always returns -ENOTTY for DIOC_GETPRIV command. It should returns OK if DIOC_GETPRIV command succeeds. 2017-05-16 08:01:05 -06:00
Lederhilger Martin b8e7d5c455 I had the problem that the transmit FIFO size (= actual elements in FIFO) was slowly increasing over time, and was full after a few hours.
The reason was that the code hit the line "canerr("ERROR: No available mailbox\n");" in stm32_cansend, so can_xmit thinks it has sent the packet to the hardware, but actually has not. Therefore the transmit interrupt never happens which would call can_txdone, and so the size of the FIFO size does not decrease.

The reason why the code actually hit the mentioned line above, is because stm32can_txready uses a different (incomplete) condition than stm32can_send to determine if the mailbox can be used for sending, and thus can_xmit forwards the packet to stm32can_send. stm32can_txready considered mailboxes OK for sending if the mailbox was empty, but did not consider that mailboxes may not yet be used if the request completed bit is set - stm32can_txinterrupt has to process these mailboxes first.

Note that I have also modified stm32can_txinterrupt - I removed the if condition, because the CAN controller retries to send the packet until it succeeds. Also if the condition would not evaluate to true, can_txdone would not be called and the FIFO size would not decrease also.
2017-05-16 07:47:18 -06:00
Gregory Nutt 56c8456ff0 Update some comments. 2017-05-16 07:38:57 -06:00
Gregory Nutt 914c5dad0c TCP: An RST recevied suring the 3-way handshake requires a little more clean-up 2017-05-15 08:10:43 -06:00
Juha Niskanen 34e68a569b drivers: rename newly introduced up_i2creset to I2C_RESET 2017-05-15 07:22:17 -06:00
Juha Niskanen b9a769d65d drivers: fix some bad NULL checks 2017-05-15 07:20:32 -06:00
Gregory Nutt 17e9a88d0d Merge branch 'ieee802154' 2017-05-14 16:37:55 -06:00
Gregory Nutt b10d2bbc8c Merge remote-tracking branch 'origin/master' into ieee802154 2017-05-14 16:37:10 -06:00
Anthony Merlino 2cf94a62d5 Merged in merlin17/nuttx/ieee802154 (pull request #370)
Ieee802154

Approved-by: Gregory Nutt <gnutt@nuttx.org>
2017-05-14 22:33:48 +00:00
Anthony Merlino 8ec0b71a59 wireless/ieee802154: Updates configuration settings 2017-05-14 17:59:19 -04:00
Anthony Merlino 2b5e415fab wireless/ieee802154: Starts implementing START.request primitive 2017-05-14 17:55:15 -04:00
Gregory Nutt aa57fb159d TCP: Send RST if applicaiton 'unlistens()' before we complete the connection sequence. 2017-05-14 13:30:59 -06:00
Gregory Nutt 8acfea1197 Fix some typos 2017-05-14 12:14:31 -06:00
Simon Piriou 8d2a3f4856 Merged in spiriou/nuttx/photon_telnet (pull request #369)
photon/wlan: disable network logs and add nsh over telnet

Approved-by: Gregory Nutt <gnutt@nuttx.org>
2017-05-14 18:13:11 +00:00
Simon Piriou 7e75d61ea0 photon/wlan: disable network logs and add nsh over telnet 2017-05-14 19:33:44 +02:00
Gregory Nutt 93d73b14ab Merge branch 'synack' 2017-05-14 11:00:47 -06:00
Gregory Nutt d339ba9e0e TCP: Fix some potential error conditions that could result from deferring the connection until the full 3-way handshake has completed. 2017-05-14 10:56:25 -06:00
Simon Piriou 8dc7f6d79e tcp: wait for 3-Way Handshare before accept() returns 2017-05-14 09:08:32 -06:00
Gregory Nutt fa649df52e Photon: Small update from Simon Piriou. 2017-05-14 08:39:53 -06:00
Gregory Nutt 06db5614e7 Fix a warning about can.o appearing twice in the same rule. 2017-05-13 18:05:40 -06:00
Gregory Nutt a52967a772 Syslog interrrupt buffer: eliminate a warning about an uninitialized variable; simply some related logic. 2017-05-13 17:40:46 -06:00
Matias v01d 820ef7059e libc/wchar: Versions mbrlen and mbsrtowcs taken and adapted from FreeBSD code (at https://github.com/freebsd/freebsd/) 2017-05-13 17:07:40 -06:00
Matias v01d 7cc2ee25ec libc/wchar: Versions mbrlen and mbsrtowcs taken and adapted from FreeBSD code (at https://github.com/freebsd/freebsd/) 2017-05-13 17:06:58 -06:00
Gregory Nutt 7fd08a60a3 Move prototype from nuttx/include/nuttx/arch.h to apps/include/platform/cxxinitialize.h 2017-05-13 16:53:55 -06:00
Gregory Nutt b0fda33e13 Kconfig: Rename CONFIG_ARM_TOOLCHAIN_IAR to CONFIG_ARCH_TOOLCHAIN_IAR 2017-05-13 16:01:38 -06:00
Gregory Nutt 27805315f4 Tiva I2C: Correct an in conditional compilation 2017-05-13 14:01:42 -06:00
Gregory Nutt 6e4918c557 Remove CONFIG_ARM_TOOLCHAIN_GNU; replace with CONFIG_ARCH_TOOLCHAIN_GNU 2017-05-13 13:28:15 -06:00
Gregory Nutt 7fe112fe4c Kconfig/deconfigs: Add CONFIG_ARCH_TOOLCHAIN_GNU to indicate that the toolchain is based on GNU gcc/as/ld. This is in addition to the CPU-specific versions of the same definition. 2017-05-13 11:44:12 -06:00
Gwenhael Goavec-Merou 02535be36a STM32F410. Add support for STM32Fr10. STM32F410 is a version of STM32F4 with 32 KB of RAM and 62 or 128 KB of flash. 2017-05-13 08:40:09 -06:00
David Sidrane c4a2e1399b Merged in david_s5/nuttx/upstream_kinetis (pull request #368)
kinetis:K66 GPIO and pin mux cleanup

Approved-by: Gregory Nutt <gnutt@nuttx.org>
2017-05-13 10:37:20 +00:00
David Sidrane 69a8aecbc8 kinetis:K66 define ALT1 to match ref manual 2017-05-12 17:21:54 -10:00