Commit 15a3838b authored by Kuninori Morimoto's avatar Kuninori Morimoto Committed by Felipe Balbi

usb: renesas_usbhs: show error reason on usbhsh_urb_enqueu()

Signed-off-by: default avatarKuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Signed-off-by: default avatarFelipe Balbi <balbi@ti.com>
parent 2d833faa
...@@ -949,12 +949,15 @@ static int usbhsh_urb_enqueue(struct usb_hcd *hcd, ...@@ -949,12 +949,15 @@ static int usbhsh_urb_enqueue(struct usb_hcd *hcd,
if (!usbhsh_is_running(hpriv)) { if (!usbhsh_is_running(hpriv)) {
ret = -EIO; ret = -EIO;
dev_err(dev, "host is not running\n");
goto usbhsh_urb_enqueue_error_not_linked; goto usbhsh_urb_enqueue_error_not_linked;
} }
ret = usb_hcd_link_urb_to_ep(hcd, urb); 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; goto usbhsh_urb_enqueue_error_not_linked;
}
/* /*
* attach udev if needed * attach udev if needed
...@@ -964,6 +967,7 @@ static int usbhsh_urb_enqueue(struct usb_hcd *hcd, ...@@ -964,6 +967,7 @@ static int usbhsh_urb_enqueue(struct usb_hcd *hcd,
new_udev = usbhsh_device_attach(hpriv, urb); new_udev = usbhsh_device_attach(hpriv, urb);
if (!new_udev) { if (!new_udev) {
ret = -EIO; ret = -EIO;
dev_err(dev, "device attach failed\n");
goto usbhsh_urb_enqueue_error_not_linked; goto usbhsh_urb_enqueue_error_not_linked;
} }
} }
...@@ -974,8 +978,10 @@ static int usbhsh_urb_enqueue(struct usb_hcd *hcd, ...@@ -974,8 +978,10 @@ static int usbhsh_urb_enqueue(struct usb_hcd *hcd,
*/ */
if (!usbhsh_ep_to_uep(ep)) { if (!usbhsh_ep_to_uep(ep)) {
ret = usbhsh_endpoint_attach(hpriv, urb, mem_flags); 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; goto usbhsh_urb_enqueue_error_free_device;
}
} }
/* /*
...@@ -989,8 +995,10 @@ static int usbhsh_urb_enqueue(struct usb_hcd *hcd, ...@@ -989,8 +995,10 @@ static int usbhsh_urb_enqueue(struct usb_hcd *hcd,
else else
break; break;
} }
if (ret < 0) if (ret < 0) {
dev_err(dev, "pipe attach failed\n");
goto usbhsh_urb_enqueue_error_free_endpoint; goto usbhsh_urb_enqueue_error_free_endpoint;
}
/* /*
* push packet * push packet
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment