Changes in uspace/drv/bus/usb/ohci/hc.c [8d2dd7f2:a5b3de6] in mainline
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/drv/bus/usb/ohci/hc.c
r8d2dd7f2 ra5b3de6 47 47 #include <usb/usb.h> 48 48 49 #include "ohci_ endpoint.h"49 #include "ohci_bus.h" 50 50 #include "ohci_batch.h" 51 51 … … 89 89 }; 90 90 91 static void hc_gain_control(hc_t *instance);92 static void hc_start(hc_t *instance);93 91 static int hc_init_transfer_lists(hc_t *instance); 94 92 static int hc_init_memory(hc_t *instance); … … 103 101 * @return Error code. 104 102 */ 105 int ohci_hc_gen_irq_code(irq_code_t *code, const hw_res_list_parsed_t *hw_res)103 int ohci_hc_gen_irq_code(irq_code_t *code, hcd_t *hcd, const hw_res_list_parsed_t *hw_res) 106 104 { 107 105 assert(code); … … 151 149 * @return Error code 152 150 */ 153 int hc_init(hc_t *instance, const hw_res_list_parsed_t *hw_res , bool interrupts)151 int hc_init(hc_t *instance, const hw_res_list_parsed_t *hw_res) 154 152 { 155 153 assert(instance); … … 172 170 list_initialize(&instance->pending_batches); 173 171 fibril_mutex_initialize(&instance->guard); 174 instance->hw_interrupts = interrupts;175 172 176 173 ret = hc_init_memory(instance); … … 181 178 return ret; 182 179 } 183 184 hc_gain_control(instance);185 186 ohci_rh_init(&instance->rh, instance->registers, "ohci rh");187 hc_start(instance);188 180 189 181 return EOK; … … 295 287 296 288 /* Check for root hub communication */ 297 if (batch-> ep->address == ohci_rh_get_address(&instance->rh)) {289 if (batch->target.address == ohci_rh_get_address(&instance->rh)) { 298 290 usb_log_debug("OHCI root hub request.\n"); 299 291 return ohci_rh_schedule(&instance->rh, batch); … … 302 294 if (!ohci_batch) 303 295 return ENOMEM; 296 297 const int err = ohci_transfer_batch_prepare(ohci_batch); 298 if (err) 299 return err; 304 300 305 301 fibril_mutex_lock(&instance->guard); … … 354 350 ohci_transfer_batch_from_link(current); 355 351 356 if (ohci_transfer_batch_ is_complete(batch)) {352 if (ohci_transfer_batch_check_completed(batch)) { 357 353 list_remove(current); 358 ohci_transfer_batch_finish_dispose(batch);354 usb_transfer_batch_finish(&batch->base); 359 355 } 360 356 … … 443 439 void hc_start(hc_t *instance) 444 440 { 441 ohci_rh_init(&instance->rh, instance->registers, "ohci rh"); 442 445 443 /* OHCI guide page 42 */ 446 444 assert(instance);
Note:
See TracChangeset
for help on using the changeset viewer.