Ignore:
Timestamp:
2011-01-29T00:14:07Z (13 years ago)
Author:
Vojtech Horky <vojtechhorky@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
1431e8f
Parents:
b3258ad (diff), 44d8853 (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:

Merge parent branch

File:
1 edited

Legend:

Unmodified
Added
Removed
  • uspace/drv/uhci/uhci_struct/transfer_descriptor.c

    rb3258ad r4046c1ea  
    5252        uhci_print_verbose("Creating device field: %x.\n", instance->device);
    5353
    54         instance->buffer_ptr = (uintptr_t)addr_to_phys(buffer);
    55 
    56         uhci_print_verbose("Creating buffer field: %p(%p).\n",
    57           buffer, instance->buffer_ptr);
    58 
    5954        char buffer_dump[BUFFER_LEN];
    6055        buffer_to_str(buffer_dump, BUFFER_LEN, buffer, size);
    6156        uhci_print_verbose("Buffer dump (%zuB): %s.\n", size, buffer_dump);
    6257
     58        if (size) {
     59                instance->buffer_ptr = (uintptr_t)addr_to_phys(buffer);
     60
     61                uhci_print_verbose("Creating buffer field: %p(%p).\n",
     62                        buffer, instance->buffer_ptr);
     63        } else {
     64                instance->buffer_ptr = 0;
     65        }
     66
     67
    6368        instance->next_va = NULL;
    6469        instance->callback = NULL;
     70        uhci_print_info("Created a new TD.\n");
    6571}
    6672
     
    98104        callback_run(instance->callback,
    99105                convert_outcome(instance->status),
    100                 instance->status >> TD_STATUS_ACTLEN_POS & TD_STATUS_ACTLEN_MASK
     106                ((instance->status >> TD_STATUS_ACTLEN_POS) + 1) & TD_STATUS_ACTLEN_MASK
    101107        );
    102108}
Note: See TracChangeset for help on using the changeset viewer.