Changeset 7be3638 in mainline
- Timestamp:
- 2011-10-12T18:19:01Z (13 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 844f4ef
- Parents:
- 96fde65
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/drv/bus/usb/uhcirh/port.c
r96fde65 r7be3638 285 285 int uhci_port_remove_device(uhci_port_t *port) 286 286 { 287 usb_log_debug("Removing device on port %zu.\n", port->number); 287 assert(port); 288 /* There is nothing to remove. */ 289 if (port->attached_device.handle == 0) { 290 usb_log_warning("%s: Removed a ghost device.\n", 291 port->id_string); 292 assert(port->attached_device.address == -1); 293 return EOK; 294 } 295 296 usb_log_debug("%s: Removing device.\n", port->id_string); 288 297 289 298 /* Stop driver first */ 290 299 int ret = devman_remove_function(port->attached_device.handle); 291 300 if (ret != EOK) { 292 usb_log_error(" Failed to remove child function on port"293 " %zu: %s.\n", port->number, str_error(ret));301 usb_log_error("%s: Failed to remove child function: %s.\n", 302 port->id_string, str_error(ret)); 294 303 return ret; 295 304 } … … 300 309 port->attached_device.address); 301 310 if (ret != EOK) { 302 usb_log_error(" Failed to unregister address of removed device:"303 " %s.\n", str_error(ret));311 usb_log_error("%s: Failed to unregister address of removed " 312 "device: %s.\n", port->id_string, str_error(ret)); 304 313 return ret; 305 314 } 306 307 315 port->attached_device.address = -1; 308 usb_log_info("Removed device on port %zu.\n", port->number); 316 317 usb_log_info("%s: Removed attached device.\n", port->id_string); 309 318 return EOK; 310 319 }
Note:
See TracChangeset
for help on using the changeset viewer.