Changeset 79c8a96 in mainline for uspace/lib/usb/src
- Timestamp:
- 2011-03-21T10:27:44Z (14 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 2e1d5d70, c15070c
- Parents:
- 81dce9f (diff), f0fdc7d (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/src
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/lib/usb/src/devdrv.c
r81dce9f r79c8a96 206 206 * @return Error code. 207 207 */ 208 static int initialize_pipes(usb_d river_t *drv, usb_device_t *dev)208 static int initialize_pipes(usb_device_t *dev) 209 209 { 210 210 int rc; … … 284 284 dev->driver_data = NULL; 285 285 286 rc = initialize_pipes(d river, dev);286 rc = initialize_pipes(dev); 287 287 if (rc != EOK) { 288 288 free(dev); -
uspace/lib/usb/src/pipes.c
r81dce9f r79c8a96 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, -
uspace/lib/usb/src/recognise.c
r81dce9f r79c8a96 247 247 #undef VENDOR_ONLY_FMT 248 248 #undef VENDOR_ONLY_ARGS 249 250 /* As a last resort, try fallback driver. */ 251 ADD_MATCHID_OR_RETURN(matches, 10, "usb&interface&fallback"); 249 252 250 253 return EOK; … … 291 294 } 292 295 296 /* As a last resort, try fallback driver. */ 297 ADD_MATCHID_OR_RETURN(matches, 10, "usb&fallback"); 298 293 299 return EOK; 294 300 }
Note:
See TracChangeset
for help on using the changeset viewer.