ret = usb_control_msg(d->udev, usb_rcvctrlpipe(d->udev, 0), operation,
USB_TYPE_VENDOR|USB_DIR_IN, addr << 1, index,
usb_buf, 6, AU6610_USB_TIMEOUT);
+
+ dvb_usb_dbg_usb_control_msg(d->udev, operation,
+ (USB_TYPE_VENDOR|USB_DIR_IN), addr << 1, index,
+ usb_buf, 6);
+
if (ret < 0)
goto error;
ret = usb_control_msg(d->udev, pipe, request, requesttype, value, index,
buf, req->data_len, CE6230_USB_TIMEOUT);
- ce6230_debug_dump(request, requesttype, value, index, buf,
- req->data_len);
+ dvb_usb_dbg_usb_control_msg(d->udev, request, requesttype, value, index,
+ buf, req->data_len);
if (ret < 0)
pr_err("%s: usb_control_msg() failed=%d\n", KBUILD_MODNAME,
#include "zl10353.h"
#include "mxl5005s.h"
-#define ce6230_debug_dump(r, t, v, i, b, l) { \
- char *direction; \
- if (t == (USB_TYPE_VENDOR | USB_DIR_OUT)) \
- direction = ">>>"; \
- else \
- direction = "<<<"; \
- pr_debug("%s: %02x %02x %02x %02x %02x %02x %02x %02x %s [%d bytes]\n", \
- __func__, t, r, v & 0xff, v >> 8, i & 0xff, i >> 8, \
- l & 0xff, l >> 8, direction, l); \
-}
-
#define CE6230_USB_TIMEOUT 1000
struct usb_req {
ret = usb_control_msg(d->udev, pipe, request, requesttype, req->value,
req->index, buf, req->size, EC168_USB_TIMEOUT);
- ec168_debug_dump(request, requesttype, req->value, req->index, buf,
- req->size);
+ dvb_usb_dbg_usb_control_msg(d->udev, request, requesttype, req->value,
+ req->index, buf, req->size);
if (ret < 0)
goto err_dealloc;
#include "dvb_usb.h"
-#define ec168_debug_dump(r, t, v, i, b, l) { \
- char *direction; \
- if (t == (USB_TYPE_VENDOR | USB_DIR_OUT)) \
- direction = ">>>"; \
- else \
- direction = "<<<"; \
- pr_debug("%s: %02x %02x %02x %02x %02x %02x %02x %02x %s\n", \
- __func__, t, r, v & 0xff, v >> 8, i & 0xff, i >> 8, \
- l & 0xff, l >> 8, direction); \
-}
-
#define EC168_USB_TIMEOUT 1000
struct ec168_req {
ret = usb_control_msg(d->udev, pipe, 0, requesttype, req->value,
req->index, buf, req->size, 1000);
+
+ dvb_usb_dbg_usb_control_msg(d->udev, 0, requesttype, req->value,
+ req->index, buf, req->size);
+
if (ret > 0)
ret = 0;
- deb_dump(0, requesttype, req->value, req->index, buf, req->size);
-
/* read request, copy returned data to return buf */
if (!ret && requesttype == (USB_TYPE_VENDOR | USB_DIR_IN))
memcpy(req->data, buf, req->size);
#include "dvb_usb.h"
-#define deb_dump(r, t, v, i, b, l) { \
- char *direction; \
- if (t == (USB_TYPE_VENDOR | USB_DIR_OUT)) \
- direction = ">>>"; \
- else \
- direction = "<<<"; \
- dev_dbg(&d->udev->dev, "%s: %02x %02x %02x %02x %02x %02x %02x %02x " \
- "%s [%d bytes]\n", __func__, t, r, v & 0xff, v >> 8, \
- i & 0xff, i >> 8, l & 0xff, l >> 8, direction, l); \
-}
-
/*
* USB commands
* (usb_control_msg() index parameter)