Changes in uspace/drv/uhci-hcd/iface.c [52cc968:1998bcd] in mainline
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/drv/uhci-hcd/iface.c
r52cc968 r1998bcd 74 74 name, target.address, target.endpoint, size, ep->max_packet_size); 75 75 76 assert(ep->speed ==77 usb_device_keeper_get_speed(&(*hc)->manager, target.address));76 // assert(ep->speed == 77 // usb_device_keeper_get_speed(&(*hc)->manager, target.address)); 78 78 // assert(ep->max_packet_size == max_packet_size); 79 79 // assert(ep->transfer_type == USB_TRANSFER_CONTROL); … … 198 198 /*----------------------------------------------------------------------------*/ 199 199 static int register_endpoint( 200 ddf_fun_t *fun, usb_address_t address, usb_endpoint_t endpoint, 200 ddf_fun_t *fun, usb_address_t address, usb_speed_t ep_speed, 201 usb_endpoint_t endpoint, 201 202 usb_transfer_type_t transfer_type, usb_direction_t direction, 202 203 size_t max_packet_size, unsigned int interval) … … 204 205 hc_t *hc = fun_to_hc(fun); 205 206 assert(hc); 206 const usb_speed_t speed = 207 usb_device_keeper_get_speed(&hc->manager, address); 207 usb_speed_t speed = usb_device_keeper_get_speed(&hc->manager, address); 208 if (speed >= USB_SPEED_MAX) { 209 speed = ep_speed; 210 } 208 211 const size_t size = 209 212 (transfer_type == USB_TRANSFER_INTERRUPT … … 243 246 usb_log_debug("Unregister endpoint %d:%d %d.\n", 244 247 address, endpoint, direction); 248 endpoint_t *ep = usb_endpoint_manager_get_ep(&hc->ep_manager, 249 address, endpoint, direction, NULL); 250 if (ep != NULL) { 251 usb_device_keeper_del_ep(&hc->manager, address, ep); 252 } 245 253 return usb_endpoint_manager_unregister_ep(&hc->ep_manager, address, 246 254 endpoint, direction); … … 251 259 * @param[in] fun DDF function that was called. 252 260 * @param[in] target USB device to write to. 253 * @param[in] max_packet_size maximum size of data packet the device accepts254 261 * @param[in] data Source of data. 255 262 * @param[in] size Size of data source. … … 259 266 */ 260 267 static int interrupt_out( 261 ddf_fun_t *fun, usb_target_t target, size_t max_packet_size,void *data,268 ddf_fun_t *fun, usb_target_t target, void *data, 262 269 size_t size, usbhc_iface_transfer_out_callback_t callback, void *arg) 263 270 { … … 280 287 * @param[in] fun DDF function that was called. 281 288 * @param[in] target USB device to write to. 282 * @param[in] max_packet_size maximum size of data packet the device accepts283 289 * @param[out] data Data destination. 284 290 * @param[in] size Size of data source. … … 288 294 */ 289 295 static int interrupt_in( 290 ddf_fun_t *fun, usb_target_t target, size_t max_packet_size,void *data,296 ddf_fun_t *fun, usb_target_t target, void *data, 291 297 size_t size, usbhc_iface_transfer_in_callback_t callback, void *arg) 292 298 { … … 309 315 * @param[in] fun DDF function that was called. 310 316 * @param[in] target USB device to write to. 311 * @param[in] max_packet_size maximum size of data packet the device accepts312 317 * @param[in] data Source of data. 313 318 * @param[in] size Size of data source. … … 317 322 */ 318 323 static int bulk_out( 319 ddf_fun_t *fun, usb_target_t target, size_t max_packet_size,void *data,324 ddf_fun_t *fun, usb_target_t target, void *data, 320 325 size_t size, usbhc_iface_transfer_out_callback_t callback, void *arg) 321 326 { … … 338 343 * @param[in] fun DDF function that was called. 339 344 * @param[in] target USB device to write to. 340 * @param[in] max_packet_size maximum size of data packet the device accepts341 345 * @param[out] data Data destination. 342 346 * @param[in] size Size of data source. … … 346 350 */ 347 351 static int bulk_in( 348 ddf_fun_t *fun, usb_target_t target, size_t max_packet_size,void *data,352 ddf_fun_t *fun, usb_target_t target, void *data, 349 353 size_t size, usbhc_iface_transfer_in_callback_t callback, void *arg) 350 354 { … … 367 371 * @param[in] fun DDF function that was called. 368 372 * @param[in] target USB device to write to. 369 * @param[in] max_packet_size maximum size of data packet the device accepts.370 373 * @param[in] setup_data Data to send with SETUP transfer. 371 374 * @param[in] setup_size Size of data to send with SETUP transfer (always 8B). … … 377 380 */ 378 381 static int control_write( 379 ddf_fun_t *fun, usb_target_t target, size_t max_packet_size,382 ddf_fun_t *fun, usb_target_t target, 380 383 void *setup_data, size_t setup_size, void *data, size_t size, 381 384 usbhc_iface_transfer_out_callback_t callback, void *arg) … … 401 404 * @param[in] fun DDF function that was called. 402 405 * @param[in] target USB device to write to. 403 * @param[in] max_packet_size maximum size of data packet the device accepts.404 406 * @param[in] setup_data Data to send with SETUP packet. 405 407 * @param[in] setup_size Size of data to send with SETUP packet (should be 8B). … … 411 413 */ 412 414 static int control_read( 413 ddf_fun_t *fun, usb_target_t target, size_t max_packet_size,415 ddf_fun_t *fun, usb_target_t target, 414 416 void *setup_data, size_t setup_size, void *data, size_t size, 415 417 usbhc_iface_transfer_in_callback_t callback, void *arg)
Note:
See TracChangeset
for help on using the changeset viewer.