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


Ignore:
Timestamp:
2018-02-12T10:11:47Z (7 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/commands.c

    r2f762a7 r1d758fc  
    470470        xhci_trb_clean(&cmd->_header.trb);
    471471
    472         TRB_SET_ICTX(cmd->_header.trb, cmd->input_ctx.phys);
     472        const uintptr_t phys = dma_buffer_phys_base(&cmd->input_ctx);
     473        TRB_SET_ICTX(cmd->_header.trb, phys);
    473474
    474475        /**
     
    496497                assert(dma_buffer_is_set(&cmd->input_ctx));
    497498
    498                 TRB_SET_ICTX(cmd->_header.trb, cmd->input_ctx.phys);
     499                const uintptr_t phys = dma_buffer_phys_base(&cmd->input_ctx);
     500                TRB_SET_ICTX(cmd->_header.trb, phys);
    499501        }
    500502
     
    520522        xhci_trb_clean(&cmd->_header.trb);
    521523
    522         TRB_SET_ICTX(cmd->_header.trb, cmd->input_ctx.phys);
     524        const uintptr_t phys = dma_buffer_phys_base(&cmd->input_ctx);
     525        TRB_SET_ICTX(cmd->_header.trb, phys);
    523526
    524527        TRB_SET_TYPE(cmd->_header.trb, XHCI_TRB_TYPE_EVALUATE_CONTEXT_CMD);
     
    594597        xhci_trb_clean(&cmd->_header.trb);
    595598
    596         TRB_SET_ICTX(cmd->_header.trb, cmd->bandwidth_ctx.phys);
     599        const uintptr_t phys = dma_buffer_phys_base(&cmd->input_ctx);
     600        TRB_SET_ICTX(cmd->_header.trb, phys);
    597601
    598602        TRB_SET_TYPE(cmd->_header.trb, XHCI_TRB_TYPE_GET_PORT_BANDWIDTH_CMD);
Note: See TracChangeset for help on using the changeset viewer.