Changes in uspace/drv/vhc/hc.c [e63a4e1:daec5e04] in mainline
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/drv/vhc/hc.c
re63a4e1 rdaec5e04 27 27 */ 28 28 29 /** @addtogroup usb29 /** @addtogroup drvusbvhc 30 30 * @{ 31 31 */ … … 34 34 */ 35 35 36 #include <ipc/ipc.h>37 36 #include <adt/list.h> 38 37 #include <bool.h> … … 90 89 */ 91 90 static void process_transaction_with_outcome(transaction_t * transaction, 92 usb_transaction_outcome_t outcome)93 { 94 dprintf(3, "transaction " TRANSACTION_FORMAT " done, outcome: %s",91 int outcome) 92 { 93 usb_log_debug2("Transaction " TRANSACTION_FORMAT " done: %s.\n", 95 94 TRANSACTION_PRINTF(*transaction), 96 usb_str_transaction_outcome(outcome));97 98 transaction->callback(transaction->buffer, transaction-> len, outcome,99 transaction->callback_arg);95 str_error(outcome)); 96 97 transaction->callback(transaction->buffer, transaction->actual_len, 98 outcome, transaction->callback_arg); 100 99 } 101 100 … … 108 107 static unsigned int seed = 4573; 109 108 110 printf("%s: transaction processor ready.\n", NAME);109 usb_log_info("Transaction processor ready.\n"); 111 110 112 111 while (true) { … … 125 124 list_remove(first_transaction_link); 126 125 127 128 dprintf(0, "about to process " TRANSACTION_FORMAT " [%s]", 126 usb_log_debug("Processing " TRANSACTION_FORMAT " [%s].\n", 129 127 TRANSACTION_PRINTF(*transaction), ports); 130 128 131 dprintf(3, "processing transaction " TRANSACTION_FORMAT "", 132 TRANSACTION_PRINTF(*transaction)); 133 134 usb_transaction_outcome_t outcome; 129 int outcome; 135 130 outcome = virtdev_send_to_all(transaction); 136 131 … … 148 143 fid_t fid = fibril_create(hc_manager_fibril, NULL); 149 144 if (fid == 0) { 150 printf(NAME ": failed to start HC manager fibril\n");145 usb_log_fatal("Failed to start HC manager fibril.\n"); 151 146 return; 152 147 } … … 169 164 transaction->buffer = buffer; 170 165 transaction->len = len; 166 transaction->actual_len = len; 171 167 transaction->callback = callback; 172 168 transaction->callback_arg = arg; 173 174 dprintf(3, "creating transaction " TRANSACTION_FORMAT, 169 170 return transaction; 171 } 172 173 static void hc_add_transaction(transaction_t *transaction) 174 { 175 usb_log_debug("Adding transaction " TRANSACTION_FORMAT ".\n", 175 176 TRANSACTION_PRINTF(*transaction)); 176 177 return transaction; 177 list_append(&transaction->link, &transaction_list); 178 178 } 179 179 … … 189 189 target, transfer_type, 190 190 buffer, len, callback, arg); 191 list_append(&transaction->link, &transaction_list);191 hc_add_transaction(transaction); 192 192 } 193 193 … … 202 202 target, transfer_type, 203 203 buffer, len, callback, arg); 204 list_append(&transaction->link, &transaction_list);204 hc_add_transaction(transaction); 205 205 } 206 206
Note:
See TracChangeset
for help on using the changeset viewer.