Changes in uspace/drv/vhc/hc.c [13101d06:0b31409] in mainline


Ignore:
File:
1 edited

Legend:

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

    r13101d06 r0b31409  
    2727 */
    2828
    29 /** @addtogroup usb
     29/** @addtogroup drvusbvhc
    3030 * @{
    3131 */
     
    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.