summaryrefslogtreecommitdiff
path: root/drivers/usb/renesas_usbhs
diff options
context:
space:
mode:
authorKuninori Morimoto <kuninori.morimoto.gx@renesas.com>2011-12-09 06:31:53 +0400
committerFelipe Balbi <balbi@ti.com>2011-12-13 15:06:30 +0400
commit15a3838b101b292c2e40824d843a4d8871ac4010 (patch)
treee8d02869cd1ce339076031da685a7af8b2ad668c /drivers/usb/renesas_usbhs
parent2d833faad260ad074fb1ed0a378f4ccd1b8025b8 (diff)
downloadlinux-15a3838b101b292c2e40824d843a4d8871ac4010.tar.xz
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')
-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,
if (!usbhsh_is_running(hpriv)) {
ret = -EIO;
+ dev_err(dev, "host is not running\n");
goto usbhsh_urb_enqueue_error_not_linked;
}
ret = usb_hcd_link_urb_to_ep(hcd, urb);
- if (ret)
+ if (ret) {
+ dev_err(dev, "urb link failed\n");
goto usbhsh_urb_enqueue_error_not_linked;
+ }
/*
* attach udev if needed
@@ -964,6 +967,7 @@ static int usbhsh_urb_enqueue(struct usb_hcd *hcd,
new_udev = usbhsh_device_attach(hpriv, urb);
if (!new_udev) {
ret = -EIO;
+ dev_err(dev, "device attach failed\n");
goto usbhsh_urb_enqueue_error_not_linked;
}
}
@@ -974,8 +978,10 @@ static int usbhsh_urb_enqueue(struct usb_hcd *hcd,
*/
if (!usbhsh_ep_to_uep(ep)) {
ret = usbhsh_endpoint_attach(hpriv, urb, mem_flags);
- if (ret < 0)
+ if (ret < 0) {
+ dev_err(dev, "endpoint attach failed\n");
goto usbhsh_urb_enqueue_error_free_device;
+ }
}
/*
@@ -989,8 +995,10 @@ static int usbhsh_urb_enqueue(struct usb_hcd *hcd,
else
break;
}
- if (ret < 0)
+ if (ret < 0) {
+ dev_err(dev, "pipe attach failed\n");
goto usbhsh_urb_enqueue_error_free_endpoint;
+ }
/*
* push packet