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

drivers: nordic: usbd: Fix long (fragmented) control OUT transfers #11713

Conversation

pawelzadrozniak
Copy link
Collaborator

Fragmented long CTRL OUT transfers does not work properly, because
they were not handler properly by the shim. In such transfers,
a special call (nrfx_usbd_setup_data_clear()) must be performed
before every data packet and not just before the first one.
This patch adds a byte counter which is set while processing setup
packet (host->device only) to be able to decide whether there will
be more data packets coming (and to call_data_clear() or not).

Fixes #11232 .

Signed-off-by: Paweł Zadrożniak pawel.zadrozniak@nordicsemi.no

@zephyrbot
Copy link
Collaborator

zephyrbot commented Nov 28, 2018

All checks are passing now.

Review history of this comment for details about previous failed status.
Note that some checks might have not completed yet.

@codecov-io
Copy link

codecov-io commented Nov 28, 2018

Codecov Report

Merging #11713 into master will not change coverage.
The diff coverage is n/a.

Impacted file tree graph

@@           Coverage Diff           @@
##           master   #11713   +/-   ##
=======================================
  Coverage    48.2%    48.2%           
=======================================
  Files         279      279           
  Lines       43312    43312           
  Branches    10372    10372           
=======================================
  Hits        20878    20878           
  Misses      18288    18288           
  Partials     4146     4146

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 9643ed6...0e5146a. Read the comment docs.

@pawelzadrozniak pawelzadrozniak force-pushed the nordic_long_ctrl_read_fix branch from 27e0548 to 5b14641 Compare November 29, 2018 10:09
Fragmented long CTRL OUT transfers does not work properly, because
they were not handler properly by the shim. In such transfers,
a special call (nrfx_usbd_setup_data_clear()) must be performed
before every data packet and not just before the first one.
This patch adds a byte counter which is set while processing setup
packet (host->device only) to be able to decide whether there will
be more data packets coming (and to call_data_clear() or not).

Fixes zephyrproject-rtos#11232 .

Signed-off-by: Paweł Zadrożniak <pawel.zadrozniak@nordicsemi.no>
@pawelzadrozniak pawelzadrozniak force-pushed the nordic_long_ctrl_read_fix branch from 5b14641 to 0e5146a Compare November 29, 2018 11:01
Copy link
Collaborator

@finikorg finikorg left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Tested that the patch fixes issue #11232

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants