Changeset 3a8370c in mainline
- Timestamp:
- 2011-09-13T13:30:28Z (13 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 7eb32a8
- Parents:
- 4cbb6e4
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/lib/drv/generic/remote_usbhc.c
r4cbb6e4 r3a8370c 393 393 assert(usb_iface != NULL); 394 394 395 if (!usb_iface-> control_write) {395 if (!usb_iface->write) { 396 396 async_answer_0(callid, ENOTSUP); 397 397 return; … … 434 434 return; 435 435 } 436 trans->setup_packet = setup_packet;437 436 trans->buffer = data_buffer; 438 437 trans->size = data_buffer_len; 439 438 440 rc = usb_iface->control_write(fun, target, 441 setup_packet, setup_packet_len, 442 data_buffer, data_buffer_len, 443 callback_out, trans); 439 assert(setup_packet_len == 8); 440 uint64_t setup_buffer; 441 memcpy(&setup_buffer, setup_packet, 8); 442 free(setup_packet); 443 rc = usb_iface->write(fun, target, setup_buffer, trans->buffer, 444 trans->size, callback_out, trans); 444 445 445 446 if (rc != EOK) { … … 456 457 assert(usb_iface != NULL); 457 458 458 if (!usb_iface-> control_read) {459 if (!usb_iface->read) { 459 460 async_answer_0(callid, ENOTSUP); 460 461 return; … … 494 495 } 495 496 trans->data_caller = data_callid; 496 trans->setup_packet = setup_packet;497 497 trans->size = data_len; 498 498 trans->buffer = malloc(data_len); … … 504 504 } 505 505 506 rc = usb_iface->control_read(fun, target, 507 setup_packet, setup_packet_len, 508 trans->buffer, trans->size, 509 callback_in, trans); 510 506 assert(setup_packet_len == 8); 507 uint64_t setup_buffer; 508 memcpy(&setup_buffer, setup_packet, 8); 509 free(setup_packet); 510 rc = usb_iface->read(fun, target, setup_buffer, trans->buffer, 511 trans->size, callback_in, trans); 511 512 if (rc != EOK) { 512 513 async_answer_0(data_callid, rc);
Note:
See TracChangeset
for help on using the changeset viewer.