summaryrefslogtreecommitdiff
path: root/drivers
diff options
context:
space:
mode:
authorTom Rini <[email protected]>2020-05-30 20:11:06 -0400
committerTom Rini <[email protected]>2020-05-30 20:11:06 -0400
commit8309157ff18b969c63ab5fd5a5db5215f48942ff (patch)
tree46b523a3ffc8dde182a79ecd2e42be74cb27cda4 /drivers
parenta08e0a28ebe23adf6dcd7533acb196058f6c421a (diff)
parent73021d11d4d53cddaa2b1c8e0bd6eb3c79dc7fdc (diff)
Merge https://gitlab.denx.de/u-boot/custodians/u-boot-usb
- ehci-mx6, eth/r8152 bugfixes
Diffstat (limited to 'drivers')
-rw-r--r--drivers/usb/eth/r8152.c14
-rw-r--r--drivers/usb/host/ehci-mx6.c8
2 files changed, 12 insertions, 10 deletions
diff --git a/drivers/usb/eth/r8152.c b/drivers/usb/eth/r8152.c
index d9908ecc156..f201a1789b6 100644
--- a/drivers/usb/eth/r8152.c
+++ b/drivers/usb/eth/r8152.c
@@ -1354,9 +1354,8 @@ int r8152_eth_probe(struct usb_device *dev, unsigned int ifnum,
struct usb_interface *iface;
struct usb_interface_descriptor *iface_desc;
int ep_in_found = 0, ep_out_found = 0;
- int i;
-
struct r8152 *tp;
+ int i;
/* let's examine the device now */
iface = &dev->config.if_desc[ifnum];
@@ -1399,10 +1398,13 @@ int r8152_eth_probe(struct usb_device *dev, unsigned int ifnum,
if ((iface->ep_desc[i].bmAttributes &
USB_ENDPOINT_XFERTYPE_MASK) == USB_ENDPOINT_XFER_BULK) {
u8 ep_addr = iface->ep_desc[i].bEndpointAddress;
- if ((ep_addr & USB_DIR_IN) && !ep_in_found) {
- ss->ep_in = ep_addr &
- USB_ENDPOINT_NUMBER_MASK;
- ep_in_found = 1;
+
+ if (ep_addr & USB_DIR_IN) {
+ if (!ep_in_found) {
+ ss->ep_in = ep_addr &
+ USB_ENDPOINT_NUMBER_MASK;
+ ep_in_found = 1;
+ }
} else {
if (!ep_out_found) {
ss->ep_out = ep_addr &
diff --git a/drivers/usb/host/ehci-mx6.c b/drivers/usb/host/ehci-mx6.c
index 24f8ad7af84..5f84c7b91d8 100644
--- a/drivers/usb/host/ehci-mx6.c
+++ b/drivers/usb/host/ehci-mx6.c
@@ -447,8 +447,8 @@ static int mx6_init_after_reset(struct ehci_ctrl *dev)
ret = regulator_set_enable(priv->vbus_supply,
(type == USB_INIT_DEVICE) ?
false : true);
- if (ret) {
- puts("Error enabling VBUS supply\n");
+ if (ret && ret != -ENOSYS) {
+ printf("Error enabling VBUS supply (ret=%i)\n", ret);
return ret;
}
}
@@ -614,8 +614,8 @@ static int ehci_usb_probe(struct udevice *dev)
ret = regulator_set_enable(priv->vbus_supply,
(type == USB_INIT_DEVICE) ?
false : true);
- if (ret) {
- puts("Error enabling VBUS supply\n");
+ if (ret && ret != -ENOSYS) {
+ printf("Error enabling VBUS supply (ret=%i)\n", ret);
return ret;
}
}