Changeset 090eea68 in mainline
- Timestamp:
- 2015-07-03T22:42:20Z (9 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 6de4b4a1
- Parents:
- 56b5569
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/drv/bus/usb/ehci/ehci_batch.c
r56b5569 r090eea68 72 72 free32(ehci_batch->device_buffer); 73 73 free(ehci_batch); 74 usb_log_debug2("Batch(%p): disposed", ehci_batch); 74 75 } 75 76 … … 104 105 calloc(1, sizeof(ehci_transfer_batch_t)); 105 106 if (!ehci_batch) { 106 usb_log_error("Failed to allocate EHCI batch data."); 107 usb_log_error("Batch %p: Failed to allocate EHCI batch data.", 108 usb_batch); 107 109 goto dispose; 108 110 } … … 119 121 ehci_batch->tds = calloc(ehci_batch->td_count, sizeof(td_t*)); 120 122 if (!ehci_batch->tds) { 121 usb_log_error("Failed to allocate EHCI transfer descriptors."); 123 usb_log_error("Batch %p: Failed to allocate EHCI transfer " 124 "descriptors.", usb_batch); 122 125 goto dispose; 123 126 } … … 129 132 ehci_batch->tds[i] = malloc32(sizeof(td_t)); 130 133 if (!ehci_batch->tds[i]) { 131 usb_log_error("Failed to allocate TD %d.", i); 134 usb_log_error("Batch %p: Failed to allocate TD %d.", 135 usb_batch, i); 132 136 goto dispose; 133 137 } … … 142 146 malloc32(usb_batch->setup_size + usb_batch->buffer_size); 143 147 if (!ehci_batch->device_buffer) { 144 usb_log_error("Failed to allocate device buffer"); 148 usb_log_error("Batch %p: Failed to allocate device " 149 "buffer", usb_batch); 145 150 goto dispose; 146 151 } … … 184 189 assert(ehci_batch->usb_batch); 185 190 186 usb_log_debug("Batch %p checking %zu td(s) for completion.\n",191 usb_log_debug("Batch %p: checking %zu td(s) for completion.\n", 187 192 ehci_batch->usb_batch, ehci_batch->td_count); 188 193 189 usb_log_debug2("QH: %08x:%08x:%08x:%08x:%08x:%08x.\n", 194 usb_log_debug2("Batch %p: QH: %08x:%08x:%08x:%08x:%08x:%08x.\n", 195 ehci_batch->usb_batch, 190 196 ehci_batch->qh->ep_char, ehci_batch->qh->ep_cap, 191 197 ehci_batch->qh->status, ehci_batch->qh->current, … … 206 212 for (size_t i = 0; i < ehci_batch->td_count; ++i) { 207 213 assert(ehci_batch->tds[i] != NULL); 208 usb_log_debug("TD %zu: %08x:%08x:%08x.", i, 214 usb_log_debug("Batch %p: TD %zu: %08x:%08x:%08x.", 215 ehci_batch->usb_batch, i, 209 216 ehci_batch->tds[i]->status, ehci_batch->tds[i]->next, 210 217 ehci_batch->tds[i]->alternate); … … 227 234 -= td_remain_size(ehci_batch->tds[i]); 228 235 } else { 229 usb_log_debug("Batch %p found error TD(%zu):%08x (%d). \n",236 usb_log_debug("Batch %p found error TD(%zu):%08x (%d).", 230 237 ehci_batch->usb_batch, i, 231 238 ehci_batch->tds[i]->status, … … 273 280 assert(dir == USB_DIRECTION_IN || dir == USB_DIRECTION_OUT); 274 281 275 usb_log_debug2("Control QH(%"PRIxn"): %08x:%08x:%08x:%08x:%08x:%08x", 282 usb_log_debug2("Batch %p: Control QH(%"PRIxn"): " 283 "%08x:%08x:%08x:%08x:%08x:%08x", ehci_batch->usb_batch, 276 284 addr_to_phys(ehci_batch->qh), 277 285 ehci_batch->qh->ep_char, ehci_batch->qh->ep_cap, … … 291 299 td_init(ehci_batch->tds[0], ehci_batch->tds[1], USB_DIRECTION_BOTH, 292 300 buffer, ehci_batch->usb_batch->setup_size, toggle, false); 293 usb_log_debug2("Created CONTROL SETUP TD(%"PRIxn"): %08x:%08x:%08x", 301 usb_log_debug2("Batch %p: Created CONTROL SETUP TD(%"PRIxn"): " 302 "%08x:%08x:%08x", ehci_batch->usb_batch, 294 303 addr_to_phys(ehci_batch->tds[0]), 295 304 ehci_batch->tds[0]->status, ehci_batch->tds[0]->next, … … 308 317 ehci_batch->tds[td_current + 1], data_dir, buffer, 309 318 transfer_size, toggle, false); 310 usb_log_debug2("Created CONTROL DATA TD(%"PRIxn"): %08x:%08x:%08x", 319 usb_log_debug2("Batch %p: Created CONTROL DATA TD(%"PRIxn"): " 320 "%08x:%08x:%08x", ehci_batch->usb_batch, 311 321 addr_to_phys(ehci_batch->tds[td_current]), 312 322 ehci_batch->tds[td_current]->status, … … 323 333 assert(td_current == ehci_batch->td_count - 1); 324 334 td_init(ehci_batch->tds[td_current], NULL, status_dir, NULL, 0, 1, true); 325 usb_log_debug2("Created CONTROL STATUS TD(%"PRIxn"): %08x:%08x:%08x", 335 usb_log_debug2("Batch %p: Created CONTROL STATUS TD(%"PRIxn"): " 336 "%08x:%08x:%08x", ehci_batch->usb_batch, 326 337 addr_to_phys(ehci_batch->tds[td_current]), 327 338 ehci_batch->tds[td_current]->status, … … 344 355 assert(dir == USB_DIRECTION_IN || dir == USB_DIRECTION_OUT); 345 356 346 usb_log_debug2("Control QH(%"PRIxn"): %08x:%08x:%08x:%08x:%08x:%08x", 357 usb_log_debug2("Batch %p: Data QH(%"PRIxn"): " 358 "%08x:%08x:%08x:%08x:%08x:%08x", ehci_batch->usb_batch, 347 359 addr_to_phys(ehci_batch->qh), 348 360 ehci_batch->qh->ep_char, ehci_batch->qh->ep_cap, … … 363 375 dir, buffer, transfer_size, -1, last); 364 376 365 usb_log_debug2("Created DATA TD(%"PRIxn": %08x:%08x:%08x", 377 usb_log_debug2("Batch %p: DATA TD(%"PRIxn": %08x:%08x:%08x", 378 ehci_batch->usb_batch, 366 379 addr_to_phys(ehci_batch->tds[td_current]), 367 380 ehci_batch->tds[td_current]->status,
Note:
See TracChangeset
for help on using the changeset viewer.