summaryrefslogtreecommitdiff
path: root/usb
diff options
context:
space:
mode:
authorVegard Storheil Eriksen <zyp@jvnv.net>2012-10-08 17:52:42 +0200
committerVegard Storheil Eriksen <zyp@jvnv.net>2012-10-08 17:52:42 +0200
commitfca86554077f380c639409331c10a3dd4680d8a9 (patch)
tree5ed329761a510f040d94a2f257d3dd509f79cd79 /usb
parente31ddf951f6dfc052e3387f5c52e671ff14115f0 (diff)
Only use odd/even filtering workaround for isochronous endpoints.
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;