Changeset 399a13c in mainline for uspace/drv/ohci/root_hub.c
- Timestamp:
- 2011-05-30T13:50:33Z (14 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 17d1542
- Parents:
- a5fc431 (diff), 8971926 (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. - File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/drv/ohci/root_hub.c
ra5fc431 r399a13c 57 57 .device_version = 0, 58 58 .length = sizeof (usb_standard_device_descriptor_t), 59 /// \TODO this value is guessed60 59 .max_packet_size = 8, 61 60 .vendor_id = 0x16db, … … 117 116 */ 118 117 static const uint32_t hub_clear_feature_by_writing_one_mask = 119 RHS_CLEAR_PORT_POWER;118 RHS_CLEAR_PORT_POWER; 120 119 121 120 /** … … 412 411 request->transfered_size = 4; 413 412 uint32_t data = instance->registers->rh_port_status[port - 1]; 414 memcpy(request->data_buffer, &data,4);413 memcpy(request->data_buffer, &data, 4); 415 414 #if 0 416 415 int i; … … 445 444 uint32_t data = mask & instance->registers->rh_status; 446 445 //uint32_buffer[0] = mask & instance->registers->rh_status; 447 memcpy(request->data_buffer, &data,4);446 memcpy(request->data_buffer, &data, 4); 448 447 449 448 return EOK; … … 468 467 469 468 usb_hub_bm_request_type_t request_type = request_packet->request_type; 470 if (buffer_size < 4 /*request_packet->length*/) {///\TODO469 if (buffer_size < 4) { 471 470 usb_log_warning("requested more data than buffer size\n"); 472 471 return EINVAL; … … 499 498 | (1 << (USB_HUB_FEATURE_C_HUB_OVER_CURRENT + 16)); 500 499 bzero(bitmap, instance->interrupt_mask_size); 501 if ((instance->registers->rh_status & mask) != 0) {500 if ((instance->registers->rh_status & mask) != 0) { 502 501 bitmap[0] = 1; 503 502 } … … 678 677 (instance->registers->rh_port_status[port - 1] | (1 << feature)) 679 678 & (~port_clear_feature_valid_mask); 680 /// \TODO any error?681 682 679 return EOK; 683 680 } … … 707 704 & (~port_clear_feature_valid_mask)) 708 705 | (1 << feature); 709 /// \TODO any error?710 706 711 707 return EOK; … … 925 921 * @return 926 922 */ 927 static int process_interrupt_mask_in_instance(rh_t *instance, usb_transfer_batch_t * request) { 923 static int process_interrupt_mask_in_instance(rh_t *instance, 924 usb_transfer_batch_t * request) { 928 925 memcpy(request->data_buffer, instance->interrupt_buffer, 929 926 instance->interrupt_mask_size); … … 945 942 * @return 946 943 */ 947 static bool is_zeros(void * 944 static bool is_zeros(void *buffer, size_t size) { 948 945 if (!buffer) return true; 949 946 if (!size) return true;
Note:
See TracChangeset
for help on using the changeset viewer.