Changeset 1a93bb0 in mainline for uspace/drv/uhci-hcd/iface.c
- Timestamp:
- 2011-02-25T23:27:26Z (14 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- c3ae877
- Parents:
- 5f183dc
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/drv/uhci-hcd/iface.c
r5f183dc r1a93bb0 41 41 #include "iface.h" 42 42 #include "uhci.h" 43 44 #define DEFAULT_SPEED FULL_SPEED 43 #include "utils/device_keeper.h" 45 44 46 45 /*----------------------------------------------------------------------------*/ … … 50 49 uhci_t *hc = fun_to_uhci(fun); 51 50 assert(hc); 52 usb_address_keeping_reserve_default(&hc->address_manager); 51 usb_log_debug("Default address request with speed %d.\n", speed); 52 device_keeper_reserve_default(&hc->device_manager, speed); 53 53 return EOK; 54 54 } … … 59 59 uhci_t *hc = fun_to_uhci(fun); 60 60 assert(hc); 61 usb_address_keeping_release_default(&hc->address_manager); 61 usb_log_debug("Default address release.\n"); 62 device_keeper_release_default(&hc->device_manager); 62 63 return EOK; 63 64 } … … 69 70 uhci_t *hc = fun_to_uhci(fun); 70 71 assert(hc); 71 *address = usb_address_keeping_request(&hc->address_manager); 72 assert(address); 73 74 usb_log_debug("Address request with speed %d.\n", speed); 75 *address = device_keeper_request(&hc->device_manager, speed); 76 usb_log_debug("Address request with result: %d.\n", *address); 72 77 if (*address <= 0) 73 78 return *address; … … 81 86 uhci_t *hc = fun_to_uhci(fun); 82 87 assert(hc); 83 usb_address_keeping_devman_bind(&hc->address_manager, address, handle); 88 usb_log_debug("Address bind %d-%d.\n", address, handle); 89 device_keeper_bind(&hc->device_manager, address, handle); 84 90 return EOK; 85 91 } … … 90 96 uhci_t *hc = fun_to_uhci(fun); 91 97 assert(hc); 92 usb_address_keeping_release_default(&hc->address_manager); 98 usb_log_debug("Address release %d.\n", address); 99 device_keeper_release(&hc->device_manager, address); 93 100 return EOK; 94 101 } 95 102 /*----------------------------------------------------------------------------*/ 96 103 static int interrupt_out(ddf_fun_t *fun, usb_target_t target, 97 size_t max_packet_size, 98 void *data, size_t size, 104 size_t max_packet_size, void *data, size_t size, 99 105 usbhc_iface_transfer_out_callback_t callback, void *arg) 100 106 { 101 dev_speed_t speed = DEFAULT_SPEED; 107 assert(fun); 108 uhci_t *hc = fun_to_uhci(fun); 109 assert(hc); 110 usb_speed_t speed = device_keeper_speed(&hc->device_manager, target.address); 102 111 103 112 batch_t *batch = batch_get(fun, target, USB_TRANSFER_INTERRUPT, … … 114 123 usbhc_iface_transfer_in_callback_t callback, void *arg) 115 124 { 116 dev_speed_t speed = DEFAULT_SPEED; 125 assert(fun); 126 uhci_t *hc = fun_to_uhci(fun); 127 assert(hc); 128 usb_speed_t speed = device_keeper_speed(&hc->device_manager, target.address); 117 129 118 130 batch_t *batch = batch_get(fun, target, USB_TRANSFER_INTERRUPT, … … 129 141 usbhc_iface_transfer_out_callback_t callback, void *arg) 130 142 { 131 dev_speed_t speed = DEFAULT_SPEED; 143 assert(fun); 144 uhci_t *hc = fun_to_uhci(fun); 145 assert(hc); 146 usb_speed_t speed = device_keeper_speed(&hc->device_manager, target.address); 132 147 133 148 batch_t *batch = batch_get(fun, target, USB_TRANSFER_CONTROL, … … 145 160 usbhc_iface_transfer_in_callback_t callback, void *arg) 146 161 { 147 dev_speed_t speed = DEFAULT_SPEED; 162 assert(fun); 163 uhci_t *hc = fun_to_uhci(fun); 164 assert(hc); 165 usb_speed_t speed = device_keeper_speed(&hc->device_manager, target.address); 148 166 149 167 batch_t *batch = batch_get(fun, target, USB_TRANSFER_CONTROL,
Note:
See TracChangeset
for help on using the changeset viewer.