Fork us on GitHub Follow us on Facebook Follow us on Twitter

Changeset 03e3029 in mainline


Ignore:
Timestamp:
2011-07-11T14:27:36Z (10 years ago)
Author:
Jan Vesely <jano.vesely@…>
Branches:
lfn, master
Children:
40c6cdf
Parents:
2a0b1dd
Message:

OHCI: Root hub: Remove process_ prefix.

File:
1 edited

Legend:

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

    r2a0b1dd r03e3029  
    168168static void create_interrupt_mask_in_instance(rh_t *instance);
    169169
    170 static int process_get_port_status_request(
     170static int get_port_status_request(
    171171    rh_t *instance, uint16_t port, usb_transfer_batch_t *request);
    172172
    173 static int process_get_hub_status_request(
     173static int get_hub_status_request(
    174174    rh_t *instance, usb_transfer_batch_t *request);
    175175
    176 static int process_get_status_request(
     176static int get_status_request(
    177177    rh_t *instance, usb_transfer_batch_t *request);
    178178
    179179
    180 static int process_get_descriptor_request(
     180static int get_descriptor_request(
    181181    rh_t *instance, usb_transfer_batch_t *request);
    182182
    183 static int process_get_configuration_request(
     183static int get_configuration_request(
    184184    rh_t *instance, usb_transfer_batch_t *request);
    185185
    186 static int process_hub_feature_set_request(rh_t *instance, uint16_t feature);
    187 
    188 static int process_hub_feature_clear_request(
     186static int hub_feature_set_request(rh_t *instance, uint16_t feature);
     187
     188static int hub_feature_clear_request(
    189189    rh_t *instance, uint16_t feature);
    190190
    191 static int process_port_feature_set_request(
     191static int port_feature_set_request(
    192192    rh_t *instance, uint16_t feature, uint16_t port);
    193193
    194 static int process_port_feature_clear_request(
     194static int port_feature_clear_request(
    195195    rh_t *instance, uint16_t feature, uint16_t port);
    196196
    197 static int process_request_with_input(
     197static int request_with_input(
    198198    rh_t *instance, usb_transfer_batch_t *request);
    199199
    200 static int process_request_with_output(
     200static int request_with_output(
    201201    rh_t *instance, usb_transfer_batch_t *request);
    202202
    203 static int process_request_without_data(
     203static int request_without_data(
    204204    rh_t *instance, usb_transfer_batch_t *request);
    205205
    206 static int process_ctrl_request(rh_t *instance, usb_transfer_batch_t *request);
    207 
    208 static int process_interrupt_mask_in_instance(
     206static int ctrl_request(rh_t *instance, usb_transfer_batch_t *request);
     207
     208static int interrupt_mask_in_instance(
    209209    rh_t *instance, usb_transfer_batch_t *request);
    210210
     
    218218 * @return Error code
    219219 */
    220 static inline int process_address_set_request(rh_t *instance, uint16_t address)
     220static inline int address_set_request(rh_t *instance, uint16_t address)
    221221        { return ENOTSUP; }
    222222
     
    270270        case USB_TRANSFER_CONTROL:
    271271                usb_log_debug("Root hub got CONTROL packet\n");
    272                 opResult = process_ctrl_request(instance, request);
     272                opResult = ctrl_request(instance, request);
    273273                usb_transfer_batch_finish_error(request, opResult);
    274274                break;
     
    283283                } else {
    284284                        usb_log_debug("Processing changes..\n");
    285                         process_interrupt_mask_in_instance(instance, request);
     285                        interrupt_mask_in_instance(instance, request);
    286286                }
    287287                break;
     
    306306        usb_log_debug("Finalizing interrupt transfer\n");
    307307        create_interrupt_mask_in_instance(instance);
    308         process_interrupt_mask_in_instance(instance,
     308        interrupt_mask_in_instance(instance,
    309309            instance->unfinished_interrupt_transfer);
    310310}
     
    404404 * @return Error code
    405405 */
    406 int process_get_port_status_request(
     406int get_port_status_request(
    407407    rh_t *instance, uint16_t port, usb_transfer_batch_t * request)
    408408{
     
    430430 * @return Error code
    431431 */
    432 int process_get_hub_status_request(
     432int get_hub_status_request(
    433433    rh_t *instance, usb_transfer_batch_t *request)
    434434{
     
    452452 * @return error code
    453453 */
    454 int process_get_status_request(rh_t *instance, usb_transfer_batch_t *request)
     454int get_status_request(rh_t *instance, usb_transfer_batch_t *request)
    455455{
    456456        assert(instance);
     
    469469
    470470        if (request_type == USB_HUB_REQ_TYPE_GET_HUB_STATUS)
    471                 return process_get_hub_status_request(instance, request);
     471                return get_hub_status_request(instance, request);
    472472        if (request_type == USB_HUB_REQ_TYPE_GET_PORT_STATUS)
    473                 return process_get_port_status_request(instance,
     473                return get_port_status_request(instance,
    474474                    request_packet->index, request);
    475475
     
    491491        assert(instance);
    492492
    493         uint8_t * bitmap = (uint8_t*) (instance->interrupt_buffer);
     493        uint8_t * bitmap = instance->interrupt_buffer;
    494494        uint32_t mask = (1 << (USB_HUB_FEATURE_C_HUB_LOCAL_POWER + 16))
    495495            | (1 << (USB_HUB_FEATURE_C_HUB_OVER_CURRENT + 16));
     
    517517 * @return Error code
    518518 */
    519 int process_get_descriptor_request(
     519int get_descriptor_request(
    520520    rh_t *instance, usb_transfer_batch_t *request)
    521521{
     
    591591 * @return Error code
    592592 */
    593 int process_get_configuration_request(
     593int get_configuration_request(
    594594    rh_t *instance, usb_transfer_batch_t *request)
    595595{
     
    611611 * @return error code
    612612 */
    613 static int process_hub_feature_set_request(rh_t *instance,
     613static int hub_feature_set_request(rh_t *instance,
    614614    uint16_t feature) {
    615615        if (!((1 << feature) & hub_set_feature_valid_mask))
     
    631631 * @return error code
    632632 */
    633 int process_hub_feature_clear_request(rh_t *instance, uint16_t feature)
     633int hub_feature_clear_request(rh_t *instance, uint16_t feature)
    634634{
    635635        assert(instance);
     
    662662 * @return error code
    663663 */
    664 int process_port_feature_set_request(
     664int port_feature_set_request(
    665665    rh_t *instance, uint16_t feature, uint16_t port)
    666666{
     
    687687 * @return error code
    688688 */
    689 int process_port_feature_clear_request(
     689int port_feature_clear_request(
    690690    rh_t *instance, uint16_t feature, uint16_t port)
    691691{
     
    720720 * @return error code
    721721 */
    722 int process_request_with_output(rh_t *instance, usb_transfer_batch_t *request)
     722int request_with_output(rh_t *instance, usb_transfer_batch_t *request)
    723723{
    724724        assert(instance);
     
    731731        case USB_DEVREQ_GET_STATUS:
    732732                usb_log_debug("USB_DEVREQ_GET_STATUS\n");
    733                 return process_get_status_request(instance, request);
     733                return get_status_request(instance, request);
    734734        case USB_DEVREQ_GET_DESCRIPTOR:
    735735                usb_log_debug("USB_DEVREQ_GET_DESCRIPTOR\n");
    736                 return process_get_descriptor_request(instance, request);
     736                return get_descriptor_request(instance, request);
    737737        case USB_DEVREQ_GET_CONFIGURATION:
    738738                usb_log_debug("USB_DEVREQ_GET_CONFIGURATION\n");
    739                 return process_get_configuration_request(instance, request);
     739                return get_configuration_request(instance, request);
    740740        }
    741741        return ENOTSUP;
     
    751751 * @return error code
    752752 */
    753 int process_request_with_input(rh_t *instance, usb_transfer_batch_t *request)
     753int request_with_input(rh_t *instance, usb_transfer_batch_t *request)
    754754{
    755755        assert(instance);
     
    777777 * @return error code
    778778 */
    779 int process_request_without_data(rh_t *instance, usb_transfer_batch_t *request)
     779int request_without_data(rh_t *instance, usb_transfer_batch_t *request)
    780780{
    781781        assert(instance);
     
    791791                if (request_type == USB_HUB_REQ_TYPE_SET_HUB_FEATURE) {
    792792                        usb_log_debug("USB_HUB_REQ_TYPE_SET_HUB_FEATURE\n");
    793                         return process_hub_feature_clear_request(instance,
     793                        return hub_feature_clear_request(instance,
    794794                            setup_request->value);
    795795                }
    796796                if (request_type == USB_HUB_REQ_TYPE_SET_PORT_FEATURE) {
    797797                        usb_log_debug("USB_HUB_REQ_TYPE_SET_PORT_FEATURE\n");
    798                         return process_port_feature_clear_request(instance,
     798                        return port_feature_clear_request(instance,
    799799                            setup_request->value, setup_request->index);
    800800                }
     
    806806                if (request_type == USB_HUB_REQ_TYPE_SET_HUB_FEATURE) {
    807807                        usb_log_debug("USB_HUB_REQ_TYPE_SET_HUB_FEATURE\n");
    808                         return process_hub_feature_set_request(instance,
     808                        return hub_feature_set_request(instance,
    809809                            setup_request->value);
    810810                }
    811811                if (request_type == USB_HUB_REQ_TYPE_SET_PORT_FEATURE) {
    812812                        usb_log_debug("USB_HUB_REQ_TYPE_SET_PORT_FEATURE\n");
    813                         return process_port_feature_set_request(instance,
     813                        return port_feature_set_request(instance,
    814814                            setup_request->value, setup_request->index);
    815815                }
     
    820820        case USB_DEVREQ_SET_ADDRESS:
    821821                usb_log_debug("USB_DEVREQ_SET_ADDRESS\n");
    822                 return process_address_set_request(instance,
     822                return address_set_request(instance,
    823823                    setup_request->value);
    824824
     
    848848 * @return error code
    849849 */
    850 int process_ctrl_request(rh_t *instance, usb_transfer_batch_t *request)
     850int ctrl_request(rh_t *instance, usb_transfer_batch_t *request)
    851851{
    852852        assert(instance);
     
    871871        case USB_DEVREQ_GET_CONFIGURATION:
    872872                usb_log_debug2("Processing request with output\n");
    873                 return process_request_with_output(instance, request);
     873                return request_with_output(instance, request);
    874874        case USB_DEVREQ_CLEAR_FEATURE:
    875875        case USB_DEVREQ_SET_FEATURE:
     
    877877                usb_log_debug2("Processing request without "
    878878                    "additional data\n");
    879                 return process_request_without_data(instance, request);
     879                return request_without_data(instance, request);
    880880        case USB_DEVREQ_SET_DESCRIPTOR:
    881881        case USB_DEVREQ_SET_CONFIGURATION:
    882882                usb_log_debug2("Processing request with input\n");
    883                 return process_request_with_input(instance, request);
     883                return request_with_input(instance, request);
    884884        default:
    885885                usb_log_error("Received unsupported request: %d.\n",
     
    902902 * @return
    903903 */
    904 int process_interrupt_mask_in_instance(
     904int interrupt_mask_in_instance(
    905905    rh_t *instance, usb_transfer_batch_t *request)
    906906{
Note: See TracChangeset for help on using the changeset viewer.