From fca86554077f380c639409331c10a3dd4680d8a9 Mon Sep 17 00:00:00 2001 From: Vegard Storheil Eriksen Date: Mon, 8 Oct 2012 17:52:42 +0200 Subject: Only use odd/even filtering workaround for isochronous endpoints. --- usb/dwc_otg.h | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) (limited to 'usb') 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; -- cgit v1.2.3