Fork us on GitHub Follow us on Facebook Follow us on Twitter

Changeset a3044b4 in mainline


Ignore:
Timestamp:
2017-10-28T16:46:54Z (3 years ago)
Author:
Petr Manek <petr.manek@…>
Branches:
master
Children:
6b2930b
Parents:
9868982
Message:

Ending device operation gracefully when possible.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • uspace/drv/bus/usb/xhci/bus.c

    r9868982 ra3044b4  
    188188        xhci_device_t *xhci_dev = xhci_device_get(dev);
    189189
     190        /* If the device is still attached, end DDF drivers gracefully. */
     191        if (!xhci_dev->detached) {
     192                if ((err = ddf_fun_offline(dev->fun))) {
     193                        usb_log_warning("Failed to offline DDF function of device '%s': %s",
     194                            ddf_fun_get_name(dev->fun), str_error(err));
     195                }
     196        }
     197
    190198        /* Block creation of new endpoints and transfers. */
    191199        usb_log_debug2("Device '%s' going offline.", ddf_fun_get_name(dev->fun));
     
    215223        /* Make DDF (and all drivers) forget about the device. */
    216224        if ((err = ddf_fun_unbind(dev->fun))) {
    217                 usb_log_warning("Failed to unbind DDF function of detached device '%s': %s",
     225                usb_log_warning("Failed to unbind DDF function of device '%s': %s",
    218226                    ddf_fun_get_name(dev->fun), str_error(err));
    219227        }
     
    222230        if (!xhci_dev->detached) {
    223231                if ((err = hc_deconfigure_device(hc, xhci_dev->slot_id))) {
    224                         usb_log_warning("Failed to deconfigure detached device '%s': %s",
     232                        usb_log_warning("Failed to deconfigure device '%s': %s",
    225233                            ddf_fun_get_name(dev->fun), str_error(err));
    226234                }
Note: See TracChangeset for help on using the changeset viewer.