Changeset 77733a9 in mainline for uspace/lib/usbdev/src/pipes.c
- Timestamp:
- 2018-01-27T13:35:46Z (7 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 80f7c54
- Parents:
- a94cbfa
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/lib/usbdev/src/pipes.c
ra94cbfa r77733a9 190 190 } 191 191 192 async_exch_t *exch; 193 if (pipe->desc.transfer_type == USB_TRANSFER_ISOCHRONOUS) 194 exch = async_exchange_begin(pipe->isoch_session); 195 else 196 exch = async_exchange_begin(pipe->bus_session); 192 async_exch_t *exch = async_exchange_begin(pipe->bus_session); 197 193 size_t act_size = 0; 198 194 const int rc = … … 230 226 } 231 227 232 async_exch_t *exch; 233 if (pipe->desc.transfer_type == USB_TRANSFER_ISOCHRONOUS) 234 exch = async_exchange_begin(pipe->isoch_session); 235 else 236 exch = async_exchange_begin(pipe->bus_session); 237 228 async_exch_t *exch = async_exchange_begin(pipe->bus_session); 238 229 const int rc = usbhc_write(exch, pipe->desc.endpoint_no, 0, buffer, size); 239 230 async_exchange_end(exch); 240 231 return rc; 241 }242 243 /** Setup isochronous session for isochronous communication.244 * Isochronous endpoints need a different session as they might block while waiting for data.245 *246 * @param pipe Endpoint pipe being initialized.247 * @return Error code.248 */249 static int usb_isoch_session_initialize(usb_pipe_t *pipe) {250 251 /*252 * XXX: As parallel exhanges are implemented by using parallel sessions,253 * it is safe to just take the same session. Once this won't be true,254 * just use session cloning to clone the bus session.255 */256 pipe->isoch_session = pipe->bus_session;257 return EOK;258 232 } 259 233 … … 270 244 pipe->auto_reset_halt = false; 271 245 pipe->bus_session = bus_session; 272 273 if (transfer_type == USB_TRANSFER_ISOCHRONOUS)274 return usb_isoch_session_initialize(pipe);275 246 276 247 return EOK;
Note:
See TracChangeset
for help on using the changeset viewer.