Changeset 357a302 in mainline for uspace/lib/usb/src/pipes.c
- Timestamp:
- 2011-02-20T14:17:40Z (14 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- b68b279
- Parents:
- 3ae93a8
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/lib/usb/src/pipes.c
r3ae93a8 r357a302 36 36 #include <usb/pipes.h> 37 37 #include <usbhc_iface.h> 38 #include <usb_iface.h> 38 39 #include <errno.h> 39 40 #include <assert.h> … … 41 42 /** Tell USB address assigned to given device. 42 43 * 43 * @param phone Phone to my HC.44 * @param phone Phone to parent device. 44 45 * @param dev Device in question. 45 46 * @return USB address or error code. … … 48 49 { 49 50 sysarg_t address; 50 int rc = async_req_2_1(phone, DEV_IFACE_ID(USB HC_DEV_IFACE),51 IPC_M_USB HC_GET_ADDRESS,51 int rc = async_req_2_1(phone, DEV_IFACE_ID(USB_DEV_IFACE), 52 IPC_M_USB_GET_ADDRESS, 52 53 dev->handle, &address); 53 54 … … 80 81 } 81 82 82 int hc_phone = devman_device_connect(hc_handle, 0); 83 if (hc_phone < 0) { 84 return hc_phone; 85 } 86 87 my_address = get_my_address(hc_phone, device); 83 int parent_phone = devman_parent_device_connect(device->handle, 84 IPC_FLAG_BLOCKING); 85 if (parent_phone < 0) { 86 return parent_phone; 87 } 88 89 my_address = get_my_address(parent_phone, device); 88 90 if (my_address < 0) { 89 91 rc = my_address; … … 95 97 96 98 leave: 97 async_hangup( hc_phone);99 async_hangup(parent_phone); 98 100 return rc; 99 101 }
Note:
See TracChangeset
for help on using the changeset viewer.