diff options
Diffstat (limited to 'drivers/uwb/hwa-rc.c')
-rw-r--r-- | drivers/uwb/hwa-rc.c | 30 |
1 files changed, 8 insertions, 22 deletions
diff --git a/drivers/uwb/hwa-rc.c b/drivers/uwb/hwa-rc.c index 158e98d08af9..559f8784acf3 100644 --- a/drivers/uwb/hwa-rc.c +++ b/drivers/uwb/hwa-rc.c | |||
@@ -57,9 +57,8 @@ | |||
57 | #include <linux/usb/wusb.h> | 57 | #include <linux/usb/wusb.h> |
58 | #include <linux/usb/wusb-wa.h> | 58 | #include <linux/usb/wusb-wa.h> |
59 | #include <linux/uwb.h> | 59 | #include <linux/uwb.h> |
60 | |||
60 | #include "uwb-internal.h" | 61 | #include "uwb-internal.h" |
61 | #define D_LOCAL 1 | ||
62 | #include <linux/uwb/debug.h> | ||
63 | 62 | ||
64 | /* The device uses commands and events from the WHCI specification, although | 63 | /* The device uses commands and events from the WHCI specification, although |
65 | * reporting itself as WUSB compliant. */ | 64 | * reporting itself as WUSB compliant. */ |
@@ -630,17 +629,13 @@ void hwarc_neep_cb(struct urb *urb) | |||
630 | 629 | ||
631 | switch (result = urb->status) { | 630 | switch (result = urb->status) { |
632 | case 0: | 631 | case 0: |
633 | d_printf(3, dev, "NEEP: receive stat %d, %zu bytes\n", | ||
634 | urb->status, (size_t)urb->actual_length); | ||
635 | uwb_rc_neh_grok(hwarc->uwb_rc, urb->transfer_buffer, | 632 | uwb_rc_neh_grok(hwarc->uwb_rc, urb->transfer_buffer, |
636 | urb->actual_length); | 633 | urb->actual_length); |
637 | break; | 634 | break; |
638 | case -ECONNRESET: /* Not an error, but a controlled situation; */ | 635 | case -ECONNRESET: /* Not an error, but a controlled situation; */ |
639 | case -ENOENT: /* (we killed the URB)...so, no broadcast */ | 636 | case -ENOENT: /* (we killed the URB)...so, no broadcast */ |
640 | d_printf(2, dev, "NEEP: URB reset/noent %d\n", urb->status); | ||
641 | goto out; | 637 | goto out; |
642 | case -ESHUTDOWN: /* going away! */ | 638 | case -ESHUTDOWN: /* going away! */ |
643 | d_printf(2, dev, "NEEP: URB down %d\n", urb->status); | ||
644 | goto out; | 639 | goto out; |
645 | default: /* On general errors, retry unless it gets ugly */ | 640 | default: /* On general errors, retry unless it gets ugly */ |
646 | if (edc_inc(&hwarc->neep_edc, EDC_MAX_ERRORS, | 641 | if (edc_inc(&hwarc->neep_edc, EDC_MAX_ERRORS, |
@@ -649,7 +644,6 @@ void hwarc_neep_cb(struct urb *urb) | |||
649 | dev_err(dev, "NEEP: URB error %d\n", urb->status); | 644 | dev_err(dev, "NEEP: URB error %d\n", urb->status); |
650 | } | 645 | } |
651 | result = usb_submit_urb(urb, GFP_ATOMIC); | 646 | result = usb_submit_urb(urb, GFP_ATOMIC); |
652 | d_printf(3, dev, "NEEP: submit %d\n", result); | ||
653 | if (result < 0) { | 647 | if (result < 0) { |
654 | dev_err(dev, "NEEP: Can't resubmit URB (%d) resetting device\n", | 648 | dev_err(dev, "NEEP: Can't resubmit URB (%d) resetting device\n", |
655 | result); | 649 | result); |
@@ -758,11 +752,11 @@ static int hwarc_get_version(struct uwb_rc *rc) | |||
758 | itr_size = le16_to_cpu(usb_dev->actconfig->desc.wTotalLength); | 752 | itr_size = le16_to_cpu(usb_dev->actconfig->desc.wTotalLength); |
759 | while (itr_size >= sizeof(*hdr)) { | 753 | while (itr_size >= sizeof(*hdr)) { |
760 | hdr = (struct usb_descriptor_header *) itr; | 754 | hdr = (struct usb_descriptor_header *) itr; |
761 | d_printf(3, dev, "Extra device descriptor: " | 755 | dev_dbg(dev, "Extra device descriptor: " |
762 | "type %02x/%u bytes @ %zu (%zu left)\n", | 756 | "type %02x/%u bytes @ %zu (%zu left)\n", |
763 | hdr->bDescriptorType, hdr->bLength, | 757 | hdr->bDescriptorType, hdr->bLength, |
764 | (itr - usb_dev->rawdescriptors[actconfig_idx]), | 758 | (itr - usb_dev->rawdescriptors[actconfig_idx]), |
765 | itr_size); | 759 | itr_size); |
766 | if (hdr->bDescriptorType == USB_DT_CS_RADIO_CONTROL) | 760 | if (hdr->bDescriptorType == USB_DT_CS_RADIO_CONTROL) |
767 | goto found; | 761 | goto found; |
768 | itr += hdr->bLength; | 762 | itr += hdr->bLength; |
@@ -794,8 +788,7 @@ found: | |||
794 | goto error; | 788 | goto error; |
795 | } | 789 | } |
796 | rc->version = version; | 790 | rc->version = version; |
797 | d_printf(3, dev, "Device supports WUSB protocol version 0x%04x \n", | 791 | dev_dbg(dev, "Device supports WUSB protocol version 0x%04x \n", rc->version); |
798 | rc->version); | ||
799 | result = 0; | 792 | result = 0; |
800 | error: | 793 | error: |
801 | return result; | 794 | return result; |
@@ -876,7 +869,6 @@ static void hwarc_disconnect(struct usb_interface *iface) | |||
876 | uwb_rc_rm(uwb_rc); | 869 | uwb_rc_rm(uwb_rc); |
877 | usb_put_intf(hwarc->usb_iface); | 870 | usb_put_intf(hwarc->usb_iface); |
878 | usb_put_dev(hwarc->usb_dev); | 871 | usb_put_dev(hwarc->usb_dev); |
879 | d_printf(1, &hwarc->usb_iface->dev, "freed hwarc %p\n", hwarc); | ||
880 | kfree(hwarc); | 872 | kfree(hwarc); |
881 | uwb_rc_put(uwb_rc); /* when creating the device, refcount = 1 */ | 873 | uwb_rc_put(uwb_rc); /* when creating the device, refcount = 1 */ |
882 | } | 874 | } |
@@ -924,13 +916,7 @@ static struct usb_driver hwarc_driver = { | |||
924 | 916 | ||
925 | static int __init hwarc_driver_init(void) | 917 | static int __init hwarc_driver_init(void) |
926 | { | 918 | { |
927 | int result; | 919 | return usb_register(&hwarc_driver); |
928 | result = usb_register(&hwarc_driver); | ||
929 | if (result < 0) | ||
930 | printk(KERN_ERR "HWA-RC: Cannot register USB driver: %d\n", | ||
931 | result); | ||
932 | return result; | ||
933 | |||
934 | } | 920 | } |
935 | module_init(hwarc_driver_init); | 921 | module_init(hwarc_driver_init); |
936 | 922 | ||