Changeset f8e1a2c in mainline for uspace/lib
- Timestamp:
- 2011-03-21T13:19:19Z (15 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 0e45e7f, 8a951ca
- Parents:
- e387d0f (diff), 2e1d5d70 (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the(diff)
links above to see all the changes relative to each parent. - Location:
- uspace/lib/usb
- Files:
-
- 2 added
- 2 edited
- 2 moved
Legend:
- Unmodified
- Added
- Removed
-
uspace/lib/usb/Makefile
re387d0f rf8e1a2c 49 49 src/request.c \ 50 50 src/usb.c \ 51 src/usbdevice.c 51 src/usbdevice.c \ 52 src/host/device_keeper.c \ 53 src/host/batch.c 52 54 53 55 include $(USPACE_PREFIX)/Makefile.common -
uspace/lib/usb/include/usb/host/device_keeper.h
re387d0f rf8e1a2c 27 27 */ 28 28 29 /** @addtogroup drvusbuhcihc29 /** @addtogroup libusb 30 30 * @{ 31 31 */ … … 33 33 * @brief UHCI driver 34 34 */ 35 #ifndef UTILS_DEVICE_KEEPER_H36 #define UTILS_DEVICE_KEEPER_H35 #ifndef LIBUSB_HOST_DEVICE_KEEPER_H 36 #define LIBUSB_HOST_DEVICE_KEEPER_H 37 37 #include <devman.h> 38 38 #include <fibril_synch.h> -
uspace/lib/usb/src/host/device_keeper.c
re387d0f rf8e1a2c 27 27 */ 28 28 29 /** @addtogroup drvusbuhcihc29 /** @addtogroup libusb 30 30 * @{ 31 31 */ … … 36 36 #include <errno.h> 37 37 #include <usb/debug.h> 38 39 #include "device_keeper.h" 38 #include <usb/host/device_keeper.h> 40 39 41 40 /*----------------------------------------------------------------------------*/ -
uspace/lib/usb/src/pipes.c
re387d0f rf8e1a2c 42 42 #include <assert.h> 43 43 44 #define IPC_AGAIN_DELAY (1000 * 2) /* 2ms */ 45 44 46 /** Tell USB address assigned to given device. 45 47 * … … 150 152 } 151 153 152 my_address = get_my_address(parent_phone, dev); 153 if (my_address < 0) { 154 rc = my_address; 155 goto leave; 156 } 154 /* 155 * Asking for "my" address may require several attempts. 156 * That is because following scenario may happen: 157 * - parent driver (i.e. driver of parent device) announces new device 158 * and devman launches current driver 159 * - parent driver is preempted and thus does not send address-handle 160 * binding to HC driver 161 * - this driver gets here and wants the binding 162 * - the HC does not know the binding yet and thus it answers ENOENT 163 * So, we need to wait for the HC to learn the binding. 164 */ 165 do { 166 my_address = get_my_address(parent_phone, dev); 167 168 if (my_address == ENOENT) { 169 /* Be nice, let other fibrils run and try again. */ 170 async_usleep(IPC_AGAIN_DELAY); 171 } else if (my_address < 0) { 172 /* Some other problem, no sense trying again. */ 173 rc = my_address; 174 goto leave; 175 } 176 177 } while (my_address < 0); 157 178 158 179 rc = usb_device_connection_initialize(connection,
Note:
See TracChangeset
for help on using the changeset viewer.