Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

winc1500 driver blocks on listen #28953

Closed
Kludentwo opened this issue Oct 6, 2020 · 0 comments · Fixed by #28957
Closed

winc1500 driver blocks on listen #28953

Kludentwo opened this issue Oct 6, 2020 · 0 comments · Fixed by #28957
Labels
area: Drivers area: Networking bug The issue is a bug, or the PR is fixing a bug priority: low Low impact/importance bug

Comments

@Kludentwo
Copy link
Contributor

Kludentwo commented Oct 6, 2020

Describe the bug
Using the winc1500 wireless device, listen calls from application block.

To Reproduce
Steps to reproduce the behavior:

  1. west build -p -b frdm_k64f zephyr/samples/net/sockets/dumb_http_server -DSHIELD=adafruit_winc1500
  2. west debug
  3. (gdb) b socket_dumb_http.c:60
  4. (gdb) c

Expected behavior
sample runs to breakpoint.

Actual behaviour
sample is stuck in winc1500_accept(...) waiting for the accept semaphore.
This semaphore is given later by a callback when a client has connected.

Suggestion
Remove k_sem_take(wait_sem, K_FOREVER) from winc1500_accept.
Remove k_sem_give(&sd->wait_sem); from winc1500_socket_cb, case SOCKET_MSG_ACCEPT:

@Kludentwo Kludentwo added the bug The issue is a bug, or the PR is fixing a bug label Oct 6, 2020
Kludentwo added a commit to Kludentwo/zephyr that referenced this issue Oct 9, 2020
Listen func goes through a chain of calls to call winc1500_accept.
This is done to install the accept callback and should not block.
This fixes zephyrproject-rtos#28953 where winc1500 driver blocks on listen.

Signed-off-by: Nicolai Glud <[email protected]>
@ioannisg ioannisg added priority: low Low impact/importance bug and removed priority: medium Medium impact/importance bug labels Oct 13, 2020
MaureenHelm pushed a commit that referenced this issue Oct 21, 2020
Listen func goes through a chain of calls to call winc1500_accept.
This is done to install the accept callback and should not block.
This fixes #28953 where winc1500 driver blocks on listen.

Signed-off-by: Nicolai Glud <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area: Drivers area: Networking bug The issue is a bug, or the PR is fixing a bug priority: low Low impact/importance bug
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants