Changeset e0d8b740 in mainline for uspace/drv/bus/usb/uhci/hc.c
- Timestamp:
- 2013-08-07T08:26:40Z (11 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 6340a6ff
- Parents:
- cce3228
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/drv/bus/usb/uhci/hc.c
rcce3228 re0d8b740 208 208 { 209 209 assert(reg_size >= sizeof(uhci_regs_t)); 210 int ret;211 212 #define CHECK_RET_RETURN(ret, message...) \213 if (ret != EOK) { \214 usb_log_error(message); \215 return ret; \216 } else (void) 0217 210 218 211 instance->hw_interrupts = interrupts; … … 221 214 /* allow access to hc control registers */ 222 215 uhci_regs_t *io; 223 ret = pio_enable(regs, reg_size, (void **)&io); 224 CHECK_RET_RETURN(ret, "Failed to gain access to registers at %p: %s.\n", 225 io, str_error(ret)); 216 int ret = pio_enable(regs, reg_size, (void **)&io); 217 if (ret != EOK) { 218 usb_log_error("Failed to gain access to registers at %p: %s.\n", 219 io, str_error(ret)); 220 return ret; 221 } 226 222 instance->registers = io; 223 227 224 usb_log_debug( 228 225 "Device registers at %p (%zuB) accessible.\n", io, reg_size); 229 226 230 227 ret = hc_init_mem_structures(instance); 231 CHECK_RET_RETURN(ret, 232 "Failed to initialize UHCI memory structures: %s.\n", 233 str_error(ret)); 234 235 #undef CHECK_RET_RETURN 228 if (ret != EOK) { 229 usb_log_error("Failed to init UHCI memory structures: %s.\n", 230 str_error(ret)); 231 // TODO: we should disable pio here 232 return ret; 233 } 236 234 237 235 hc_init_hw(instance); … … 391 389 392 390 return EOK; 393 #undef CHECK_RET_CLEAR_RETURN394 391 } 395 392
Note:
See TracChangeset
for help on using the changeset viewer.