Changeset d7869d7e in mainline for uspace/drv/bus/usb/xhci/transfers.c
- Timestamp:
- 2017-10-14T17:21:26Z (6 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 867b375
- Parents:
- 2297fab
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/drv/bus/usb/xhci/transfers.c
r2297fab rd7869d7e 103 103 } 104 104 105 static inline bool configure_endpoint_needed(usb_device_request_setup_packet_t *setup) 106 { 107 usb_request_type_t request_type = SETUP_REQUEST_TYPE_GET_TYPE(setup->request_type); 108 109 if (request_type == USB_REQUEST_TYPE_STANDARD) { 110 usb_stddevreq_t request = setup->request; 111 112 switch (request) { 113 case USB_DEVREQ_SET_CONFIGURATION: 114 case USB_DEVREQ_SET_INTERFACE: 115 return true; 116 117 default: 118 return false; 119 } 120 } 121 122 return false; 123 } 124 105 125 int xhci_init_transfers(xhci_hc_t *hc) 106 126 { … … 225 245 226 246 /* For control transfers, the target is always 1. */ 247 // FIXME: ignoring return code 227 248 hc_ring_doorbell(hc, slot_id, 1); 249 250 // Issue a Configure Endpoint command, if needed. 251 if (configure_endpoint_needed(setup)) { 252 // TODO: figure out the best time to issue this command 253 // FIXME: ignoring return code 254 xhci_device_configure(xhci_ep->device, hc); 255 } 256 228 257 return EOK; 229 258 }
Note:
See TracChangeset
for help on using the changeset viewer.