Changeset 9620a54 in mainline for uspace/drv/bus/usb/xhci/transfers.c


Ignore:
Timestamp:
2017-10-29T10:51:59Z (8 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/transfers.c

    r62f8025 r9620a54  
    265265        xhci_device_t *dev = hc->bus.devices_by_slot[slot_id];
    266266        if (!dev) {
    267                 usb_log_error("Transfer event on unknown device slot %u!", slot_id);
     267                usb_log_error("Transfer event on disabled slot %u", slot_id);
    268268                return ENOENT;
    269269        }
     
    272272        xhci_endpoint_t *ep = xhci_device_get_endpoint(dev, ep_num);
    273273        if (!ep) {
    274                 usb_log_error("Transfer event on unknown endpoint num %u, device slot %u!", ep_num, slot_id);
     274                usb_log_error("Transfer event on dropped endpoint %u of device "
     275                    XHCI_DEV_FMT, ep_num, XHCI_DEV_ARGS(*dev));
    275276                return ENOENT;
    276277        }
     
    322323        // FIXME: find a better way to check if the ring is not initialized
    323324        if (!xhci_ep->ring.segment_count) {
    324                 usb_log_error("Ring not initialized for endpoint num %u!", xhci_ep->base.endpoint);
     325                usb_log_error("Ring not initialized for endpoint " XHCI_EP_FMT,
     326                    XHCI_EP_ARGS(*xhci_ep));
    325327                return EINVAL;
    326328        }
Note: See TracChangeset for help on using the changeset viewer.