Changeset 5fd9c30 in mainline for uspace/drv/bus/usb/uhci/hc.c
- Timestamp:
- 2017-10-21T20:52:56Z (8 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 766043c
- Parents:
- 74b852b
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/drv/bus/usb/uhci/hc.c
r74b852b r5fd9c30 177 177 uhci_transfer_batch_t *batch = 178 178 uhci_transfer_batch_from_link(current); 179 u hci_transfer_batch_finish_dispose(batch);179 usb_transfer_batch_finish(&batch->base); 180 180 } 181 181 } … … 309 309 } 310 310 311 static usb_transfer_batch_t *create_transfer_batch(bus_t *bus, endpoint_t *ep) 312 { 313 uhci_transfer_batch_t *batch = uhci_transfer_batch_create(ep); 314 return &batch->base; 315 } 316 317 static void destroy_transfer_batch(usb_transfer_batch_t *batch) 318 { 319 uhci_transfer_batch_destroy(uhci_transfer_batch_get(batch)); 320 } 321 311 322 /** Initialize UHCI hc memory structures. 312 323 * … … 326 337 if ((err = usb2_bus_init(&instance->bus, BANDWIDTH_AVAILABLE_USB11, bandwidth_count_usb11))) 327 338 return err; 339 340 instance->bus.base.ops.create_batch = create_transfer_batch; 341 instance->bus.base.ops.destroy_batch = destroy_transfer_batch; 328 342 329 343 /* Init USB frame list page */ … … 450 464 return uhci_rh_schedule(&instance->rh, batch); 451 465 452 uhci_transfer_batch_t *uhci_batch = uhci_transfer_batch_get(batch);466 uhci_transfer_batch_t *uhci_batch = (uhci_transfer_batch_t *) batch; 453 467 if (!uhci_batch) { 454 468 usb_log_error("Failed to create UHCI transfer structures.\n"); 455 469 return ENOMEM; 456 470 } 471 472 const int err = uhci_transfer_batch_prepare(uhci_batch); 473 if (err) 474 return err; 457 475 458 476 transfer_list_t *list =
Note:
See TracChangeset
for help on using the changeset viewer.