Changeset 1d758fc in mainline for uspace/drv/bus/usb/xhci/hc.c


Ignore:
Timestamp:
2018-02-12T10:11:47Z (6 years ago)
Author:
Ondřej Hlavatý <aearsis@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
5fe3f954
Parents:
2f762a7
git-author:
Ondřej Hlavatý <aearsis@…> (2018-02-05 03:28:50)
git-committer:
Ondřej Hlavatý <aearsis@…> (2018-02-12 10:11:47)
Message:

usb: rethinking DMA buffers

File:
1 edited

Legend:

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

    r2f762a7 r1d758fc  
    476476                return ETIMEOUT;
    477477
    478         XHCI_REG_WR(hc->op_regs, XHCI_OP_DCBAAP, hc->dcbaa_dma.phys);
     478        uintptr_t dcbaa_phys = dma_buffer_phys_base(&hc->dcbaa_dma);
     479        XHCI_REG_WR(hc->op_regs, XHCI_OP_DCBAAP, dcbaa_phys);
    479480        XHCI_REG_WR(hc->op_regs, XHCI_OP_MAX_SLOTS_EN, hc->max_slots);
    480481
     
    490491        XHCI_REG_WR(intr0, XHCI_INTR_ERSTSZ, hc->event_ring.segment_count);
    491492        XHCI_REG_WR(intr0, XHCI_INTR_ERDP, hc->event_ring.dequeue_ptr);
    492         XHCI_REG_WR(intr0, XHCI_INTR_ERSTBA, hc->event_ring.erst.phys);
     493
     494        const uintptr_t erstba_phys = dma_buffer_phys_base(&hc->event_ring.erst);
     495        XHCI_REG_WR(intr0, XHCI_INTR_ERSTBA, erstba_phys);
    493496
    494497        if (hc->base.irq_cap > 0) {
     
    799802        if (err == EOK) {
    800803                dev->slot_id = cmd.slot_id;
    801                 hc->dcbaa[dev->slot_id] = host2xhci(64, dev->dev_ctx.phys);
     804                hc->dcbaa[dev->slot_id] =
     805                    host2xhci(64, dma_buffer_phys_base(&dev->dev_ctx));
    802806        }
    803807
Note: See TracChangeset for help on using the changeset viewer.