--- zzzz-none-000/linux-2.6.39.4/drivers/usb/core/generic.c 2011-08-03 19:43:28.000000000 +0000 +++ puma6-atom-6490-729/linux-2.6.39.4/drivers/usb/core/generic.c 2021-11-10 13:38:17.000000000 +0000 @@ -20,6 +20,10 @@ #include #include #include "usb.h" +#ifdef CONFIG_AVM_POWERMETER +#include +#include +#endif /*--- #ifdef CONFIG_AVM_POWERMETER ---*/ static inline const char *plural(int n) { @@ -102,6 +106,23 @@ continue; } +#if defined(CONFIG_AVM_POWERMETER) + if (udev->level == 1) { + unsigned nextmA = (c->desc.bMaxPower * 2); + /* A device should display at least 100 mA in AVM_POWERMETER */ + if (nextmA < 100) { + nextmA = 100; + } + + { + unsigned avm_powerdevice; + avm_powerdevice = (udev->bus->busnum == 1)? powerdevice_usb_host : powerdevice_usb_host2; + printk (KERN_INFO "Bus#%u config: AVM Powermeter changed to %u mA\n", udev->bus->busnum, nextmA); + PowerManagmentRessourceInfo(avm_powerdevice, nextmA); + } + } +#endif // CONFIG_AVM_POWERMETER + /* When the first config's first interface is one of Microsoft's * pet nonstandard Ethernet-over-USB protocols, ignore it unless * this kernel has enabled the necessary host side driver. @@ -164,6 +185,10 @@ ; /* Don't configure if the device is owned */ else if (udev->authorized == 0) dev_err(&udev->dev, "Device is not authorized for usage\n"); +#if 1 /* == 20101129 AVM/WK Extension == */ + else if (udev->noprobe) + dev_err(&udev->dev, "Probing is disabled for this device\n"); +#endif else { c = usb_choose_configuration(udev); if (c >= 0) {