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