--- zzzz-none-000/linux-4.4.60/drivers/pci/pci-sysfs.c 2017-04-08 07:53:53.000000000 +0000 +++ wasp-540e-714/linux-4.4.60/drivers/pci/pci-sysfs.c 2019-07-03 09:21:34.000000000 +0000 @@ -321,8 +321,32 @@ } static BUS_ATTR(rescan, (S_IWUSR|S_IWGRP), NULL, bus_rescan_store); +#ifdef CONFIG_AVM_PCI_RECOVERY +static ssize_t bus_down_store(struct bus_type *bus, const char *buf, + size_t count) +{ + ath_pci_down(); + + return count; +} +static BUS_ATTR(down, (S_IWUSR|S_IWGRP), NULL, bus_down_store); + +static ssize_t bus_up_store(struct bus_type *bus, const char *buf, + size_t count) +{ + ath_pci_up(); + + return count; +} +static BUS_ATTR(up, (S_IWUSR|S_IWGRP), NULL, bus_up_store); +#endif + static struct attribute *pci_bus_attrs[] = { &bus_attr_rescan.attr, +#ifdef CONFIG_AVM_PCI_RECOVERY + &bus_attr_down.attr, + &bus_attr_up.attr, +#endif NULL, };