Changeset 548c123 in mainline for uspace/drv/bus/usb/xhci/commands.h


Ignore:
Timestamp:
2017-09-29T21:46:08Z (7 years ago)
Author:
Ondřej Hlavatý <aearsis@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
cc9ac7c
Parents:
ab5a0830
Message:

xhci commands: embed TRB into the command structure

Previously, a pointer into the TRB ring itself was contained. That could cause
problems, because the ring does not care and can move/deallocate segments, or
overwrite TRBs inside. To solve the original issue, xhci_trb_ring_enqueue can
now fill physical address of the TRB enqueued.

Also, this eliminates the need to track ownage of TRB.

File:
1 edited

Legend:

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

    rab5a0830 r548c123  
    3939#include <adt/list.h>
    4040#include <stdbool.h>
     41#include "hw_struct/trb.h"
    4142
    4243typedef struct xhci_hc xhci_hc_t;
    43 typedef struct xhci_trb xhci_trb_t;
    4444typedef struct xhci_input_ctx xhci_input_ctx_t;
    4545
     
    4747        link_t link;
    4848
    49         xhci_trb_t *trb;
     49        xhci_trb_t trb;
     50        uintptr_t trb_phys;
    5051        xhci_input_ctx_t *ictx;
    5152        uint32_t slot_id;
Note: See TracChangeset for help on using the changeset viewer.