Changeset a94cbfa in mainline for uspace/drv/bus/usb/ehci/ehci_rh.h


Ignore:
Timestamp:
2018-01-26T00:55:38Z (6 years ago)
Author:
Ondřej Hlavatý <aearsis@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
77733a9
Parents:
047fbc8
git-author:
Ondřej Hlavatý <aearsis@…> (2018-01-26 00:15:17)
git-committer:
Ondřej Hlavatý <aearsis@…> (2018-01-26 00:55:38)
Message:

ehci+ohci: proper handling of unfinished transfer

Because transfers can be aborted, the RH may not store a pointer to
them. Also, it's no longer true that the batch automatically locks the
endpoint, the mechanism must be used explicitly.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • uspace/drv/bus/usb/ehci/ehci_rh.h

    r047fbc8 ra94cbfa  
    6161                uint8_t rempow[STATUS_BYTES(EHCI_MAX_PORTS) * 2];
    6262        } __attribute__((packed)) hub_descriptor;
    63         /** interrupt transfer waiting for an actual interrupt to occur */
    64         usb_transfer_batch_t *unfinished_interrupt_transfer;
    6563        bool reset_flag[EHCI_MAX_PORTS];
    6664        bool resume_flag[EHCI_MAX_PORTS];
     65
     66        /*
     67         * This is sort of hacky, but better than duplicating functionality.
     68         * We cannot simply store a pointer to a transfer in-progress, in order
     69         * to allow it to be aborted. We can however store a reference to the
     70         * Status Change Endpoint. Note that this is mixing two worlds together
     71         * - otherwise, the RH is "a device" and have no clue about HC, apart
     72         * from accessing its registers.
     73         */
     74        endpoint_t *status_change_endpoint;
     75
    6776} ehci_rh_t;
    6877
Note: See TracChangeset for help on using the changeset viewer.