diff options
author | hselasky <hselasky@FreeBSD.org> | 2014-05-09 14:23:06 +0000 |
---|---|---|
committer | hselasky <hselasky@FreeBSD.org> | 2014-05-09 14:23:06 +0000 |
commit | d80cbf945b924c2d860c9fc5bce258fdc743435d (patch) | |
tree | 9a45a4339f6b84957e79d00a04af9c247da780b0 /sys/dev/usb/controller/dwc_otgreg.h | |
parent | 7bb91ee94244665217296f17a372ed6937ab25fc (diff) | |
download | FreeBSD-src-d80cbf945b924c2d860c9fc5bce258fdc743435d.zip FreeBSD-src-d80cbf945b924c2d860c9fc5bce258fdc743435d.tar.gz |
Multiple DWC OTG host mode related fixes and improvements:
- Rework how we allocate and free USB host channels, so that we only
allocate a channel if there is a real packet going out on the USB
cable.
- Use BULK type for control data and status, due to instabilities in
the HW it appears.
- Split FIFO TX levels into one for the periodic FIFO and one for the
non-periodic FIFO.
- Use correct HFNUM mask when scheduling host transactions. The HFNUM
register does not count the full 16-bit range.
- Correct START/COMPLETION slot for TT transactions. For INTERRUPT and
ISOCHRONOUS type transactions the hardware always respects the ODDFRM
bit, which means we need to allocate multiple host channels when
processing such endpoints, to not miss any so-called complete split
opportunities.
- When doing ISOCHRONOUS OUT transfers through a TT send all data
payload in a single ALL-burst. This deacreases the likelyhood for
isochronous data underruns.
- Fixed unbalanced unlock in case of "dwc_otg_init_fifo()" failure.
- Increase interrupt priority.
MFC after: 2 weeks
Diffstat (limited to 'sys/dev/usb/controller/dwc_otgreg.h')
-rw-r--r-- | sys/dev/usb/controller/dwc_otgreg.h | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/sys/dev/usb/controller/dwc_otgreg.h b/sys/dev/usb/controller/dwc_otgreg.h index cd2f45d..344d36a 100644 --- a/sys/dev/usb/controller/dwc_otgreg.h +++ b/sys/dev/usb/controller/dwc_otgreg.h @@ -540,7 +540,7 @@ #define HCSPLT_XACTPOS_LAST 1 #define HCSPLT_XACTPOS_BEGIN 2 #define HCSPLT_XACTPOS_ALL 3 -#define HCSPLT_XACTLEN_MAX 188 /* bytes */ +#define HCSPLT_XACTLEN_BURST 1023 /* bytes */ #define HCSPLT_HUBADDR_SHIFT 7 #define HCSPLT_HUBADDR_MASK 0x00003f80 #define HCSPLT_PRTADDR_SHIFT 0 @@ -555,6 +555,9 @@ HCINT_XACTERR | HCINT_NAK | HCINT_ACK | HCINT_NYET | \ HCINT_CHHLTD | HCINT_FRMOVRUN | \ HCINT_DATATGLERR) +#define HCINT_HCH_DONE_MASK \ + (HCINT_ACK | HCINT_RETRY | HCINT_NYET | \ + HCINT_ERRORS | HCINT_STALL | HCINT_SOFTWARE_ONLY) #define HCINT_SOFTWARE_ONLY (1<<20) /* BSD only */ #define HCINT_DATATGLERR (1<<10) |