aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/usb/renesas_usbhs/mod_host.c
diff options
context:
space:
mode:
authorKuninori Morimoto <kuninori.morimoto.gx@renesas.com>2011-12-08 21:31:53 -0500
committerFelipe Balbi <balbi@ti.com>2011-12-13 06:06:30 -0500
commit15a3838b101b292c2e40824d843a4d8871ac4010 (patch)
treee8d02869cd1ce339076031da685a7af8b2ad668c /drivers/usb/renesas_usbhs/mod_host.c
parent2d833faad260ad074fb1ed0a378f4ccd1b8025b8 (diff)
usb: renesas_usbhs: show error reason on usbhsh_urb_enqueu()
Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> Signed-off-by: Felipe Balbi <balbi@ti.com>
Diffstat (limited to 'drivers/usb/renesas_usbhs/mod_host.c')
-rw-r--r--drivers/usb/renesas_usbhs/mod_host.c14
1 files changed, 11 insertions, 3 deletions
diff --git a/drivers/usb/renesas_usbhs/mod_host.c b/drivers/usb/renesas_usbhs/mod_host.c
index 92dcc7e64630..aa50eaaffcb6 100644
--- a/drivers/usb/renesas_usbhs/mod_host.c
+++ b/drivers/usb/renesas_usbhs/mod_host.c
@@ -949,12 +949,15 @@ static int usbhsh_urb_enqueue(struct usb_hcd *hcd,
949 949
950 if (!usbhsh_is_running(hpriv)) { 950 if (!usbhsh_is_running(hpriv)) {
951 ret = -EIO; 951 ret = -EIO;
952 dev_err(dev, "host is not running\n");
952 goto usbhsh_urb_enqueue_error_not_linked; 953 goto usbhsh_urb_enqueue_error_not_linked;
953 } 954 }
954 955
955 ret = usb_hcd_link_urb_to_ep(hcd, urb); 956 ret = usb_hcd_link_urb_to_ep(hcd, urb);
956 if (ret) 957 if (ret) {
958 dev_err(dev, "urb link failed\n");
957 goto usbhsh_urb_enqueue_error_not_linked; 959 goto usbhsh_urb_enqueue_error_not_linked;
960 }
958 961
959 /* 962 /*
960 * attach udev if needed 963 * attach udev if needed
@@ -964,6 +967,7 @@ static int usbhsh_urb_enqueue(struct usb_hcd *hcd,
964 new_udev = usbhsh_device_attach(hpriv, urb); 967 new_udev = usbhsh_device_attach(hpriv, urb);
965 if (!new_udev) { 968 if (!new_udev) {
966 ret = -EIO; 969 ret = -EIO;
970 dev_err(dev, "device attach failed\n");
967 goto usbhsh_urb_enqueue_error_not_linked; 971 goto usbhsh_urb_enqueue_error_not_linked;
968 } 972 }
969 } 973 }
@@ -974,8 +978,10 @@ static int usbhsh_urb_enqueue(struct usb_hcd *hcd,
974 */ 978 */
975 if (!usbhsh_ep_to_uep(ep)) { 979 if (!usbhsh_ep_to_uep(ep)) {
976 ret = usbhsh_endpoint_attach(hpriv, urb, mem_flags); 980 ret = usbhsh_endpoint_attach(hpriv, urb, mem_flags);
977 if (ret < 0) 981 if (ret < 0) {
982 dev_err(dev, "endpoint attach failed\n");
978 goto usbhsh_urb_enqueue_error_free_device; 983 goto usbhsh_urb_enqueue_error_free_device;
984 }
979 } 985 }
980 986
981 /* 987 /*
@@ -989,8 +995,10 @@ static int usbhsh_urb_enqueue(struct usb_hcd *hcd,
989 else 995 else
990 break; 996 break;
991 } 997 }
992 if (ret < 0) 998 if (ret < 0) {
999 dev_err(dev, "pipe attach failed\n");
993 goto usbhsh_urb_enqueue_error_free_endpoint; 1000 goto usbhsh_urb_enqueue_error_free_endpoint;
1001 }
994 1002
995 /* 1003 /*
996 * push packet 1004 * push packet