Changeset 063dfe8 in mainline
- Timestamp:
- 2017-10-13T13:04:26Z (7 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- dcf0597
- Parents:
- c10daa8
- Location:
- uspace/drv/bus/usb/xhci
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/drv/bus/usb/xhci/bus.c
rc10daa8 r063dfe8 110 110 } 111 111 112 static int hashed_device_create(xhci_bus_t *bus, hashed_device_t **hashed_dev )112 static int hashed_device_create(xhci_bus_t *bus, hashed_device_t **hashed_dev, usb_address_t address) 113 113 { 114 114 int res; … … 119 119 } 120 120 121 res = xhci_device_init(dev, bus );121 res = xhci_device_init(dev, bus, address); 122 122 if (res != EOK) { 123 123 goto err_xhci_dev_init; 124 124 } 125 126 // TODO: Set device data.127 125 128 126 hashed_device_t *ret_dev = (hashed_device_t *) malloc(sizeof(hashed_device_t)); … … 166 164 167 165 if (res == ENOENT) { 168 res = hashed_device_create(bus, &hashed_dev );166 res = hashed_device_create(bus, &hashed_dev, ep->target.address); 169 167 170 168 if (res != EOK) -
uspace/drv/bus/usb/xhci/endpoint.c
rc10daa8 r063dfe8 52 52 xhci_ep->device = NULL; 53 53 54 usb_log_debug(" XHCIEndpoint %d:%d initialized.", ep->target.address, ep->target.endpoint);54 usb_log_debug("Endpoint %d:%d initialized.", ep->target.address, ep->target.endpoint); 55 55 56 56 return EOK; … … 65 65 endpoint_t *ep = &xhci_ep->base; 66 66 67 usb_log_debug(" XHCIEndpoint %d:%d destroyed.", ep->target.address, ep->target.endpoint);67 usb_log_debug("Endpoint %d:%d destroyed.", ep->target.address, ep->target.endpoint); 68 68 } 69 69 70 int xhci_device_init(xhci_device_t *dev, xhci_bus_t *bus )70 int xhci_device_init(xhci_device_t *dev, xhci_bus_t *bus, usb_address_t address) 71 71 { 72 72 memset(&dev->endpoints, 0, sizeof(dev->endpoints)); 73 73 dev->active_endpoint_count = 0; 74 dev->address = address; 75 dev->slot_id = 0; 76 77 usb_log_debug("Device %d initialized.", dev->address); 74 78 return EOK; 75 79 } … … 78 82 { 79 83 // TODO: Check that all endpoints are dead. 84 usb_log_debug("Device %d destroyed.", dev->address); 80 85 } 81 86 -
uspace/drv/bus/usb/xhci/endpoint.h
rc10daa8 r063dfe8 79 79 void xhci_endpoint_fini(xhci_endpoint_t *); 80 80 81 int xhci_device_init(xhci_device_t *, xhci_bus_t * );81 int xhci_device_init(xhci_device_t *, xhci_bus_t *, usb_address_t); 82 82 void xhci_device_fini(xhci_device_t *); 83 83
Note:
See TracChangeset
for help on using the changeset viewer.