Changeset 5f57929 in mainline for uspace/drv/bus/usb/uhci/uhci_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/uhci/uhci_batch.c
r7bce1fc r5f57929 152 152 /** Check batch TDs for activity. 153 153 * 154 * @param[in] instanceBatch structure to use.154 * @param[in] uhci_batch Batch structure to use. 155 155 * @return False, if there is an active TD, true otherwise. 156 156 * … … 202 202 return true; 203 203 } 204 205 #define LOG_BATCH_INITIALIZED(batch, name, dir) \206 usb_log_debug2("Batch %p %s %s " USB_TRANSFER_BATCH_FMT " initialized.\n", \207 (batch), (name), (dir), USB_TRANSFER_BATCH_ARGS(*(batch)))208 209 204 /*----------------------------------------------------------------------------*/ 210 205 /** Prepare generic data transfer 211 206 * 212 * @param[in] instanceBatch structure to use.207 * @param[in] uhci_batch Batch structure to use. 213 208 * @param[in] pid Pid to use for data transactions. 214 209 * … … 261 256 td_set_ioc(&uhci_batch->tds[td - 1]); 262 257 endpoint_toggle_set(uhci_batch->usb_batch->ep, toggle); 263 LOG_BATCH_INITIALIZED(uhci_batch->usb_batch, 258 usb_log_debug2( 259 "Batch %p %s %s " USB_TRANSFER_BATCH_FMT " initialized.\n", \ 260 uhci_batch->usb_batch, 264 261 usb_str_transfer_type(uhci_batch->usb_batch->ep->transfer_type), 265 usb_str_direction(uhci_batch->usb_batch->ep->direction)); 262 usb_str_direction(uhci_batch->usb_batch->ep->direction), 263 USB_TRANSFER_BATCH_ARGS(*uhci_batch->usb_batch)); 266 264 } 267 265 /*----------------------------------------------------------------------------*/ 268 266 /** Prepare generic control transfer 269 267 * 270 * @param[in] instanceBatch structure to use.268 * @param[in] uhci_batch Batch structure to use. 271 269 * @param[in] data_stage Pid to use for data tds. 272 270 * @param[in] status_stage Pid to use for data tds. … … 341 339 /* Check first bit of the first setup request byte 342 340 * (it signals hc-> dev or dev->hc communication) */ 341 const char *direction = NULL; 343 342 if (uhci_batch->usb_batch->setup_buffer[0] & (1 << 7)) { 344 343 batch_control(uhci_batch, USB_PID_IN, USB_PID_OUT); 345 LOG_BATCH_INITIALIZED(uhci_batch->usb_batch, "control", "read");344 direction = "read"; 346 345 } else { 347 346 batch_control(uhci_batch, USB_PID_OUT, USB_PID_IN); 348 LOG_BATCH_INITIALIZED(uhci_batch->usb_batch, "control", "write"); 349 } 347 direction = "write"; 348 } 349 usb_log_debug2( 350 "Batch %p %s %s " USB_TRANSFER_BATCH_FMT " initialized.\n", \ 351 uhci_batch->usb_batch, 352 usb_str_transfer_type(uhci_batch->usb_batch->ep->transfer_type), 353 direction, USB_TRANSFER_BATCH_ARGS(*uhci_batch->usb_batch)); 350 354 } 351 355 /*----------------------------------------------------------------------------*/
Note:
See TracChangeset
for help on using the changeset viewer.