Changes in uspace/lib/usbdev/src/devdrv.c [58563585:086f8e3] in mainline
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/lib/usbdev/src/devdrv.c
r58563585 r086f8e3 27 27 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 28 28 */ 29 30 29 /** @addtogroup libusbdev 31 30 * @{ … … 56 55 /** Connection to device on USB bus */ 57 56 usb_dev_session_t *bus_session; 58 59 57 /** devman handle */ 60 58 devman_handle_t handle; 61 62 59 /** The default control pipe. */ 63 60 usb_pipe_t ctrl_pipe; 64 61 65 62 /** Other endpoint pipes. 66 *67 63 * This is an array of other endpoint pipes in the same order as 68 64 * in usb_driver_t. 69 65 */ 70 66 usb_endpoint_mapping_t *pipes; 71 72 67 /** Number of other endpoint pipes. */ 73 68 size_t pipes_count; 74 75 69 /** Current interface. 76 *77 70 * Usually, drivers operate on single interface only. 78 71 * This item contains the value of the interface or -1 for any. 79 72 */ 80 73 int interface_no; 81 82 74 /** Alternative interfaces. */ 83 75 usb_alternate_interfaces_t alternate_interfaces; 84 85 76 /** Some useful descriptors for USB device. */ 86 77 usb_device_descriptors_t descriptors; 87 88 78 /** Generic DDF device backing this one. DO NOT TOUCH! */ 89 79 ddf_dev_t *ddf_dev; 90 91 80 /** Custom driver data. 92 *93 81 * Do not use the entry in generic device, that is already used 94 82 * by the framework. 95 83 */ 96 84 void *driver_data; 85 97 86 } usb_device_t; 98 87 … … 146 135 return rc; 147 136 } 148 137 149 138 /* Change current alternative */ 150 139 usb_dev->alternate_interfaces.current = alternate_setting; … … 290 279 * 291 280 * @param[in] usb_dev USB device. 292 *293 281 */ 294 282 void usb_device_destroy_pipes(usb_device_t *usb_dev) … … 296 284 assert(usb_dev); 297 285 assert(usb_dev->pipes || usb_dev->pipes_count == 0); 298 299 286 /* Destroy the pipes. */ 300 287 for (size_t i = 0; i < usb_dev->pipes_count; ++i) { … … 304 291 usb_pipe_unregister(&usb_dev->pipes[i].pipe); 305 292 } 306 307 293 free(usb_dev->pipes); 308 294 usb_dev->pipes = NULL; … … 462 448 assert(handle); 463 449 assert(iface_no); 464 465 450 async_exch_t *exch = async_exchange_begin(sess); 466 451 if (!exch) 467 452 return EPARTY; 468 469 453 int ret = usb_get_my_device_handle(exch, handle); 470 454 if (ret == EOK) { … … 475 459 } 476 460 } 477 478 461 async_exchange_end(exch); 479 462 return ret;
Note:
See TracChangeset
for help on using the changeset viewer.