-
Notifications
You must be signed in to change notification settings - Fork 667
usb: device_next: hid: Cherry-pick USB next fixes #1762
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
Conversation
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.
Blocking until 73657 is reviewed upstream by Johann.
0667a82
to
3efa3af
Compare
After the get_report() callback, we need to determine how many bytes the HID device wrote to the report buffer. Use the callback return value to do this, and modify the net_buf data length value if get_report was successful. Reported-by: Marek Pieta <[email protected]> Signed-off-by: Johann Fischer <[email protected]> (cherry picked from commit af63e48)
The `Remote wakeup feature not enabled or not suspended` log is not related to an actual error (connected host might not enable USB remote wakeup feature). Use warning log level. Signed-off-by: Marek Pieta <[email protected]> (cherry picked from commit 0596430)
3efa3af
to
080f883
Compare
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.
You changed the title to Cherry-pick USB next fixes. Could you please then cherry-pick also the other PRs that are already merged (73255, 73142, 73561, 73463)?
… enable If CDC ACM uart side has TX enabled when the configuration gets enabled, depending on fifo state following has to happen: * if the fifo is empty - trigger TX ready interrupt * if the fifo is not empty - queue TX data on IN endpoint Signed-off-by: Tomasz Moń <[email protected]> (cherry picked from commit c30ac4d)
Do not set NAK bit again for endpoints that already have NAK bit set. Do not wait for OUT endpoint 0 disable because it cannot be disabled by application (DOEPCTL0 EPDis bit is Read-Only). Disable endpoints before disabling interrupts because it is necessary to handle RXFLVL interrupt (in Slave mode) for GOUTNAKEFF to become active. Signed-off-by: Tomasz Moń <[email protected]> (cherry picked from commit 4db14f8)
Flushing TxFIFO is racing with actual use of the TxFIFO. The software controls only one side of the race (flush trigger) while the host controls the other side. Therefore, locking interrupts before flushing TxFIFO is not protecting against the race condition. Disable the endpoint on dequeue to make sure that TxFIFO flushing won't conflict with host actions (because the endpoint would be forced to NAK the IN tokens before the TxFIFO is flushed). Signed-off-by: Tomasz Moń <[email protected]> (cherry picked from commit 2368623)
Explicitly initialize bNumDeviceCaps to 0 because the bos descriptor is stored on stack. Fixes: b0d7d70 ("usb: device_next: add initial BOS support") Coverity-CID: 368798 Signed-off-by: Tomasz Moń <[email protected]> (cherry picked from commit a1afd34)
Add the missing "t" to struct usbd_contex. No functional changes. Signed-off-by: Tomasz Moń <[email protected]> (cherry picked from commit 8d344cc)
Hi @tmon-nordic, |
On nRF54H20DK the USB PHY is powered from VBUS. When the USB cable is not connected, the PHY is not powered and the PHY clock disappears. Because the GOUTNAKEFF and INEPNAKEFF can only ever be set when PHY clock is active, the waits for these bits do timeout if cable is disconnected. Workaround the issue by aborting the wait if vendor quirk indicates that PHY clock has abruptly vanished. Upstream PR: zephyrproject-rtos/zephyr#73461 Signed-off-by: Tomasz Moń <[email protected]>
Cherry-pick USB next fixes: