Changeset 399a13c in mainline for uspace/drv/ohci/root_hub.c


Ignore:
Timestamp:
2011-05-30T13:50:33Z (14 years ago)
Author:
Jan Vesely <jano.vesely@…>
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.
Message:

Development changes

File:
1 edited

Legend:

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

    ra5fc431 r399a13c  
    5757        .device_version = 0,
    5858        .length = sizeof (usb_standard_device_descriptor_t),
    59         /// \TODO this value is guessed
    6059        .max_packet_size = 8,
    6160        .vendor_id = 0x16db,
     
    117116 */
    118117static const uint32_t hub_clear_feature_by_writing_one_mask =
    119    RHS_CLEAR_PORT_POWER;
     118    RHS_CLEAR_PORT_POWER;
    120119
    121120/**
     
    412411        request->transfered_size = 4;
    413412        uint32_t data = instance->registers->rh_port_status[port - 1];
    414         memcpy(request->data_buffer,&data,4);
     413        memcpy(request->data_buffer, &data, 4);
    415414#if 0
    416415        int i;
     
    445444        uint32_t data = mask & instance->registers->rh_status;
    446445        //uint32_buffer[0] = mask & instance->registers->rh_status;
    447         memcpy(request->data_buffer,&data,4);
     446        memcpy(request->data_buffer, &data, 4);
    448447
    449448        return EOK;
     
    468467
    469468        usb_hub_bm_request_type_t request_type = request_packet->request_type;
    470         if (buffer_size < 4/*request_packet->length*/) {///\TODO
     469        if (buffer_size < 4) {
    471470                usb_log_warning("requested more data than buffer size\n");
    472471                return EINVAL;
     
    499498            | (1 << (USB_HUB_FEATURE_C_HUB_OVER_CURRENT + 16));
    500499        bzero(bitmap, instance->interrupt_mask_size);
    501         if ((instance->registers->rh_status & mask) !=0 ) {
     500        if ((instance->registers->rh_status & mask) != 0) {
    502501                bitmap[0] = 1;
    503502        }
     
    678677            (instance->registers->rh_port_status[port - 1] | (1 << feature))
    679678            & (~port_clear_feature_valid_mask);
    680         /// \TODO any error?
    681 
    682679        return EOK;
    683680}
     
    707704            & (~port_clear_feature_valid_mask))
    708705            | (1 << feature);
    709         /// \TODO any error?
    710706
    711707        return EOK;
     
    925921 * @return
    926922 */
    927 static int process_interrupt_mask_in_instance(rh_t *instance, usb_transfer_batch_t * request) {
     923static int process_interrupt_mask_in_instance(rh_t *instance,
     924    usb_transfer_batch_t * request) {
    928925        memcpy(request->data_buffer, instance->interrupt_buffer,
    929926            instance->interrupt_mask_size);
     
    945942 * @return
    946943 */
    947 static bool is_zeros(void * buffer, size_t size) {
     944static bool is_zeros(void *buffer, size_t size) {
    948945        if (!buffer) return true;
    949946        if (!size) return true;
Note: See TracChangeset for help on using the changeset viewer.