Changeset a0be5d0 in mainline for uspace/drv/bus/usb/xhci/transfers.c
- Timestamp:
- 2017-10-09T14:11:22Z (6 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 42bc933
- Parents:
- ae03552e
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/drv/bus/usb/xhci/transfers.c
rae03552e ra0be5d0 41 41 #include "trb_ring.h" 42 42 43 static inline int ring_doorbell(xhci_hc_t *hc, unsigned doorbell, unsigned target)44 {45 assert(hc);46 uint32_t v = host2xhci(32, target & BIT_RRANGE(uint32_t, 7));47 pio_write_32(&hc->db_arry[doorbell], v);48 return EOK;49 }50 51 43 static inline uint8_t get_transfer_type(xhci_trb_t* trb, uint8_t bmRequestType, uint16_t wLength) 52 44 { … … 143 135 { 144 136 if (!batch->setup_size) { 137 usb_log_error("Missing setup packet for the control transfer."); 145 138 return EINVAL; 146 139 } 147 140 if (batch->ep->endpoint != 0 || batch->ep->transfer_type != USB_TRANSFER_CONTROL) { 148 141 /* This method only works for control transfers. */ 142 usb_log_error("Attempted to schedule control transfer to non 0 endpoint."); 149 143 return EINVAL; 150 144 } … … 223 217 224 218 /* For control transfers, the target is always 1. */ 225 ring_doorbell(hc, slot_id, 1);219 hc_ring_doorbell(hc, slot_id, 1); 226 220 return EOK; 227 221 }
Note:
See TracChangeset
for help on using the changeset viewer.