diff options
author | Mauro Carvalho Chehab <mchehab@redhat.com> | 2013-03-09 16:27:39 +0400 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@redhat.com> | 2013-03-21 14:35:49 +0400 |
commit | 4c3bdb5e2f5612ceb99ac17dbbe673b59a94d105 (patch) | |
tree | d1b66c29890be30bee9e01ce4aa839c73e253063 /drivers/media/usb/siano | |
parent | f251001c8086c8388aa7635b9fcd908b444e139c (diff) | |
download | linux-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.c | 9 |
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); |