--- zzzz-none-000/linux-4.9.279/drivers/usb/storage/usb.c 2021-08-08 06:38:54.000000000 +0000 +++ puma7-atom-6591-750/linux-4.9.279/drivers/usb/storage/usb.c 2023-02-08 11:43:42.000000000 +0000 @@ -84,7 +84,13 @@ MODULE_DESCRIPTION("USB Mass Storage driver for Linux"); MODULE_LICENSE("GPL"); +/* == 20160718 AVM/WKR 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"); @@ -1083,6 +1089,10 @@ } /* Submit the delayed_work for SCSI-device scanning */ +#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) @@ -1122,6 +1132,19 @@ int result; int size; + /* == AVM/WK 20140917 Patch from AVM Kernel 2.6.32 + * 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; + } + /* 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))