-
Notifications
You must be signed in to change notification settings - Fork 6.8k
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
usb: usbip: add initial support for USBIP server #74141
Draft
jfischer-no
wants to merge
18
commits into
zephyrproject-rtos:main
Choose a base branch
from
jfischer-no:pr-uhc-usbip-initial
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Draft
usb: usbip: add initial support for USBIP server #74141
jfischer-no
wants to merge
18
commits into
zephyrproject-rtos:main
from
jfischer-no:pr-uhc-usbip-initial
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
jfischer-no
added
area: USB
Universal Serial Bus
Experimental
Experimental features not enabled by default
labels
Jun 12, 2024
57 tasks
tmon-nordic
reviewed
Jun 17, 2024
* | ||
* SPDX-License-Identifier: Apache-2.0 | ||
*/ | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This file is missing include guards.
jfischer-no
force-pushed
the
pr-uhc-usbip-initial
branch
3 times, most recently
from
January 6, 2025 16:16
d123ee7
to
01328a1
Compare
This allows us to use the testusb Linux kernel tool again. All tests involving control and bulk transfers should pass. Additionally, add a shell command that allows the user to manually enqueue bulk transfers. Signed-off-by: Johann Fischer <[email protected]>
Lock the scheduler until the device is fully enabled, similar to usbd_init(); Signed-off-by: Johann Fischer <[email protected]>
Do not necessarily call k_timer_init() in the uhc_bus_resume() implementation. Restart SOF timer after bus reset and in uhc_sof_enable() implementation. Signed-off-by: Johann Fischer <[email protected]>
The parameter should not be a pointer to type usbh_udev_cb_t. Signed-off-by: Johann Fischer <[email protected]>
Implement the dequeue function and remove the timeout parameter as it is no longer necessary and can be handled in the upper layer. The dequeue function is required for the USBIP implementation. Signed-off-by: Johann Fischer <[email protected]>
With the current implementation, NACK claims all resources and prevents scheduling multiple transfers within a frame. Place a number of available transfers in a list at the beginning of a frame, and process the transfers in a limited number of slots. Signed-off-by: Johann Fischer <[email protected]>
This will allow the controller driver to access information about the device in the future. Signed-off-by: Johann Fischer <[email protected]>
Address parameter/argument is no longer needed because we have a pointer to the USB device. The Attrib parameter has never been used and will be replaced by the interval and start-frame parameters in the future. Signed-off-by: Johann Fischer <[email protected]>
To determine bMaxPacketSize0, which is unknown after the reset. Signed-off-by: Johann Fischer <[email protected]>
Update the SoF timer based on the bus speed of the connected device. Signed-off-by: Johann Fischer <[email protected]>
Add interrupt and start frame parameters and schedule transaction at specific frame. Implement for virtual driver only. Signed-off-by: Johann Fischer <[email protected]>
Add an opaque pointer to store upper layer private data and initialize it with the USB host context during controller initialization. Use the pointer in event processing to get the correct context. Signed-off-by: Johann Fischer <[email protected]>
The transfers require enpoint MPS for proper transaction handling, assign it in the common place during transfer allsocation so that it can be reused. Some users, such as USBIP, may need to keep a reference to private data, add a parameter for completion callback data. Signed-off-by: Johann Fischer <[email protected]>
Handle them in separate contexts so that the request completion callback cannot be blocked, such as when a device connection is detected and requires configuration. Signed-off-by: Johann Fischer <[email protected]>
Allow dynamic allocation of USB devices on connected event. Add very basic USB device validation and configuration. Signed-off-by: Johann Fischer <[email protected]>
The server uses minimal host support to export a USB device to a remote USBIP client. It supports control and bulk transfers, interrupt transfers may also work, but this depends on the host controller used. Only a single USB device can be exported yet. Signed-off-by: Johann Fischer <[email protected]>
Snippet that helps to build USB device samples with virtual device and host controllers and USBIP support. Signed-off-by: Johann Fischer <[email protected]>
Add initial USB/IP documentation for the new USB support. Signed-off-by: Johann Fischer <[email protected]>
jfischer-no
force-pushed
the
pr-uhc-usbip-initial
branch
from
January 17, 2025 12:18
01328a1
to
9ef6b2c
Compare
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
The server uses minimal host support to export a USB device to a remote
USBIP client. It supports control and bulk transfers, interrupt
transfers may also work, but this depends on the host controller used.
Only a single USB device can be exported yet.