History log of /fuchsia/zircon/system/dev/usb/xhci/xdc-transfer.h
Revision Date Author Comments
# 1061b812 18-Jun-2018 Jocelyn Dang <jocelyndang@google.com>

[dev][xdc] Send host msg if stream goes on/offline.

When a xdc instance registers a stream id, we send a msg to the host
to let it know it can start writing to that stream id (transfers
to non registered stream ids are dropped).

The opposite happens when we close an instance.

Change-Id: If0cd1d62c724219c345c2298beea42173c0b84a0


# 2122d730 01-Jun-2018 Jocelyn Dang <jocelyndang@google.com>

[dev][xdc] Add xdc_poll_state struct, which the poll thread uses
to track whether the debug capability registers have changed,
and to store completed requests.

The poll thread acquires the main xdc lock only when necessary,
such as changes in configuration state / halted EPs
(not expected to happen often), or when requests complete.

The POLL_INTERVAL delay was making transfers too slow, but acquiring
the xdc->lock constantly was causing high lock contention.

Change-Id: I90f771f2040c08298e92a2f2e6c963c1db0ff1e3


# 45f4bb62 10-May-2018 Jocelyn Dang <jocelyndang@google.com>

[dev][xdc] Allow larger write requests.

Allocate a new usb request if we don't have any matching ones in the
pool.

We now set the device as writable if there are free trbs left on the
transfer ring, rather than if we have usb requests left.

Change-Id: I4e5902445a40e206c132feca5f324337cf7a8fe4


# a7b32a67 07-May-2018 Jocelyn Dang <jocelyndang@google.com>

[dev][xdc] Handle event ring transfer events.

If we get an error, we set the transfer ring as halted (if not already),
and try to requeue and restart the transfers.

Also renamed xdc_update_configuration_state_locked to xdc_update_state_locked.
It also calls xdc_handle_events now, as this may change an EP's state,
and we need to do this before queueing a new transfer.

Change-Id: I4bec4e8af054bed05a2f4e261d7a7d88693987b0


# 8aa3f559 04-May-2018 Jocelyn Dang <jocelyndang@google.com>

[dev][xdc] Replace configured_mutex and EP locks with a single lock.

We will need to process the event ring before queueing
new transfers. Since the event ring has both events
for the IN and OUT EPS, we would need to acquire
all three locks anyway.

This is as we may miss the halt register for the IN / OUT
EP being set if it is cleared before our poll loop gets to it,
so we should check the event ring to see if there were any TRBs
that had an error code which indicates a halt occurred.

Change-Id: I777a6c25bd45f870470e65dbf2738c9b005978b5


# 7cb969a7 01-May-2018 Jocelyn Dang <jocelyndang@google.com>

[dev][xdc] Function for transitioning xdc transfer ring from stopped to
running.

Change-Id: Ic6c0b457d58cee7c68414bca0dc47373a99dc24b


# b7d3b861 19-Apr-2018 Jocelyn Dang <jocelyndang@google.com>

[dev][xdc] Adds xdc_queue_transfer.

Actual usage and handling of transfer events in future CL.

Change-Id: I23a412217a1efd2e0550684802fbd5e07488914e