Changeset 8ea7459 in mainline for uspace/drv/bus/usb/xhci/bus.c
- Timestamp:
- 2017-10-21T12:17:09Z (8 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- f270ecb
- Parents:
- d1d7a92
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/drv/bus/usb/xhci/bus.c
rd1d7a92 r8ea7459 94 94 } 95 95 96 static int enumerate_device(bus_t *bus, hcd_t *hcd, device_t *dev) 96 int xhci_bus_remove_device(xhci_bus_t *bus, xhci_hc_t *hc, device_t *dev) 97 { 98 // TODO: Implement me! 99 return ENOTSUP; 100 } 101 102 /** Ops receive generic bus_t pointer. */ 103 static inline xhci_bus_t *bus_to_xhci_bus(bus_t *bus_base) 104 { 105 assert(bus_base); 106 return (xhci_bus_t *) bus_base; 107 } 108 109 static int enumerate_device(bus_t *bus_base, hcd_t *hcd, device_t *dev) 97 110 { 98 111 xhci_hc_t *hc = hcd_get_driver_data(hcd); 99 112 assert(hc); 100 113 101 return xhci_bus_enumerate_device((xhci_bus_t *) bus, hc, dev);102 } 103 104 static int remove_device(bus_t *bus, hcd_t *hcd, device_t *dev) 105 { 106 // TODO: Implement me! 107 108 return ENOTSUP; 109 } 110 111 /** Ops receive generic bus_t pointer. */ 112 static inline xhci_bus_t *bus_to_xhci_bus(bus_t *bus_base) 113 { 114 assert(bus_base); 115 return (xhci_bus_t *) bus_base;114 xhci_bus_t *bus = bus_to_xhci_bus(bus_base); 115 assert(bus); 116 117 return xhci_bus_enumerate_device(bus, hc, dev); 118 } 119 120 static int remove_device(bus_t *bus_base, hcd_t *hcd, device_t *dev) 121 { 122 xhci_hc_t *hc = hcd_get_driver_data(hcd); 123 assert(hc); 124 125 xhci_bus_t *bus = bus_to_xhci_bus(bus_base); 126 assert(bus); 127 128 return xhci_bus_remove_device(bus, hc, dev); 116 129 } 117 130 … … 246 259 return res; 247 260 248 xhci_device_remove_endpoint(hashed_dev->device, xhci_endpoint_get(ep)); 261 res = xhci_device_remove_endpoint(hashed_dev->device, xhci_endpoint_get(ep)); 262 if (res != EOK) 263 return res; 249 264 250 265 if (hashed_dev->device->active_endpoint_count == 0) {
Note:
See TracChangeset
for help on using the changeset viewer.