-
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
drivers: rework usb_dc_mcux_ehci #21175
drivers: rework usb_dc_mcux_ehci #21175
Conversation
03b6bf6
to
808f7ad
Compare
Tested on IMXRT1050-EVKB, passes USB 2 CV Chapter 9 and all testusb tests now. |
We should perhaps hold this back, merge it after 2.1 release, we are in -rc3 already. |
@MarkWangChinese please review |
2bf489b
to
b176570
Compare
Rebased. @MaureenHelm The header file modules/hal/nxp/mcux/middleware/usb/device/port/zephyr/usb_dc_mcux.h is a part of the driver. It hides a lot of things, has unnecessary complexity, and does not help to maintain the driver. This file should be moved to drivers/usb/device/usb_dc_mcux_hal.h and reworked/simplified. I would like to do that, this would also help to fix high speed support what I really would like to improve and test with imxrt1050. |
@MaureenHelm did you still want someone else to review this? I see you mentioned @MarkWangChinese back in December. |
@jfischer-phytec-iot there seems to be a conflict with |
Fix style, variables name, defines. Signed-off-by: Johann Fischer <j.fischer@phytec.de>
Remove unnecessary cast, fix style. Signed-off-by: Johann Fischer <j.fischer@phytec.de>
Fix style, rework usb_dc_attach. Signed-off-by: Johann Fischer <j.fischer@phytec.de>
Fix style, rework usb_dc_detach(). Signed-off-by: Johann Fischer <j.fischer@phytec.de>
Do not reconfigure active endpoint. Fix style. Signed-off-by: Johann Fischer <j.fischer@phytec.de>
Rework set/clear stall. Fix style. Signed-off-by: Johann Fischer <j.fischer@phytec.de>
Rework endpoint enable/disable. Fix style. Signed-off-by: Johann Fischer <j.fischer@phytec.de>
Rework ep_write/ep_read. Fix style. Signed-off-by: Johann Fischer <j.fischer@phytec.de>
Rework USB_DeviceNotificationTrigger(). Fix style. Drop messages from USB_DeviceEhciCancel(). MCUX EHCI driver notifies about canceled transfers, but there is no specific code for this event in usb_device_callback_message_struct_t, the only way to recognize it is to check the length value. Signed-off-by: Johann Fischer <j.fischer@phytec.de>
Add checks for valid endpoint. Fix controllerHandle check in usb_dc_detach(). Fixes: zephyrproject-rtos#19763 Signed-off-by: Johann Fischer <j.fischer@phytec.de>
Re-enable reception after clear an endpoint stall. Signed-off-by: Johann Fischer <j.fischer@phytec.de>
b176570
to
26e1ad6
Compare
test pass in this PR @MaureenHelm , @dlech
|
@MaureenHelm this fixes a bug, has been opened for a while and is scheduled for this release. Could you review it so we can include it in the release? |
This is bug fix, rework, and style fix of usb_dc_mcux_ehci
Fixes #19763