Changeset b375bb8 in mainline for uspace/drv/uhci-hcd/main.c
- Timestamp:
- 2011-03-01T22:58:58Z (14 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 0e2fdcf
- Parents:
- 9ef0d6d
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/drv/uhci-hcd/main.c
r9ef0d6d rb375bb8 50 50 51 51 static int uhci_add_device(ddf_dev_t *device); 52 53 52 /*----------------------------------------------------------------------------*/ 54 53 static driver_ops_t uhci_driver_ops = { … … 99 98 "Failed(%d) disable legacy USB: %s.\n", ret, str_error(ret)); 100 99 101 // ret = pci_enable_interrupts(device); 102 // CHECK_RET_FREE_HC_RETURN(ret, "Failed(%d) to get enable interrupts:\n", ret); 100 #if 0 101 ret = pci_enable_interrupts(device); 102 if (ret != EOK) { 103 usb_log_warning( 104 "Failed(%d) to enable interrupts, fall back to polling.\n", 105 ret); 106 } 107 #endif 103 108 104 109 hcd = malloc(sizeof(uhci_t)); 105 110 ret = (hcd != NULL) ? EOK : ENOMEM; 106 CHECK_RET_FREE_HC_RETURN(ret, "Failed(%d) to allocate memory for uhci hcd.\n",107 ret);111 CHECK_RET_FREE_HC_RETURN(ret, 112 "Failed(%d) to allocate memory for uhci hcd.\n", ret); 108 113 109 114 ret = uhci_init(hcd, device, (void*)io_reg_base, io_reg_size); … … 131 136 } 132 137 138 /* It does no harm if we register this on polling */ 133 139 ret = register_interrupt_handler(device, irq, irq_handler, 134 140 &hcd->interrupt_code); 135 CHECK_RET_FINI_FREE_RETURN(ret, "Failed(%d) to register interrupt handler.\n",136 ret);141 CHECK_RET_FINI_FREE_RETURN(ret, 142 "Failed(%d) to register interrupt handler.\n", ret); 137 143 138 144 ret = setup_root_hub(&rh, device); 139 CHECK_RET_FINI_FREE_RETURN(ret, "Failed(%d) to setup UHCI root hub.\n",140 ret);145 CHECK_RET_FINI_FREE_RETURN(ret, 146 "Failed(%d) to setup UHCI root hub.\n", ret); 141 147 rh->driver_data = hcd->ddf_instance; 142 148 143 149 ret = ddf_fun_bind(rh); 144 CHECK_RET_FINI_FREE_RETURN(ret, "Failed(%d) to register UHCI root hub.\n",145 ret);150 CHECK_RET_FINI_FREE_RETURN(ret, 151 "Failed(%d) to register UHCI root hub.\n", ret); 146 152 147 153 return EOK;
Note:
See TracChangeset
for help on using the changeset viewer.