Changeset b7db009 in mainline
- Timestamp:
- 2017-10-15T21:35:13Z (7 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 3afcf68
- Parents:
- 9b2f69e
- Location:
- uspace/drv/bus/usb/xhci
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/drv/bus/usb/xhci/endpoint.c
r9b2f69e rb7db009 34 34 */ 35 35 36 #include <usb/host/utils/malloc32.h> 36 37 #include <usb/host/endpoint.h> 37 38 #include <usb/descriptor.h> … … 84 85 /* 0 is slot ctx, 1 is EP0, then it's EP1 out, in, EP2 out, in, etc. */ 85 86 86 uint8_t off = 2 + 2 * (ep->base.target.endpoint - 1);87 if (ep->base.direction == USB_DIRECTION_IN )87 uint8_t off = 2 * (ep->base.target.endpoint); 88 if (ep->base.direction == USB_DIRECTION_IN || ep->base.target.endpoint == 0) 88 89 ++off; 89 90 … … 197 198 198 199 // Prepare input context. 199 ictx = malloc (sizeof(xhci_input_ctx_t));200 ictx = malloc32(sizeof(xhci_input_ctx_t)); 200 201 if (!ictx) { 201 202 return ENOMEM; … … 226 227 switch (ep->base.transfer_type) { 227 228 case USB_TRANSFER_CONTROL: 228 setup_control_ep_ctx(ep, &ictx->endpoint_ctx[ep_offset ], ep_ring);229 setup_control_ep_ctx(ep, &ictx->endpoint_ctx[ep_offset - 1], ep_ring); 229 230 break; 230 231 231 232 case USB_TRANSFER_BULK: 232 setup_bulk_ep_ctx(ep, &ictx->endpoint_ctx[ep_offset ], ep_ring, &ss_desc);233 setup_bulk_ep_ctx(ep, &ictx->endpoint_ctx[ep_offset - 1], ep_ring, &ss_desc); 233 234 break; 234 235 235 236 case USB_TRANSFER_ISOCHRONOUS: 236 setup_isoch_ep_ctx(ep, &ictx->endpoint_ctx[ep_offset ], ep_ring, &ss_desc);237 setup_isoch_ep_ctx(ep, &ictx->endpoint_ctx[ep_offset - 1], ep_ring, &ss_desc); 237 238 break; 238 239 239 240 case USB_TRANSFER_INTERRUPT: 240 setup_interrupt_ep_ctx(ep, &ictx->endpoint_ctx[ep_offset ], ep_ring, &ss_desc);241 setup_interrupt_ep_ctx(ep, &ictx->endpoint_ctx[ep_offset - 1], ep_ring, &ss_desc); 241 242 break; 242 243 -
uspace/drv/bus/usb/xhci/transfers.c
r9b2f69e rb7db009 306 306 int xhci_schedule_interrupt_transfer(xhci_hc_t* hc, usb_transfer_batch_t* batch) 307 307 { 308 /* FIXME: Removing the next 2 rows causes QEMU to crash lol */309 usb_log_warning("Interrupt transfers not yet implemented!");310 return ENOTSUP;311 312 308 if (batch->setup_size) { 313 309 usb_log_warning("Setup packet present for a interrupt transfer.");
Note:
See TracChangeset
for help on using the changeset viewer.