--- zzzz-none-000/linux-2.6.28.10/drivers/usb/core/message.c 2009-05-02 18:54:43.000000000 +0000 +++ fusiv-7390-686/linux-2.6.28.10/drivers/usb/core/message.c 2013-02-01 09:17:11.000000000 +0000 @@ -309,7 +309,8 @@ retval = usb_unlink_urb(io->urbs [i]); if (retval != -EINPROGRESS && retval != -ENODEV && - retval != -EBUSY) + retval != -EBUSY && + retval != -EIDRM) dev_err(&io->dev->dev, "%s, unlink --> %d\n", __func__, retval); @@ -318,7 +319,6 @@ } spin_lock(&io->lock); } - urb->dev = NULL; /* on the last completion, signal usb_sg_wait() */ io->bytes += urb->actual_length; @@ -531,7 +531,6 @@ case -ENXIO: /* hc didn't queue this one */ case -EAGAIN: case -ENOMEM: - io->urbs[i]->dev = NULL; retval = 0; yield(); break; @@ -549,7 +548,6 @@ /* fail any uncompleted urbs */ default: - io->urbs[i]->dev = NULL; io->urbs[i]->status = retval; dev_dbg(&io->dev->dev, "%s, submit --> %d\n", __func__, retval); @@ -600,7 +598,10 @@ if (!io->urbs [i]->dev) continue; retval = usb_unlink_urb(io->urbs [i]); - if (retval != -EINPROGRESS && retval != -EBUSY) + if (retval != -EINPROGRESS + && retval != -ENODEV + && retval != -EBUSY + && retval != -EIDRM) dev_warn(&io->dev->dev, "%s, unlink --> %d\n", __func__, retval); } @@ -1510,6 +1511,7 @@ struct usb_host_config *cp = NULL; struct usb_interface **new_interfaces = NULL; int n, nintf; + int hub_found = 0,msd_found = 0; if (dev->authorized == 0 || configuration == -1) configuration = 0; @@ -1654,6 +1656,12 @@ "adding %s (config #%d, interface %d)\n", dev_name(&intf->dev), configuration, intf->cur_altsetting->desc.bInterfaceNumber); + + if(intf->cur_altsetting->desc.bInterfaceClass == USB_CLASS_MASS_STORAGE) + msd_found |= (1 << nintf); + if(intf->cur_altsetting->desc.bInterfaceClass == USB_CLASS_HUB) + hub_found |= (1 << nintf); + ret = device_add(&intf->dev); if (ret != 0) { dev_err(&dev->dev, "device_add(%s) --> %d\n", @@ -1663,6 +1671,10 @@ usb_create_sysfs_intf_files(intf); } + if(!((msd_found) || (hub_found))) + printk("USB Warning: Device %s From %s Not Supported\n", + dev->product, dev->manufacturer); + usb_autosuspend_device(dev); return 0; }