Changeset 61ebd99b in mainline
- Timestamp:
- 2011-05-31T20:38:07Z (13 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- e51a514
- Parents:
- e6503e9 (diff), 049a16f (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
re6503e9 r61ebd99b 259 259 if (is_zeros(instance->interrupt_buffer, 260 260 instance->interrupt_mask_size)) { 261 usb_log_debug(" no changes..\n");261 usb_log_debug("No changes..\n"); 262 262 instance->unfinished_interrupt_transfer = request; 263 263 //will be finished later 264 264 } else { 265 usb_log_debug(" processing changes..\n");265 usb_log_debug("Processing changes..\n"); 266 266 process_interrupt_mask_in_instance(instance, request); 267 267 } … … 287 287 return; 288 288 } 289 usb_log_debug(" finalizing interrupt transfer\n");289 usb_log_debug("Finalizing interrupt transfer\n"); 290 290 create_interrupt_mask_in_instance(instance); 291 291 process_interrupt_mask_in_instance(instance, … … 412 412 uint32_t data = instance->registers->rh_port_status[port - 1]; 413 413 memcpy(request->data_buffer, &data, 4); 414 #if 0415 int i;416 for (i = 0; i < instance->port_count; ++i) {417 418 usb_log_debug("port status %d,x%x\n",419 instance->registers->rh_port_status[i],420 instance->registers->rh_port_status[i]);421 }422 #endif423 414 return EOK; 424 415 } … … 438 429 static int process_get_hub_status_request(rh_t *instance, 439 430 usb_transfer_batch_t * request) { 440 //uint32_t * uint32_buffer = (uint32_t*) request->data_buffer;441 431 request->transfered_size = 4; 442 432 //bits, 0,1,16,17 443 433 uint32_t mask = 1 | (1 << 1) | (1 << 16) | (1 << 17); 444 434 uint32_t data = mask & instance->registers->rh_status; 445 //uint32_buffer[0] = mask & instance->registers->rh_status;446 435 memcpy(request->data_buffer, &data, 4); 447 436 … … 468 457 usb_hub_bm_request_type_t request_type = request_packet->request_type; 469 458 if (buffer_size < 4) { 470 usb_log_warning(" requested more data than buffer size\n");459 usb_log_warning("Requested more data than buffer size\n"); 471 460 return EINVAL; 472 461 } … … 718 707 static int process_address_set_request(rh_t *instance, 719 708 uint16_t address) { 720 instance->address = address; 721 722 return EOK; 709 return ENOTSUP; 723 710 } 724 711 /*----------------------------------------------------------------------------*/ … … 864 851 int opResult; 865 852 if (sizeof (usb_device_request_setup_packet_t) > request->setup_size) { 866 usb_log_error(" setup packet too small\n");853 usb_log_error("Setup packet too small\n"); 867 854 return EINVAL; 868 855 } … … 877 864 case USB_DEVREQ_GET_DESCRIPTOR: 878 865 case USB_DEVREQ_GET_CONFIGURATION: 879 usb_log_debug(" processing request with output\n");866 usb_log_debug("Processing request with output\n"); 880 867 opResult = process_request_with_output( 881 868 instance, request); … … 884 871 case USB_DEVREQ_SET_FEATURE: 885 872 case USB_DEVREQ_SET_ADDRESS: 886 usb_log_debug(" processing request without "873 usb_log_debug("Processing request without " 887 874 "additional data\n"); 888 875 opResult = process_request_without_data( … … 891 878 case USB_DEVREQ_SET_DESCRIPTOR: 892 879 case USB_DEVREQ_SET_CONFIGURATION: 893 usb_log_debug(" processing request with "880 usb_log_debug("Processing request with " 894 881 "input\n"); 895 882 opResult = process_request_with_input( … … 898 885 break; 899 886 default: 900 usb_log_warning(" received unsuported request: "887 usb_log_warning("Received unsuported request: " 901 888 "%d\n", 902 889 setup_request->request
Note:
See TracChangeset
for help on using the changeset viewer.