--- zzzz-none-000/linux-4.4.60/drivers/usb/storage/usb.c 2017-04-08 07:53:53.000000000 +0000 +++ jet-2400-727/linux-4.4.60/drivers/usb/storage/usb.c 2021-03-17 14:36:41.000000000 +0000 @@ -83,7 +83,13 @@ MODULE_DESCRIPTION("USB Mass Storage driver for Linux"); MODULE_LICENSE("GPL"); +/* == 20160222 AVM/VGJ need delay for UMTS modeswitch ==*/ +#if defined (CONFIG_USB_SERIAL_OPTION) || defined (CONFIG_USB_SERIAL_OPTION_MODULE) +static unsigned int delay_use = 5; +#else static unsigned int delay_use = 1; +#endif + module_param(delay_use, uint, S_IRUGO | S_IWUSR); MODULE_PARM_DESC(delay_use, "seconds to delay before using a new device"); @@ -1053,6 +1059,10 @@ /* Submit the delayed_work for SCSI-device scanning */ usb_autopm_get_interface_no_resume(us->pusb_intf); +#ifdef CONFIG_AVM_USB_PM + /* == 20170929 AVM/VGJ - the scsi child must be ignored for the device to suspend ==*/ + pm_suspend_ignore_children(&us->pusb_intf->dev, true); +#endif set_bit(US_FLIDX_SCAN_PENDING, &us->dflags); if (delay_use > 0) @@ -1090,6 +1100,23 @@ int result; int size; +#if 1 + /* == 20170809 AVM/VGJ - CHANGESET: STICK_AND_SURF == + * Filter out all AVM (057C) mass storage devices... + */ + { + struct usb_device *udev; + #define AVM_VENDOR_ID 0x057C + udev = interface_to_usbdev(intf); + if (le16_to_cpu(udev->descriptor.idVendor) == AVM_VENDOR_ID) { + printk (KERN_INFO "USB Mass Storage device (%04x:%04x) ignored!\n", + le16_to_cpu(udev->descriptor.idVendor), + le16_to_cpu(udev->descriptor.idProduct)); + return -ENODEV; + } + } +#endif + /* If uas is enabled and this device can do uas then ignore it. */ #if IS_ENABLED(CONFIG_USB_UAS) if (uas_use_uas_driver(intf, id, NULL))