Changes in uspace/drv/uhci-rhd/port.c [c0cea918:f9c03b5] in mainline
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/drv/uhci-rhd/port.c
rc0cea918 rf9c03b5 68 68 * @return Error code. (Always EOK) 69 69 */ 70 static inline void uhci_port_write_status(uhci_port_t *port, port_status_t val) 71 { 72 assert(port); 73 pio_write_16(port->address, val); 70 static inline void uhci_port_write_status( 71 uhci_port_t *port, port_status_t value) 72 { 73 assert(port); 74 pio_write_16(port->address, value); 74 75 } 75 76 /*----------------------------------------------------------------------------*/ … … 100 101 port->rh = rh; 101 102 102 int r et =103 usb_hc_connection_initialize_from_device(&port->hc_connection, rh);104 if (r et!= EOK) {103 int rc = usb_hc_connection_initialize_from_device( 104 &port->hc_connection, rh); 105 if (rc != EOK) { 105 106 usb_log_error("Failed to initialize connection to HC."); 106 return r et;107 return rc; 107 108 } 108 109 … … 237 238 /* Enable the port. */ 238 239 uhci_port_set_enabled(port, true); 240 239 241 return EOK; 240 242 } … … 269 271 usb_log_info("New device at port %u, address %d (handle %llu).\n", 270 272 port->number, dev_addr, port->attached_device); 273 271 274 return EOK; 272 275 } … … 310 313 /* Write new value. */ 311 314 uhci_port_write_status(port, port_status); 312 313 /* Wait for port to become enabled */314 do {315 async_usleep(1000);316 port_status = uhci_port_read_status(port);317 } while ((port_status & STATUS_CONNECTED) &&318 !(port_status & STATUS_ENABLED));319 315 320 316 usb_log_debug("%s: %sabled port.\n",
Note:
See TracChangeset
for help on using the changeset viewer.