Fork us on GitHub Follow us on Facebook Follow us on Twitter

Changeset 5f57929 in mainline


Ignore:
Timestamp:
2011-09-01T00:08:44Z (10 years ago)
Author:
Jan Vesely <jano.vesely@…>
Branches:
lfn, master
Children:
0f1586d0
Parents:
7bce1fc
Message:

uhci,ohci: remove logging macro

Location:
uspace/drv/bus/usb
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • uspace/drv/bus/usb/ohci/ohci_batch.c

    r7bce1fc r5f57929  
    147147/** Check batch TDs' status.
    148148 *
    149  * @param[in] instance Batch structure to use.
     149 * @param[in] ohci_batch Batch structure to use.
    150150 * @return False, if there is an active TD, true otherwise.
    151151 *
     
    213213/** Starts execution of the TD list
    214214 *
    215  * @param[in] instance Batch structure to use
     215 * @param[in] ohci_batch Batch structure to use
    216216 */
    217217void ohci_transfer_batch_commit(ohci_transfer_batch_t *ohci_batch)
     
    223223/** Prepare generic control transfer
    224224 *
    225  * @param[in] instance Batch structure to use.
     225 * @param[in] ohci_batch Batch structure to use.
    226226 * @param[in] data_dir Direction to use for data stage.
    227227 * @param[in] status_dir Direction to use for status stage.
     
    289289}
    290290/*----------------------------------------------------------------------------*/
    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 
    295291/** Prepare generic data transfer
    296292 *
    297  * @param[in] instance Batch structure to use.
     293 * @param[in] ohci_batch Batch structure to use.
    298294 *
    299295 * Direction is supplied by the associated ep and toggle is maintained by the
     
    330326                ++td_current;
    331327        }
    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,
    333331            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));
    335334}
    336335/*----------------------------------------------------------------------------*/
     
    338337{
    339338        // 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;
    340342        if (ohci_batch->device_buffer[0] & (1 << 7)) {
    341343                batch_control(ohci_batch, USB_DIRECTION_IN, USB_DIRECTION_OUT);
    342                 LOG_BATCH_INITIALIZED(ohci_batch->usb_batch, "control", "write");
     344                direction = "read";
    343345        } else {
    344346                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));
    347354}
    348355/*----------------------------------------------------------------------------*/
  • uspace/drv/bus/usb/uhci/uhci_batch.c

    r7bce1fc r5f57929  
    152152/** Check batch TDs for activity.
    153153 *
    154  * @param[in] instance Batch structure to use.
     154 * @param[in] uhci_batch Batch structure to use.
    155155 * @return False, if there is an active TD, true otherwise.
    156156 *
     
    202202        return true;
    203203}
    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 
    209204/*----------------------------------------------------------------------------*/
    210205/** Prepare generic data transfer
    211206 *
    212  * @param[in] instance Batch structure to use.
     207 * @param[in] uhci_batch Batch structure to use.
    213208 * @param[in] pid Pid to use for data transactions.
    214209 *
     
    261256        td_set_ioc(&uhci_batch->tds[td - 1]);
    262257        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,
    264261            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));
    266264}
    267265/*----------------------------------------------------------------------------*/
    268266/** Prepare generic control transfer
    269267 *
    270  * @param[in] instance Batch structure to use.
     268 * @param[in] uhci_batch Batch structure to use.
    271269 * @param[in] data_stage Pid to use for data tds.
    272270 * @param[in] status_stage Pid to use for data tds.
     
    341339        /* Check first bit of the first setup request byte
    342340         * (it signals hc-> dev or dev->hc communication) */
     341        const char *direction = NULL;
    343342        if (uhci_batch->usb_batch->setup_buffer[0] & (1 << 7)) {
    344343                batch_control(uhci_batch, USB_PID_IN, USB_PID_OUT);
    345                 LOG_BATCH_INITIALIZED(uhci_batch->usb_batch, "control", "read");
     344                direction = "read";
    346345        } else {
    347346                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));
    350354}
    351355/*----------------------------------------------------------------------------*/
Note: See TracChangeset for help on using the changeset viewer.