Changeset decfc8d1 in mainline for uspace/drv/bus/usb/xhci/rh.c


Ignore:
Timestamp:
2017-08-20T18:52:03Z (7 years ago)
Author:
Jaroslav Jindrak <dzejrou@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
3d8a3bd
Parents:
8b415cc
Message:

Dcbaa_virt now contains the virtual device contexts instead of just containing pointers to them, this eases its use a lot while wasting a negligale amount of memory.

File:
1 edited

Legend:

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

    r8b415cc rdecfc8d1  
    126126
    127127        hc->dcbaa[slot_id] = addr_to_phys(dctx);
    128         hc->dcbaa_virt[slot_id]->dev_ctx = dctx;
     128
     129        memset(&hc->dcbaa_virt[slot_id], 0, sizeof(xhci_virt_device_ctx_t));
     130        hc->dcbaa_virt[slot_id].dev_ctx = dctx;
    129131
    130132        cmd = xhci_alloc_command();
     
    145147                free32(dctx);
    146148                hc->dcbaa[slot_id] = 0;
    147                 hc->dcbaa_virt[slot_id] = NULL;
     149                memset(&hc->dcbaa_virt[slot_id], 0, sizeof(xhci_virt_device_ctx_t));
    148150        }
    149151err_ring:
Note: See TracChangeset for help on using the changeset viewer.