Changeset 2bdf92a5 in mainline
- Timestamp:
- 2017-10-10T06:34:37Z (7 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- cccd60c3
- Parents:
- 05913fe7
- Location:
- uspace/lib
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/lib/usbdev/src/devdrv.c
r05913fe7 r2bdf92a5 489 489 int iface_no = -1; 490 490 491 async_sess_t *sess = devman_parent_device_connect( 492 ddf_dev_get_handle(ddf_dev), IPC_FLAG_BLOCKING); 491 async_sess_t *sess = ddf_dev_parent_sess_get(ddf_dev); 493 492 if (sess == NULL) 494 493 return ENOMEM; 495 494 const int ret = usb_device_get_info(sess, &h, &iface_no); 496 async_hangup(sess);497 495 if (ret != EOK) 498 496 return ret; -
uspace/lib/usbhost/src/ddf_helpers.c
r05913fe7 r2bdf92a5 46 46 #include <ddf/interrupt.h> 47 47 #include <device/hw_res_parsed.h> 48 #include <devman.h>49 48 #include <errno.h> 50 49 #include <fibril_synch.h> … … 692 691 } 693 692 694 //TODO: Move this to generic ddf?693 //TODO: Cache parent session in HCD 695 694 /** Call the parent driver with a request to enable interrupts 696 695 * … … 700 699 int hcd_ddf_enable_interrupts(ddf_dev_t *device) 701 700 { 702 as sert(device);703 async_sess_t *parent_sess =704 devman_parent_device_connect(ddf_dev_get_handle(device),705 IPC_FLAG_BLOCKING); 701 async_sess_t *parent_sess = ddf_dev_parent_sess_get(device); 702 if (parent_sess == NULL) 703 return EIO; 704 706 705 const bool enabled = hw_res_enable_interrupt(parent_sess); 707 async_hangup(parent_sess);708 706 709 707 return enabled ? EOK : EIO; 710 708 } 711 709 712 //TODO: Move this to generic ddf?710 //TODO: Cache parent session in HCD 713 711 int hcd_ddf_get_registers(ddf_dev_t *device, hw_res_list_parsed_t *hw_res) 714 712 { 715 assert(device); 716 assert(hw_res); 717 718 async_sess_t *parent_sess = 719 devman_parent_device_connect(ddf_dev_get_handle(device), 720 IPC_FLAG_BLOCKING); 713 async_sess_t *parent_sess = ddf_dev_parent_sess_get(device); 714 if (parent_sess == NULL) 715 return EIO; 716 721 717 hw_res_list_parsed_init(hw_res); 722 718 const int ret = hw_res_get_list_parsed(parent_sess, hw_res, 0); 723 async_hangup(parent_sess);724 719 if (ret != EOK) 725 720 hw_res_list_parsed_clean(hw_res);
Note:
See TracChangeset
for help on using the changeset viewer.