]> git.sur5r.net Git - u-boot/blobdiff - common/usb_storage.c
powerpc/p2041: fixup portal config info
[u-boot] / common / usb_storage.c
index 613c4f0f1f7e79a653ad6267a8341e7c30207f80..16667f3948253d2b42d0101fbac6f3cc97fb1cf1 100644 (file)
@@ -70,7 +70,7 @@
 /* direction table -- this indicates the direction of the data
  * transfer for each command code -- a 1 indicates input
  */
-unsigned char us_direction[256/8] = {
+static const unsigned char us_direction[256/8] = {
        0x28, 0x81, 0x14, 0x14, 0x20, 0x01, 0x90, 0x77,
        0x0C, 0x20, 0x00, 0x04, 0x00, 0x00, 0x00, 0x00,
        0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x01,
@@ -173,11 +173,12 @@ unsigned long usb_stor_write(int device, unsigned long blknr,
 struct usb_device * usb_get_dev_index(int index);
 void uhci_show_temp_int_td(void);
 
+#ifdef CONFIG_PARTITIONS
 block_dev_desc_t *usb_stor_get_dev(int index)
 {
        return (index < usb_max_devs) ? &usb_dev_desc[index] : NULL;
 }
-
+#endif
 
 void usb_show_progress(void)
 {
@@ -254,7 +255,7 @@ int usb_stor_scan(int mode)
                dev = usb_get_dev_index(i); /* get device */
                USB_STOR_PRINTF("i=%d\n", i);
                if (dev == NULL)
-                       break; /* no more devices avaiable */
+                       break; /* no more devices available */
 
                if (usb_storage_probe(dev, 0, &usb_stor[usb_max_devs])) {
                        /* OK, it's a storage device.  Iterate over its LUNs
@@ -1346,31 +1347,6 @@ int usb_stor_get_info(struct usb_device *dev, struct us_data *ss,
        unsigned long *capacity, *blksz;
        ccb *pccb = &usb_ccb;
 
-       /* for some reasons a couple of devices would not survive this reset */
-       if (
-           /* Sony USM256E */
-           (dev->descriptor.idVendor == 0x054c &&
-            dev->descriptor.idProduct == 0x019e)
-           ||
-           /* USB007 Mini-USB2 Flash Drive */
-           (dev->descriptor.idVendor == 0x066f &&
-            dev->descriptor.idProduct == 0x2010)
-           ||
-           /* SanDisk Corporation Cruzer Micro 20044318410546613953 */
-           (dev->descriptor.idVendor == 0x0781 &&
-            dev->descriptor.idProduct == 0x5151)
-           ||
-           /*
-            * SanDisk Corporation U3 Cruzer Micro 1/4GB
-            * Flash Drive 000016244373FFB4
-            */
-           (dev->descriptor.idVendor == 0x0781 &&
-            dev->descriptor.idProduct == 0x5406)
-           )
-               USB_STOR_PRINTF("usb_stor_get_info: skipping RESET..\n");
-       else
-               ss->transport_reset(ss);
-
        pccb->pdata = usb_stor_buf;
 
        dev_desc->target = dev->devnum;