--- zzzz-none-000/linux-5.15.111/drivers/usb/storage/usb.c 2023-05-11 14:00:40.000000000 +0000 +++ puma7-atom-6670-761/linux-5.15.111/drivers/usb/storage/usb.c 2024-02-07 10:23:22.000000000 +0000 @@ -67,7 +67,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"); @@ -1061,6 +1067,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) @@ -1100,6 +1110,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))