Changeset c39e9fb in mainline
- Timestamp:
- 2013-01-25T22:21:13Z (12 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 945d66c
- Parents:
- f6b2a76
- Location:
- uspace/drv/bus/usb
- Files:
-
- 10 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/drv/bus/usb/usbflbk/main.c
rf6b2a76 rc39e9fb 50 50 usb_log_info("Pretending to control %s `%s' (handle %" PRIun ").\n", 51 51 dev->interface_no < 0 ? "device" : "interface", 52 ddf_dev_get_name(dev->ddf_dev), ddf_dev_get_handle(dev->ddf_dev));52 usb_device_get_name(dev), ddf_dev_get_handle(dev->ddf_dev)); 53 53 return EOK; 54 54 } -
uspace/drv/bus/usb/usbhid/kbd/kbddev.c
rf6b2a76 rc39e9fb 270 270 0)); 271 271 272 rc = usbhid_req_set_report(&hid_dev->usb_dev->ctrl_pipe, 272 rc = usbhid_req_set_report( 273 usb_device_get_default_pipe(hid_dev->usb_dev), 273 274 hid_dev->usb_dev->interface_no, USB_HID_REPORT_TYPE_OUTPUT, 274 275 kbd_dev->output_buffer, kbd_dev->output_size); … … 581 582 usb_kbd_set_led(hid_dev, kbd_dev); 582 583 583 usbhid_req_set_idle( &hid_dev->usb_dev->ctrl_pipe,584 usbhid_req_set_idle(usb_device_get_default_pipe(hid_dev->usb_dev), 584 585 hid_dev->usb_dev->interface_no, IDLE_RATE); 585 586 … … 786 787 } 787 788 788 rc = usbhid_req_set_protocol(&hid_dev->usb_dev->ctrl_pipe, 789 rc = usbhid_req_set_protocol( 790 usb_device_get_default_pipe(hid_dev->usb_dev), 789 791 hid_dev->usb_dev->interface_no, USB_HID_PROTOCOL_BOOT); 790 792 -
uspace/drv/bus/usb/usbhid/main.c
rf6b2a76 rc39e9fb 105 105 if (rc != EOK) { 106 106 usb_log_error("Failed to start polling fibril for `%s'.\n", 107 ddf_dev_get_name(dev->ddf_dev));107 usb_device_get_name(dev)); 108 108 usb_hid_deinit(hid_dev); 109 109 return rc; … … 111 111 hid_dev->running = true; 112 112 113 usb_log_info("HID device `%s' ready to use.\n", 114 ddf_dev_get_name(dev->ddf_dev)); 113 usb_log_info("HID device `%s' ready.\n", usb_device_get_name(dev)); 115 114 116 115 return EOK; … … 139 138 { 140 139 assert(dev); 141 assert(dev->driver_data);142 usb_hid_dev_t *hid_dev = dev->driver_data;140 usb_hid_dev_t *hid_dev = usb_device_data_get(dev); 141 assert(hid_dev); 143 142 unsigned tries = 100; 144 143 /* Wait for fail. */ … … 152 151 153 152 usb_hid_deinit(hid_dev); 154 usb_log_debug2("%s destruction complete.\n", ddf_dev_get_name(dev->ddf_dev));153 usb_log_debug2("%s destruction complete.\n", usb_device_get_name(dev)); 155 154 return EOK; 156 155 } -
uspace/drv/bus/usb/usbhid/mouse/mousedev.c
rf6b2a76 rc39e9fb 315 315 316 316 // TODO: how to know if the device supports the request??? 317 usbhid_req_set_idle( &hid_dev->usb_dev->ctrl_pipe,317 usbhid_req_set_idle(usb_device_get_default_pipe(hid_dev->usb_dev), 318 318 hid_dev->usb_dev->interface_no, IDLE_RATE); 319 319 return EOK; … … 425 425 } 426 426 427 rc = usbhid_req_set_protocol(&hid_dev->usb_dev->ctrl_pipe, 427 rc = usbhid_req_set_protocol( 428 usb_device_get_default_pipe(hid_dev->usb_dev), 428 429 hid_dev->usb_dev->interface_no, USB_HID_PROTOCOL_BOOT); 429 430 -
uspace/drv/bus/usb/usbhub/port.c
rf6b2a76 rc39e9fb 57 57 usb_port_status_t status); 58 58 static int get_port_status(usb_hub_port_t *port, usb_port_status_t *status); 59 //static int enable_port_callback(void *arg);60 59 static int add_device_phase1_worker_fibril(void *arg); 61 60 static int create_add_device_fibril(usb_hub_port_t *port, usb_hub_dev_t *hub, -
uspace/drv/bus/usb/usbhub/usbhub.c
rf6b2a76 rc39e9fb 162 162 hub_dev->running = true; 163 163 usb_log_info("Controlling hub '%s' (%zu ports).\n", 164 ddf_dev_get_name(hub_dev->usb_device->ddf_dev), hub_dev->port_count);164 usb_device_get_name(hub_dev->usb_device), hub_dev->port_count); 165 165 166 166 usb_pipe_end_long_transfer(control_pipe); -
uspace/drv/bus/usb/usbmast/bo_trans.c
rf6b2a76 rc39e9fb 117 117 /* Clear stall condition and continue below to read CSW. */ 118 118 if (ddir == USB_DIRECTION_IN) { 119 usb_pipe_clear_halt(&mfun->mdev->usb_dev->ctrl_pipe, 119 usb_pipe_clear_halt( 120 usb_device_get_default_pipe(mfun->mdev->usb_dev), 120 121 &mfun->mdev->usb_dev->pipes[BULK_IN_EP].pipe); 121 122 } else { 122 usb_pipe_clear_halt(&mfun->mdev->usb_dev->ctrl_pipe, 123 usb_pipe_clear_halt( 124 usb_device_get_default_pipe(mfun->mdev->usb_dev), 123 125 &mfun->mdev->usb_dev->pipes[BULK_OUT_EP].pipe); 124 126 } … … 197 199 int usb_massstor_reset(usbmast_dev_t *mdev) 198 200 { 199 return usb_control_request_set(&mdev->usb_dev->ctrl_pipe, 201 return usb_control_request_set( 202 usb_device_get_default_pipe(mdev->usb_dev), 200 203 USB_REQUEST_TYPE_CLASS, USB_REQUEST_RECIPIENT_INTERFACE, 201 204 0xFF, 0, mdev->usb_dev->interface_no, NULL, 0); … … 215 218 */ 216 219 usb_massstor_reset(mdev); 217 usb_pipe_clear_halt( &mdev->usb_dev->ctrl_pipe,220 usb_pipe_clear_halt(usb_device_get_default_pipe(mdev->usb_dev), 218 221 &mdev->usb_dev->pipes[BULK_IN_EP].pipe); 219 usb_pipe_clear_halt( &mdev->usb_dev->ctrl_pipe,222 usb_pipe_clear_halt(usb_device_get_default_pipe(mdev->usb_dev), 220 223 &mdev->usb_dev->pipes[BULK_OUT_EP].pipe); 221 224 } … … 236 239 uint8_t max_lun; 237 240 size_t data_recv_len; 238 int rc = usb_control_request_get(&mdev->usb_dev->ctrl_pipe, 241 int rc = usb_control_request_get( 242 usb_device_get_default_pipe(mdev->usb_dev), 239 243 USB_REQUEST_TYPE_CLASS, USB_REQUEST_RECIPIENT_INTERFACE, 240 244 0xFE, 0, mdev->usb_dev->interface_no, &max_lun, 1, &data_recv_len); -
uspace/drv/bus/usb/usbmast/main.c
rf6b2a76 rc39e9fb 110 110 static int usbmast_device_gone(usb_device_t *dev) 111 111 { 112 usbmast_dev_t *mdev = dev->driver_data;112 usbmast_dev_t *mdev = usb_device_data_get(dev); 113 113 assert(mdev); 114 114 -
uspace/drv/bus/usb/usbmid/explore.c
rf6b2a76 rc39e9fb 159 159 160 160 /* Select the first configuration */ 161 int rc = usb_request_set_configuration( &dev->ctrl_pipe,161 int rc = usb_request_set_configuration(usb_device_get_default_pipe(dev), 162 162 config_descriptor->configuration_number); 163 163 if (rc != EOK) { -
uspace/drv/bus/usb/usbmid/main.c
rf6b2a76 rc39e9fb 64 64 { 65 65 assert(dev); 66 usb_mid_t *usb_mid = dev->driver_data;66 usb_mid_t *usb_mid = usb_device_data_get(dev); 67 67 assert(usb_mid); 68 68 … … 113 113 { 114 114 assert(dev); 115 usb_mid_t *usb_mid = dev->driver_data;115 usb_mid_t *usb_mid = usb_device_data_get(dev); 116 116 assert(usb_mid); 117 117
Note:
See TracChangeset
for help on using the changeset viewer.