--- zzzz-none-000/linux-3.10.107/drivers/usb/storage/usb.h 2017-06-27 09:49:32.000000000 +0000 +++ scorpion-7490-727/linux-3.10.107/drivers/usb/storage/usb.h 2021-02-04 17:41:59.000000000 +0000 @@ -158,6 +158,11 @@ pm_hook suspend_resume_hook; #endif +#ifdef CONFIG_AVM_USB_PM + unsigned long resume_start; + unsigned int max_spinup_ms; +#endif + /* hacks for READ CAPACITY bug handling */ int use_last_sector_hacks; int last_sector_retries; @@ -197,8 +202,25 @@ extern int usb_stor_probe1(struct us_data **pus, struct usb_interface *intf, const struct usb_device_id *id, - struct us_unusual_dev *unusual_dev); + struct us_unusual_dev *unusual_dev, + struct scsi_host_template *sht); extern int usb_stor_probe2(struct us_data *us); extern void usb_stor_disconnect(struct usb_interface *intf); +extern void usb_stor_adjust_quirks(struct usb_device *dev, + unsigned long *fflags); + +#define module_usb_stor_driver(__driver, __sht, __name) \ +static int __init __driver##_init(void) \ +{ \ + usb_stor_host_template_init(&(__sht), __name, THIS_MODULE); \ + return usb_register(&(__driver)); \ +} \ +module_init(__driver##_init); \ +static void __exit __driver##_exit(void) \ +{ \ + usb_deregister(&(__driver)); \ +} \ +module_exit(__driver##_exit) + #endif