Changeset 5f57929 in mainline for uspace/drv/bus/usb/ohci/ohci_batch.c
- Timestamp:
- 2011-09-01T00:08:44Z (13 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 0f1586d0
- Parents:
- 7bce1fc
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/drv/bus/usb/ohci/ohci_batch.c
r7bce1fc r5f57929 147 147 /** Check batch TDs' status. 148 148 * 149 * @param[in] instanceBatch structure to use.149 * @param[in] ohci_batch Batch structure to use. 150 150 * @return False, if there is an active TD, true otherwise. 151 151 * … … 213 213 /** Starts execution of the TD list 214 214 * 215 * @param[in] instanceBatch structure to use215 * @param[in] ohci_batch Batch structure to use 216 216 */ 217 217 void ohci_transfer_batch_commit(ohci_transfer_batch_t *ohci_batch) … … 223 223 /** Prepare generic control transfer 224 224 * 225 * @param[in] instanceBatch structure to use.225 * @param[in] ohci_batch Batch structure to use. 226 226 * @param[in] data_dir Direction to use for data stage. 227 227 * @param[in] status_dir Direction to use for status stage. … … 289 289 } 290 290 /*----------------------------------------------------------------------------*/ 291 #define LOG_BATCH_INITIALIZED(batch, name, dir) \292 usb_log_debug2("Batch %p %s %s " USB_TRANSFER_BATCH_FMT " initialized.\n", \293 (batch), (name), (dir), USB_TRANSFER_BATCH_ARGS(*(batch)))294 295 291 /** Prepare generic data transfer 296 292 * 297 * @param[in] instanceBatch structure to use.293 * @param[in] ohci_batch Batch structure to use. 298 294 * 299 295 * Direction is supplied by the associated ep and toggle is maintained by the … … 330 326 ++td_current; 331 327 } 332 LOG_BATCH_INITIALIZED(ohci_batch->usb_batch, 328 usb_log_debug2( 329 "Batch %p %s %s " USB_TRANSFER_BATCH_FMT " initialized.\n", \ 330 ohci_batch->usb_batch, 333 331 usb_str_transfer_type(ohci_batch->usb_batch->ep->transfer_type), 334 usb_str_direction(ohci_batch->usb_batch->ep->direction)); 332 usb_str_direction(ohci_batch->usb_batch->ep->direction), 333 USB_TRANSFER_BATCH_ARGS(*ohci_batch->usb_batch)); 335 334 } 336 335 /*----------------------------------------------------------------------------*/ … … 338 337 { 339 338 // TODO Find a better way to do this 339 /* Check first bit of the first setup request byte 340 * (it signals hc-> dev or dev->hc communication) */ 341 const char *direction; 340 342 if (ohci_batch->device_buffer[0] & (1 << 7)) { 341 343 batch_control(ohci_batch, USB_DIRECTION_IN, USB_DIRECTION_OUT); 342 LOG_BATCH_INITIALIZED(ohci_batch->usb_batch, "control", "write");344 direction = "read"; 343 345 } else { 344 346 batch_control(ohci_batch, USB_DIRECTION_OUT, USB_DIRECTION_IN); 345 LOG_BATCH_INITIALIZED(ohci_batch->usb_batch, "control", "write"); 346 } 347 direction = "write"; 348 } 349 usb_log_debug2( 350 "Batch %p %s %s " USB_TRANSFER_BATCH_FMT " initialized.\n", \ 351 ohci_batch->usb_batch, 352 usb_str_transfer_type(ohci_batch->usb_batch->ep->transfer_type), 353 direction, USB_TRANSFER_BATCH_ARGS(*ohci_batch->usb_batch)); 347 354 } 348 355 /*----------------------------------------------------------------------------*/
Note:
See TracChangeset
for help on using the changeset viewer.