History: usbh_drv_ehci


This page describes all changes made to the usbh_drv_ehci package, USB EHCI Host Controller, since its release.

Version

3.19 (2019-12-03, 14:58):

  • Static analysis issues eliminated.

3.18 (2019-10-18, 15:28):

  • Static analysis issues eliminated.

3.17 (2019-09-13, 12:00):

  • C++ compiler errors eliminated.

3.16 (2018-08-27, 16:30):

  • Static analysis issues eliminated.

3.15 (2018-10-12, 16:51):

  • Can now handle unlimited device INTERRUPT endpoints  (that is, <= EHCI_MAX_EP) with either the same polling interval (if >=4ms) or a polling interval of <4ms. Preceding versions had a limitation determined by the endpoints' polling interval and EHCI_PERIODIC_LIST_SIZE.

3.14r2 (2018-08-29, 18:15):

  • Document HTML link added to the documentation folder.
  • History and document files renamed to the package name.

3.14 (2017-10-10, 15:46):

  • Compiler warnings removed.

3.13 (2017-09-25, 16:37):

  • Module interrupt is only enabled after initializing its service routine. This ensures correct operation in case interrupt is enabled in advance by another module (e.g. because EHCI interrupt is shared with OHCI interrupt).

3.12:

  • Refactoring to comply with coding standard rules.

3.11:

  • Static analyzer warning was eliminated (CodeSonar).

3.10:

  • Compiler warnings were eliminated.

3.9r3:

  • PSP membar moved to a separate package.

3.9:

  • Some transfers could report incorrect transfer size on certain processors where the last transfer descriptor overlay area could not be DMA-d back to the transfer descriptor from the queue head.

3.8:

  • psp_types.h used instead of stdint.h and stddef.h.

3.7:

  • Support for test mode introduced.

3.6:

  • timed out periodic transfers could stop the system if there was no active asynchronous transfer.

3.5:

  • stop period/asynchronous list execution when a transfer is stopped, otherwise a transfer could sometimes remain active.

3.4:

  • psp_membar() calls added to the required places.

3.3:

  • mutex get/put error code check removed
  • mutex is locked in delete before the task is removed and unlocked before mutex is destroyed to eliminate possible problem with some OS-es where mutex needs to be unlocked before destroying.
  • mutex released from del_daddr() before transfer_end() is called to avoid possible deadlock.

3.2:

  • ehci_del_daddr() can remove transfers on device 0/endpoint 0.

3.1:

  • ehci_hw_connect() and ehci_hw_disconnect() functions introduced to be able to take Hardware-specific actions in case it is required.
  • ehci_hw.h header file moved to EHCI driver directory.

2.21:

  • warnings removed.

2.20:

  • If EHCI_MAX_SCHEDULE_IDLE_TIME was set then mutex was not locked and unlocked when the schedules had to be disabled from transfer task. As a consequence it could happen that the schedule was disabled immediately after it was enabled from a transfer start, causing the started transfer to never complete.

2.19:

  • If a transfer required more than 1 transfer descriptor and at least 1 descriptor was available but the system ran out of descriptors the transfer was never finished (no interrupt was generated).

2.18:

  • Transfer's completed size was incorrectly updated in case of error.
  • Remote wakeup handling added.

2.17:

  • EHCI_MAX_SCHEDULE_IDLE_TIME introduced in config_usbh_ehci.h.

2.16:

  • ASYNC and PERIODIC scheduling is stopped if there is nothing to do; this way DMA load can be significantly decreased in idle time.
  • ISO transfers could stop working in case the system couldn't schedule ehci_transfer_task quick enough.

2.15:

  • Changed EHCI_RENDIAN to EHCI_REG_RENDIAN and EHCI_DATA_RENDIAN. Required because we found a platform where the registers needs to be reversed and data (QH, QTD, etc.) can stay in the processor's endianness (PPC5121).
  • Incorrect transfers could occur if with cache enabled hcc_mem module lock function returned smaller area than the endpoint packet size while the requested transfer size was greater or equal to the EP size.

2.14:

  • Added uint32_t typecast to some expressions in ehci_reg.h to avoid warnings.

2.13:

  • bugfix: reset sequence was executed for HS/FS/LS devices, if companion controller is present ownership for LS devices should immediately be changed (without reset).

2.12:

  • >20KB transfers can be started for an endpoint.
  • Memory is not unlocked for address 0 anymore.

2.11:

  • report USBH_SHORTPACKET on ISO IN channel if read less data than requested.
  • under certain circumstances if data cache was enabled the system could hang ( tried to unlock memory even if lock returned the same address).
  • Added the ability to set EHCI_MAX_ISO_EP and EHCI_MAS_SISO_LEVEL to 0.

2.10:

  • usbh_ehci_hc() defined as extern void * const to be consistent with the definition.

2.9:

  • Full/low speed devices were not supported on the root hub port 2+.

2.8

  • Check function prototypes by including its header file.

2.7:

  • 10 ms delay added to ehci_hub_start() to have a delay before powering on the port (switched off from ehci_hub_init()).

2.6:

  • bugfix: invalid transfer sizes were used when default size used on an endpoint with not power of 2 packet size.
  • bugfix: with HCC_MEM_ALLOW_DATA_CACHE bad transfer size was used if hcc_mem_lock() returned smaller size than the requested transfer size and not multiple of endpoint packet size. In this case erroneous transfers could occur.
  • bugfix: TRANSFER FULL was reported in a wrong way, if the transfer couldn't be started then it returned transfer error, causing transfers to report error instead of being processed by the common layer via pending transfers
  • bugfix: if data cache is allowed IN transfers unlocked the buffer twice causing incorrect operation in the memory manager when the load was big.
  • bugfix: lots of parallel transfers could hang the system because QTD was assigned even if the transfer couldn't be started due to lack of buffers when data cache is allowed.

2.5:

  • OAL resource initialization changed. It will free resources from init in case of failure.

2.4:

  • moved ehci_hub_start() after ehci_isr_enable(), to avoid missing interrupts on systems that can't handle an active interrupt when enabled. This could lead to unrecognized device attached at startup.

2.3:

  • hcc_mem_unlock() will be always called if hcc_mem_lock() was executed. This way, if lock can flush the cache then the buffer will be invalidated as well when the transfer is finished.

2.2:

  • in ehci_get_ep_inf dir is initialized with USBH_DIR_ANY to avoid uninitialized warning
  • host controller reset removed from ehci_start, for microcontrollers where EHCI and ARC device are mapped to the same registers (OTG) reset will put the module back to the default device state.
  • ep_hub_inf structure added before ehci_add_ep() in ehci_start() function to avoid passing NULL pointer to ehci_add_ep().

2.1

  • Added hcc_mem_phy_addr and hcc_mem_uncached to obtain the correct memory address for a transfer. This is required if virtual addresses are used in the system. For example if the same RAM region is mapped to a virtual uncached address then, before being able to DMA to/from that area, the address needs to be converted to a physical address.