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


Ignore:
Timestamp:
2017-10-27T11:39:59Z (7 years ago)
Author:
Michal Staruch <salmelu@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
8b8c164
Parents:
3f6c94ed
Message:

Added a check for trb ring initialization

This could cause weird crashes when streams were used before, it may help debugging later when we start working with streams.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • uspace/drv/bus/usb/xhci/transfers.c

    r3f6c94ed r7010861  
    320320        }
    321321
     322        // FIXME: find a better way to check if the ring is not initialized
     323        if (!xhci_ep->ring.segment_count) {
     324                usb_log_error("Ring not initialized for endpoint num %u!", xhci_ep->base.endpoint);
     325                return EINVAL;
     326        }
     327
    322328        const usb_transfer_type_t type = batch->ep->transfer_type;
    323329        assert(type >= 0 && type < ARRAY_SIZE(transfer_handlers));
     
    328334        }
    329335
     336
    330337        if (batch->dir != USB_DIRECTION_IN) {
    331338                // Sending stuff from host to device, we need to copy the actual data.
Note: See TracChangeset for help on using the changeset viewer.