summaryrefslogtreecommitdiff
path: root/usb
diff options
context:
space:
mode:
Diffstat (limited to 'usb')
-rw-r--r--usb/dwc_otg.h14
1 files changed, 10 insertions, 4 deletions
diff --git a/usb/dwc_otg.h b/usb/dwc_otg.h
index c27a91e..cf4e8d7 100644
--- a/usb/dwc_otg.h
+++ b/usb/dwc_otg.h
@@ -55,11 +55,17 @@ class USB_otg : public USB_generic {
// FIXME: Temporary workaround.
if(type == (0x2 << 17) && ep != 0) {
- if(otg.dev_oep_reg[ep].DOEPCTL & (1 << 16)) {
- otg.dev_oep_reg[ep].DOEPCTL |= (1 << 28) | (1 << 26);
- } else {
- otg.dev_oep_reg[ep].DOEPCTL |= (1 << 29) | (1 << 26);
+ // Odd/even filtering on isochronous endpoints.
+ if((otg.dev_oep_reg[ep].DOEPCTL & (3 << 18)) == (1 << 18)) {
+ if(otg.dev_oep_reg[ep].DOEPCTL & (1 << 16)) {
+ otg.dev_oep_reg[ep].DOEPCTL |= (1 << 28);
+ } else {
+ otg.dev_oep_reg[ep].DOEPCTL |= (1 << 29);
+ }
}
+
+ // Clear NAK.
+ otg.dev_oep_reg[ep].DOEPCTL |= (1 << 26);
}
rxfifo_bytes = 0;