summaryrefslogtreecommitdiff
path: root/drivers/media/usb/siano
diff options
context:
space:
mode:
authorMauro Carvalho Chehab <mchehab@redhat.com>2013-03-09 16:27:39 +0400
committerMauro Carvalho Chehab <mchehab@redhat.com>2013-03-21 14:35:49 +0400
commit4c3bdb5e2f5612ceb99ac17dbbe673b59a94d105 (patch)
treed1b66c29890be30bee9e01ce4aa839c73e253063 /drivers/media/usb/siano
parentf251001c8086c8388aa7635b9fcd908b444e139c (diff)
downloadlinux-4c3bdb5e2f5612ceb99ac17dbbe673b59a94d105.tar.xz
[media] siano: better debug send/receive messages
Instead of printing a message for some random messages, print it for all sent/received ones. That helps a lot to debug what's going on. Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Diffstat (limited to 'drivers/media/usb/siano')
-rw-r--r--drivers/media/usb/siano/smsusb.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/drivers/media/usb/siano/smsusb.c b/drivers/media/usb/siano/smsusb.c
index de2c10289eec..2050e4c415b1 100644
--- a/drivers/media/usb/siano/smsusb.c
+++ b/drivers/media/usb/siano/smsusb.c
@@ -106,6 +106,10 @@ static void smsusb_onresponse(struct urb *urb)
} else
surb->cb->offset = 0;
+ sms_debug("received %s(%d) size: %d",
+ smscore_translate_msg(phdr->msgType),
+ phdr->msgType, phdr->msgLength);
+
smscore_onresponse(dev->coredev, surb->cb);
surb->cb = NULL;
} else {
@@ -181,8 +185,13 @@ static int smsusb_start_streaming(struct smsusb_device_t *dev)
static int smsusb_sendrequest(void *context, void *buffer, size_t size)
{
struct smsusb_device_t *dev = (struct smsusb_device_t *) context;
+ struct SmsMsgHdr_ST *phdr = (struct SmsMsgHdr_ST *) buffer;
int dummy;
+ sms_debug("sending %s(%d) size: %d",
+ smscore_translate_msg(phdr->msgType), phdr->msgType,
+ phdr->msgLength);
+
smsendian_handle_message_header((struct SmsMsgHdr_ST *)buffer);
return usb_bulk_msg(dev->udev, usb_sndbulkpipe(dev->udev, 2),
buffer, size, &dummy, 1000);