Fork us on GitHub Follow us on Facebook Follow us on Twitter

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


Ignore:
Timestamp:
2017-10-09T14:11:22Z (4 years ago)
Author:
Michal Staruch <salmelu@…>
Branches:
lfn, master
Children:
42bc933
Parents:
ae03552e
Message:

Moved ring_doorbell, added address check

File:
1 edited

Legend:

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

    rae03552e ra0be5d0  
    457457                batch->buffer_size);
    458458
     459        if (!batch->ep->address) {
     460                usb_log_error("Attempted to schedule transfer to address 0.");
     461                return EINVAL;
     462        }
     463
    459464        switch (batch->ep->transfer_type) {
    460465        case USB_TRANSFER_CONTROL:
     
    616621}
    617622
    618 
     623int hc_ring_doorbell(xhci_hc_t *hc, unsigned doorbell, unsigned target)
     624{
     625        assert(hc);
     626        uint32_t v = host2xhci(32, target & BIT_RRANGE(uint32_t, 7));
     627        pio_write_32(&hc->db_arry[doorbell], v);
     628        return EOK;
     629}
    619630
    620631/**
Note: See TracChangeset for help on using the changeset viewer.