- ehci-mx6, eth/r8152 bugfixes
This commit is contained in:
Tom Rini 2020-05-30 20:11:06 -04:00
commit 8309157ff1
2 changed files with 12 additions and 10 deletions

View file

@ -1354,9 +1354,8 @@ int r8152_eth_probe(struct usb_device *dev, unsigned int ifnum,
struct usb_interface *iface; struct usb_interface *iface;
struct usb_interface_descriptor *iface_desc; struct usb_interface_descriptor *iface_desc;
int ep_in_found = 0, ep_out_found = 0; int ep_in_found = 0, ep_out_found = 0;
int i;
struct r8152 *tp; struct r8152 *tp;
int i;
/* let's examine the device now */ /* let's examine the device now */
iface = &dev->config.if_desc[ifnum]; 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 & if ((iface->ep_desc[i].bmAttributes &
USB_ENDPOINT_XFERTYPE_MASK) == USB_ENDPOINT_XFER_BULK) { USB_ENDPOINT_XFERTYPE_MASK) == USB_ENDPOINT_XFER_BULK) {
u8 ep_addr = iface->ep_desc[i].bEndpointAddress; u8 ep_addr = iface->ep_desc[i].bEndpointAddress;
if ((ep_addr & USB_DIR_IN) && !ep_in_found) {
ss->ep_in = ep_addr & if (ep_addr & USB_DIR_IN) {
USB_ENDPOINT_NUMBER_MASK; if (!ep_in_found) {
ep_in_found = 1; ss->ep_in = ep_addr &
USB_ENDPOINT_NUMBER_MASK;
ep_in_found = 1;
}
} else { } else {
if (!ep_out_found) { if (!ep_out_found) {
ss->ep_out = ep_addr & ss->ep_out = ep_addr &

View file

@ -447,8 +447,8 @@ static int mx6_init_after_reset(struct ehci_ctrl *dev)
ret = regulator_set_enable(priv->vbus_supply, ret = regulator_set_enable(priv->vbus_supply,
(type == USB_INIT_DEVICE) ? (type == USB_INIT_DEVICE) ?
false : true); false : true);
if (ret) { if (ret && ret != -ENOSYS) {
puts("Error enabling VBUS supply\n"); printf("Error enabling VBUS supply (ret=%i)\n", ret);
return ret; return ret;
} }
} }
@ -614,8 +614,8 @@ static int ehci_usb_probe(struct udevice *dev)
ret = regulator_set_enable(priv->vbus_supply, ret = regulator_set_enable(priv->vbus_supply,
(type == USB_INIT_DEVICE) ? (type == USB_INIT_DEVICE) ?
false : true); false : true);
if (ret) { if (ret && ret != -ENOSYS) {
puts("Error enabling VBUS supply\n"); printf("Error enabling VBUS supply (ret=%i)\n", ret);
return ret; return ret;
} }
} }