Changeset bbc7d83e in mainline for uspace/drv/vhc/hc.c


Ignore:
Timestamp:
2011-02-01T21:59:43Z (14 years ago)
Author:
Vojtech Horky <vojtechhorky@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
a4a8cca
Parents:
0a37e14 (diff), ec293a8 (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 development/ changes

File:
1 edited

Legend:

Unmodified
Added
Removed
  • uspace/drv/vhc/hc.c

    r0a37e14 rbbc7d83e  
    9292    usb_transaction_outcome_t outcome)
    9393{
    94         dprintf(3, "transaction " TRANSACTION_FORMAT " done, outcome: %s",
     94        usb_log_debug2("Transaction " TRANSACTION_FORMAT " done: %s.\n",
    9595            TRANSACTION_PRINTF(*transaction),
    9696            usb_str_transaction_outcome(outcome));
     
    108108        static unsigned int seed = 4573;
    109109       
    110         printf("%s: transaction processor ready.\n", NAME);
     110        usb_log_info("Transaction processor ready.\n");
    111111       
    112112        while (true) {
     
    125125                list_remove(first_transaction_link);
    126126               
    127 
    128                 dprintf(0, "about to process " TRANSACTION_FORMAT " [%s]",
     127                usb_log_debug("Processing " TRANSACTION_FORMAT " [%s].\n",
    129128                    TRANSACTION_PRINTF(*transaction), ports);
    130129
    131                 dprintf(3, "processing transaction " TRANSACTION_FORMAT "",
    132                     TRANSACTION_PRINTF(*transaction));
    133                
    134130                usb_transaction_outcome_t outcome;
    135131                outcome = virtdev_send_to_all(transaction);
     
    148144        fid_t fid = fibril_create(hc_manager_fibril, NULL);
    149145        if (fid == 0) {
    150                 printf(NAME ": failed to start HC manager fibril\n");
     146                usb_log_fatal("Failed to start HC manager fibril.\n");
    151147                return;
    152148        }
     
    172168        transaction->callback = callback;
    173169        transaction->callback_arg = arg;
    174        
    175         dprintf(3, "creating transaction " TRANSACTION_FORMAT,
     170
     171        return transaction;
     172}
     173
     174static void hc_add_transaction(transaction_t *transaction)
     175{
     176        usb_log_debug("Adding transaction " TRANSACTION_FORMAT ".\n",
    176177            TRANSACTION_PRINTF(*transaction));
    177        
    178         return transaction;
     178        list_append(&transaction->link, &transaction_list);
    179179}
    180180
     
    190190            target, transfer_type,
    191191            buffer, len, callback, arg);
    192         list_append(&transaction->link, &transaction_list);
     192        hc_add_transaction(transaction);
    193193}
    194194
     
    203203            target, transfer_type,
    204204            buffer, len, callback, arg);
    205         list_append(&transaction->link, &transaction_list);
     205        hc_add_transaction(transaction);
    206206}
    207207
Note: See TracChangeset for help on using the changeset viewer.