Changeset 8efafda in mainline
- Timestamp:
- 2011-04-09T15:59:38Z (14 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 7b715892
- Parents:
- 4ede178
- Location:
- uspace
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/app/usbinfo/dev.c
r4ede178 r8efafda 50 50 51 51 int rc; 52 bool transfer_started = false; 52 53 53 54 rc = usb_device_connection_initialize(&dev->wire, hc_handle, dev_addr); … … 76 77 } 77 78 78 rc = usb_pipe_start_ session(&dev->ctrl_pipe);79 rc = usb_pipe_start_long_transfer(&dev->ctrl_pipe); 79 80 if (rc != EOK) { 80 81 fprintf(stderr, 81 NAME ": failed to start sessionon control pipe: %s.\n",82 NAME ": failed to start transfer on control pipe: %s.\n", 82 83 str_error(rc)); 83 84 goto leave; 84 85 } 86 transfer_started = true; 85 87 86 88 rc = usb_request_get_device_descriptor(&dev->ctrl_pipe, … … 107 109 108 110 leave: 109 if ( usb_pipe_is_session_started(&dev->ctrl_pipe)) {110 usb_pipe_end_ session(&dev->ctrl_pipe);111 if (transfer_started) { 112 usb_pipe_end_long_transfer(&dev->ctrl_pipe); 111 113 } 112 114 … … 118 120 void destroy_device(usbinfo_device_t *dev) 119 121 { 120 usb_pipe_end_ session(&dev->ctrl_pipe);122 usb_pipe_end_long_transfer(&dev->ctrl_pipe); 121 123 free(dev); 122 124 } -
uspace/drv/usbmid/main.c
r4ede178 r8efafda 55 55 int rc; 56 56 57 rc = usb_pipe_start_ session(&dev->ctrl_pipe);57 rc = usb_pipe_start_long_transfer(&dev->ctrl_pipe); 58 58 if (rc != EOK) { 59 usb_log_error("Failed to start sessionon control pipe: %s.\n",59 usb_log_error("Failed to start transfer on control pipe: %s.\n", 60 60 str_error(rc)); 61 61 return rc; … … 64 64 bool accept = usbmid_explore_device(dev); 65 65 66 rc = usb_pipe_end_session(&dev->ctrl_pipe); 67 if (rc != EOK) { 68 usb_log_warning("Failed to end session on control pipe: %s.\n", 69 str_error(rc)); 70 } 66 usb_pipe_end_long_transfer(&dev->ctrl_pipe); 71 67 72 68 if (!accept) {
Note:
See TracChangeset
for help on using the changeset viewer.