Changeset f8e8738 in mainline for uspace/drv/uhci-rhd/port.c
- Timestamp:
- 2011-04-07T20:22:40Z (14 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- fee6381
- Parents:
- 61257f4 (diff), a82889e (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the(diff)
links above to see all the changes relative to each parent. - File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/drv/uhci-rhd/port.c
r61257f4 rf8e8738 43 43 #include "port.h" 44 44 45 static int uhci_port_check(void *port); 46 static int uhci_port_reset_enable(int portno, void *arg); 45 47 static int uhci_port_new_device(uhci_port_t *port, usb_speed_t speed); 46 48 static int uhci_port_remove_device(uhci_port_t *port); 47 49 static int uhci_port_set_enabled(uhci_port_t *port, bool enabled); 48 static int uhci_port_check(void *port);49 static int uhci_port_reset_enable(int portno, void *arg);50 50 static void uhci_port_print_status( 51 51 uhci_port_t *port, const port_status_t value); … … 74 74 pio_write_16(port->address, value); 75 75 } 76 77 76 /*----------------------------------------------------------------------------*/ 78 77 /** Initialize UHCI root hub port instance. … … 259 258 260 259 usb_address_t dev_addr; 261 int r c= usb_hc_new_device_wrapper(port->rh, &port->hc_connection,260 int ret = usb_hc_new_device_wrapper(port->rh, &port->hc_connection, 262 261 speed, uhci_port_reset_enable, port->number, port, 263 262 &dev_addr, &port->attached_device, NULL, NULL, NULL); 264 263 265 if (r c!= EOK) {264 if (ret != EOK) { 266 265 usb_log_error("%s: Failed(%d) to add device: %s.\n", 267 port->id_string, r c, str_error(rc));266 port->id_string, ret, str_error(ret)); 268 267 uhci_port_set_enabled(port, false); 269 return r c;268 return ret; 270 269 } 271 270 … … 287 286 int uhci_port_remove_device(uhci_port_t *port) 288 287 { 289 usb_log_error("%s: Don't know how to remove device % d.\n",290 port->id_string, (unsigned int)port->attached_device);291 return E OK;288 usb_log_error("%s: Don't know how to remove device %llu.\n", 289 port->id_string, port->attached_device); 290 return ENOTSUP; 292 291 } 293 292 /*----------------------------------------------------------------------------*/ … … 341 340 (value & STATUS_CONNECTED_CHANGED) ? " CONNECTED-CHANGE," : "", 342 341 (value & STATUS_CONNECTED) ? " CONNECTED," : "", 343 (value & STATUS_ALWAYS_ONE) ? " ALWAYS ONE" : " ERR OR: NO ALWAYS ONE"342 (value & STATUS_ALWAYS_ONE) ? " ALWAYS ONE" : " ERR: NO ALWAYS ONE" 344 343 ); 345 344 }
Note:
See TracChangeset
for help on using the changeset viewer.