Changeset 9620a54 in mainline for uspace/drv/bus/usb/xhci/endpoint.h


Ignore:
Timestamp:
2017-10-29T10:51:59Z (6 years ago)
Author:
Petr Manek <petr.manek@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
d33dc780
Parents:
62f8025
Message:

Small changes. Temporarily fixed no device problem for endpoint logging. Added similar macro for device logging. Changed log messages to adopt these macros. TRB rings can be freed again. Made ring finalizers noexcept. Upon detach, the entire slot is disabled prior to unregistering endpoints in order to prevent invalid HC commands. Removed active endpoints count from XHCI device. Device context is freed in HC, so DCBAA is not touched from anywhere else.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • uspace/drv/bus/usb/xhci/endpoint.h

    r62f8025 r9620a54  
    9191
    9292#define XHCI_EP_FMT  "(%d:%d %s)"
     93/* FIXME: "Device -1" messes up log messages, figure out a better way. */
    9394#define XHCI_EP_ARGS(ep)                \
    94         ((ep).base.device->address),    \
     95        ((ep).base.device ? (ep).base.device->address : -1),    \
    9596        ((ep).base.endpoint),           \
    9697        (usb_str_transfer_type((ep).base.transfer_type))
     
    114115        xhci_device_ctx_t *dev_ctx;
    115116
    116         /** All endpoints of the device. Inactive ones are NULL */
     117        /** All endpoints of the device. Dropped ones are NULL */
    117118        xhci_endpoint_t *endpoints[XHCI_EP_COUNT];
    118 
    119         /** Number of non-NULL endpoints. Reference count of sorts. */
    120         uint8_t active_endpoint_count;
    121119
    122120        /** Flag indicating whether the device is USB3 (it's USB2 otherwise). */
     
    127125} xhci_device_t;
    128126
     127#define XHCI_DEV_FMT  "(%s, slot %d)"
     128#define XHCI_DEV_ARGS(dev)               ddf_fun_get_name((dev).base.fun), (dev).slot_id
     129
    129130int xhci_endpoint_init(xhci_endpoint_t *, xhci_bus_t *);
    130131void xhci_endpoint_fini(xhci_endpoint_t *);
    131132int xhci_endpoint_alloc_transfer_ds(xhci_endpoint_t *);
    132 int xhci_endpoint_free_transfer_ds(xhci_endpoint_t *);
     133void xhci_endpoint_free_transfer_ds(xhci_endpoint_t *);
    133134
    134135int xhci_endpoint_request_streams(xhci_hc_t *, xhci_device_t *, xhci_endpoint_t *, unsigned);
Note: See TracChangeset for help on using the changeset viewer.