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

!usbd:dwc_otg:OUT prematured urb RXC leads to loose next URB #56

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

alexrayne
Copy link

@alexrayne alexrayne commented Mar 14, 2017

on stm32 premature completed URBs (finished by short packet or else) are followed by standalone OUT_COMP received packet, that rise RXC IRQ.

this RCX will captured by next active URB, and leads to terminate it.

this patch tests against MSD implementation - it allow format usb drive in winXP.

… standalone OUT_COMP received packet, that rise RXC IRQ

        this RCX will captureb by next active URB, and leads to terminate it.
@kuldeepdhaka
Copy link
Contributor

Ok, this PR seem to fix a bug.
Note for myself: check for regression and merge it.

@@ -919,6 +921,18 @@ static void process_out_endpoint_interrupt(usbd_device *dev, uint8_t ep_num)
LOGF_LN("Transfer Complete: endpoint 0x%"PRIx8, ep_addr);
usbd_urb *urb = usbd_find_active_urb(dev, ep_addr);

if (is_ep_prematured(dev, ep_addr)) {
if (urb != NULL){
//* ommit this RXC and restart current URB
Copy link
Contributor

Choose a reason for hiding this comment

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

Note: "//" C++ comments. Please use C style: /* */

Copy link
Contributor

Choose a reason for hiding this comment

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

I suggest you add the -ansi -pedantic options to gcc to have it warn on these.

Copy link
Author

Choose a reason for hiding this comment

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

C style comments less then 5lines - disturbing me, especialy if it goes in a distance of 1-10lines of code

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.

3 participants