Changeset 61ebd99b in mainline


Ignore:
Timestamp:
2011-05-31T20:38:07Z (13 years ago)
Author:
Matus Dekanek <smekideki@…>
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.
Message:

set address on OHCI returns ENOTSUP

File:
1 edited

Legend:

Unmodified
Added
Removed
  • uspace/drv/ohci/root_hub.c

    re6503e9 r61ebd99b  
    259259                if (is_zeros(instance->interrupt_buffer,
    260260                    instance->interrupt_mask_size)) {
    261                         usb_log_debug("no changes..\n");
     261                        usb_log_debug("No changes..\n");
    262262                        instance->unfinished_interrupt_transfer = request;
    263263                        //will be finished later
    264264                } else {
    265                         usb_log_debug("processing changes..\n");
     265                        usb_log_debug("Processing changes..\n");
    266266                        process_interrupt_mask_in_instance(instance, request);
    267267                }
     
    287287                return;
    288288        }
    289         usb_log_debug("finalizing interrupt transfer\n");
     289        usb_log_debug("Finalizing interrupt transfer\n");
    290290        create_interrupt_mask_in_instance(instance);
    291291        process_interrupt_mask_in_instance(instance,
     
    412412        uint32_t data = instance->registers->rh_port_status[port - 1];
    413413        memcpy(request->data_buffer, &data, 4);
    414 #if 0
    415         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 #endif
    423414        return EOK;
    424415}
     
    438429static int process_get_hub_status_request(rh_t *instance,
    439430    usb_transfer_batch_t * request) {
    440         //uint32_t * uint32_buffer = (uint32_t*) request->data_buffer;
    441431        request->transfered_size = 4;
    442432        //bits, 0,1,16,17
    443433        uint32_t mask = 1 | (1 << 1) | (1 << 16) | (1 << 17);
    444434        uint32_t data = mask & instance->registers->rh_status;
    445         //uint32_buffer[0] = mask & instance->registers->rh_status;
    446435        memcpy(request->data_buffer, &data, 4);
    447436
     
    468457        usb_hub_bm_request_type_t request_type = request_packet->request_type;
    469458        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");
    471460                return EINVAL;
    472461        }
     
    718707static int process_address_set_request(rh_t *instance,
    719708    uint16_t address) {
    720         instance->address = address;
    721 
    722         return EOK;
     709        return ENOTSUP;
    723710}
    724711/*----------------------------------------------------------------------------*/
     
    864851        int opResult;
    865852        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");
    867854                return EINVAL;
    868855        }
     
    877864                case USB_DEVREQ_GET_DESCRIPTOR:
    878865                case USB_DEVREQ_GET_CONFIGURATION:
    879                         usb_log_debug("processing request with output\n");
     866                        usb_log_debug("Processing request with output\n");
    880867                        opResult = process_request_with_output(
    881868                            instance, request);
     
    884871                case USB_DEVREQ_SET_FEATURE:
    885872                case USB_DEVREQ_SET_ADDRESS:
    886                         usb_log_debug("processing request without "
     873                        usb_log_debug("Processing request without "
    887874                            "additional data\n");
    888875                        opResult = process_request_without_data(
     
    891878                case USB_DEVREQ_SET_DESCRIPTOR:
    892879                case USB_DEVREQ_SET_CONFIGURATION:
    893                         usb_log_debug("processing request with "
     880                        usb_log_debug("Processing request with "
    894881                            "input\n");
    895882                        opResult = process_request_with_input(
     
    898885                        break;
    899886                default:
    900                         usb_log_warning("received unsuported request: "
     887                        usb_log_warning("Received unsuported request: "
    901888                            "%d\n",
    902889                            setup_request->request
Note: See TracChangeset for help on using the changeset viewer.