X-Git-Url: https://git.sur5r.net/?a=blobdiff_plain;f=common%2Fusb_storage.c;h=4fa6538db58af627ffce1ae39b29e84ab2c6b510;hb=e92fc6df7ab1e3389225cca0102995942e010b43;hp=b390310ee35b554f3d152f39fbd1d9e77cc7132a;hpb=850f788709cef8f7d53d571aec3bfb73b14c5531;p=u-boot diff --git a/common/usb_storage.c b/common/usb_storage.c index b390310ee3..4fa6538db5 100644 --- a/common/usb_storage.c +++ b/common/usb_storage.c @@ -1177,25 +1177,9 @@ int usb_storage_probe(struct usb_device *dev, unsigned int ifnum, struct usb_endpoint_descriptor *ep_desc; unsigned int flags = 0; - int protocol = 0; - int subclass = 0; - /* let's examine the device now */ iface = &dev->config.if_desc[ifnum]; -#if 0 - /* this is the place to patch some storage devices */ - debug("iVendor %X iProduct %X\n", dev->descriptor.idVendor, - dev->descriptor.idProduct); - - if ((dev->descriptor.idVendor) == 0x066b && - (dev->descriptor.idProduct) == 0x0103) { - debug("patched for E-USB\n"); - protocol = US_PR_CB; - subclass = US_SC_UFI; /* an assumption */ - } -#endif - if (dev->descriptor.bDeviceClass != 0 || iface->desc.bInterfaceClass != USB_CLASS_MASS_STORAGE || iface->desc.bInterfaceSubClass < US_SC_MIN || @@ -1215,17 +1199,8 @@ int usb_storage_probe(struct usb_device *dev, unsigned int ifnum, ss->ifnum = ifnum; ss->pusb_dev = dev; ss->attention_done = 0; - - /* If the device has subclass and protocol, then use that. Otherwise, - * take data from the specific interface. - */ - if (subclass) { - ss->subclass = subclass; - ss->protocol = protocol; - } else { - ss->subclass = iface->desc.bInterfaceSubClass; - ss->protocol = iface->desc.bInterfaceProtocol; - } + ss->subclass = iface->desc.bInterfaceSubClass; + ss->protocol = iface->desc.bInterfaceProtocol; /* set the handler pointers based on the protocol */ debug("Transport: "); @@ -1408,7 +1383,7 @@ int usb_stor_get_info(struct usb_device *dev, struct us_data *ss, static int usb_mass_storage_probe(struct udevice *dev) { - struct usb_device *udev = dev_get_parentdata(dev); + struct usb_device *udev = dev_get_parent_priv(dev); int ret; usb_disable_asynch(1); /* asynch transfer not allowed */