Skip to content

usbus/msc: fixes for synopsys dwc2 driver#19455

Merged
bors[bot] merged 2 commits intoRIOT-OS:masterfrom
dylad:pr/usbus/msc/fixes_for_synopsys_dwc2
Apr 6, 2023
Merged

usbus/msc: fixes for synopsys dwc2 driver#19455
bors[bot] merged 2 commits intoRIOT-OS:masterfrom
dylad:pr/usbus/msc/fixes_for_synopsys_dwc2

Conversation

@dylad
Copy link
Copy Markdown
Member

@dylad dylad commented Apr 5, 2023

Contribution description

This PR provides two fixes for USBUS MSC driver.
9e88db7 removes a call to usbdev_control_slicer_ready() as this function is called by USBUS stack right after so remove this call to avoid duplication.
608d49c moves the call to usbdev_ep_xmit(), which prepares the bulk MSC OUT endpoint to receives data, from the _init() function to USB_MSC_SETUP_REQ_GML control request. The issue was that this endpoint was prepare to early and an USB reset might reset this setting. (This is the case for the usbdev_synopsys_dwc2 driver) Thus the endpoint is not ready to receive data when the host send it.

Testing procedure

Test this PR with tests/usbus_msc on any board using the usbdev_synopsys_dwc2 driver with a FS PHY
There is another issue with HS PHY that should be fix too.

Issues/PRs references

None.

dylad added 2 commits April 5, 2023 20:14
This function should not be called by the driver as USBUS will handle it already. So remove this call to prevent duplication

Signed-off-by: Dylan Laduranty <dylan.laduranty@mesotic.com>
Signed-off-by: Dylan Laduranty <dylan.laduranty@mesotic.com>
@dylad dylad requested review from aabadie and bergzand as code owners April 5, 2023 18:28
@dylad dylad added the Process: needs backport Integration Process: The PR is required to be backported to a release or feature branch label Apr 5, 2023
@github-actions github-actions bot added Area: sys Area: System Area: USB Area: Universal Serial Bus labels Apr 5, 2023
@dylad dylad requested a review from gschorcht April 5, 2023 18:30
@dylad dylad added the CI: ready for build If set, CI server will compile all applications for all available boards for the labeled PR label Apr 5, 2023
@riot-ci
Copy link
Copy Markdown

riot-ci commented Apr 5, 2023

Murdock results

✔️ PASSED

608d49c usbus/msc: ready MSC bulk OUT endpoint in USB_MSC_SETUP_REQ_GML request

Success Failures Total Runtime
6881 0 6882 09m:09s

Artifacts

@benpicco benpicco added the Type: bug The issue reports a bug / The PR fixes a bug (including spelling errors) label Apr 5, 2023
Copy link
Copy Markdown
Contributor

@gschorcht gschorcht left a comment

Choose a reason for hiding this comment

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

Works now with usbdev_synopsys_dwc2 and FS PHY.

@gschorcht
Copy link
Copy Markdown
Contributor

bors merge

@bors
Copy link
Copy Markdown
Contributor

bors bot commented Apr 6, 2023

Build succeeded:

@bors bors bot merged commit 8c99576 into RIOT-OS:master Apr 6, 2023
bors bot added a commit that referenced this pull request Apr 15, 2023
19456: usbus/msc: fixes for synopsys dwc2 [backport 2023.04] r=dylad a=dylad

### Contribution description
This is a backport PR containing two fixes for USBUS MSC driver so it can works with `usbdev_synopsys_dwc2` driver
See #19455 for more context.


### Testing procedure
Same as #19455 

### Issues/PRs references
See #19455 


Co-authored-by: Dylan Laduranty <dylan.laduranty@mesotic.com>
@dylad dylad deleted the pr/usbus/msc/fixes_for_synopsys_dwc2 branch April 17, 2023 20:13
@benpicco benpicco added this to the Release 2023.07 milestone Aug 2, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Area: sys Area: System Area: USB Area: Universal Serial Bus CI: ready for build If set, CI server will compile all applications for all available boards for the labeled PR Process: needs backport Integration Process: The PR is required to be backported to a release or feature branch Type: bug The issue reports a bug / The PR fixes a bug (including spelling errors)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants