backports: disable PCI functions for kernels without PCI support
A message that is not in the archive (sent off-list or not yet received): [email protected]
RFC v2 1/8 backports: disable PCI functions for kernels without PCI support
--- backport/compat/compat-2.6.25.c | 2 ++ backport/compat/compat-2.6.28.c | 4 ++++ 2 files changed, 6 insertions(+)
backport/compat/compat-2.6.25.c +2 -0
@@ -210,6 +210,7 @@ EXPORT_SYMBOL_GPL(sg_alloc_table);* to it. We implement a sloppy work around for backporting * this. */ +#ifdef CONFIG_PCI int pci_enable_device_mem (struct pci_dev *dev) {int bars =pci_select_bars (dev,IORESOURCE_MEM );
@@ -217,6 +218,7 @@ int pci_enable_device_mem(struct pci_dev *dev) return pci_enable_device_bars(dev, bars); }EXPORT_SYMBOL_GPL (pci_enable_device_mem); +#endif /** * The following things are out of ./lib/vsprintf.c
backport/compat/compat-2.6.28.c +4 -0
@@ -238,6 +238,7 @@ EXPORT_SYMBOL_GPL(usb_anchor_empty);#endif /* CONFIG_USB */ #endif +#ifdef CONFIG_PCI void __iomem *pci_ioremap_bar (struct pci_dev *pdev,int bar) {/*
@@ -251,6 +252,7 @@ void __iomem *pci_ioremap_bar(struct pci_dev *pdev, int bar) pci_resource_len(pdev, bar)); }EXPORT_SYMBOL_GPL (pci_ioremap_bar); +#endif static unsigned long round_jiffies_common (unsigned long j,int cpu,bool force_up)
@@ -455,6 +457,7 @@ EXPORT_SYMBOL_GPL(n_tty_ioctl_helper);* generating PME# from both D3_hot and D3_cold, and the platform is unable to * enable wake-up power for it. */ +#ifdef CONFIG_PCI int pci_wake_from_d3 (struct pci_dev *dev,bool enable) { return pci_pme_capable(dev, PCI_D3cold) ?
@@ -462,4 +465,5 @@ int pci_wake_from_d3(struct pci_dev *dev, bool enable) pci_enable_wake(dev, PCI_D3hot, enable); }EXPORT_SYMBOL_GPL (pci_wake_from_d3); +#endif
Signature · 20 lines
1.8.1.2 -- Dipl.-Inf. (FH) Patrick Ziegler University Of Applied Sciences Kaiserslautern Amerikastrasse 1 D-66482 Zweibruecken Germany Phone: +49 631 3724 5526 Mail: [email protected] PGP KeyID 0xB4796B8C http://www.fh-kl.de http://www.fh-kl.de/fachbereiche/imst/iuk-knowhow.html
Nice work,
what kernel version(s) without PCI support have you tested this against?
There are also PCI(e) functions in backport/compat/compat-3.7.c and backport/compat/compat-2.6.27.c
Quoted 55 lines · Patrick Ziegler
Signed-off-by Patrick Ziegler <[email protected]>--- backport/compat/compat-2.6.25.c | 2 ++ backport/compat/compat-2.6.28.c | 4 ++++ 2 files changed, 6 insertions(+)backport/compat/compat-2.6.25.c +2
-0@@ -210,6 +210,7 @@ EXPORT_SYMBOL_GPL(sg_alloc_table);* to it. We implement a sloppy work around for backporting * this. */ +#ifdef CONFIG_PCI int pci_enable_device_mem (struct pci_dev *dev) {int bars =pci_select_bars (dev,IORESOURCE_MEM );@@ -217,6 +218,7 @@ int pci_enable_device_mem(struct pci_dev *dev) return pci_enable_device_bars(dev, bars); }EXPORT_SYMBOL_GPL (pci_enable_device_mem); +#endif /** * The following things are out of ./lib/vsprintf.c backport/compat/compat-2.6.28.c +3
-0@@ -238,6 +238,7 @@ EXPORT_SYMBOL_GPL(usb_anchor_empty);#endif /* CONFIG_USB */ #endif +#ifdef CONFIG_PCI void __iomem *pci_ioremap_bar (struct pci_dev *pdev,int bar) {/* @@ -251,6 +252,7 @@ void __iomem *pci_ioremap_bar(struct pci_dev *pdev, int bar) pci_resource_len(pdev, bar)); }EXPORT_SYMBOL_GPL (pci_ioremap_bar); +#endif static unsigned long round_jiffies_common (unsigned long j,int cpu,bool force_up)@@ -455,6 +457,7 @@ EXPORT_SYMBOL_GPL(n_tty_ioctl_helper);* generating PME# from both D3_hot and D3_cold, and the platform is unable to * enable wake-up power for it. */ +#ifdef CONFIG_PCI int pci_wake_from_d3 (struct pci_dev *dev,bool enable) { return pci_pme_capable(dev, PCI_D3cold) ?
backport/compat/compat-2.6.28.c int pci_wake_from_d3(struct pci_dev *dev, bool enable) · line 468
Quoted 4 lines
backport/compat/compat-2.6.28.c +1
-0@@ -462,4 +465,5 @@ int pci_wake_from_d3(struct pci_dev *dev, bool enable) pci_enable_wake(dev, PCI_D3hot, enable); }EXPORT_SYMBOL_GPL (pci_wake_from_d3); +#endif
The mainline Linux kernel uses a empty pci_wake_from_d3() function if CONFIG_PCI is not set in include/linux/pci.h
Hauke
Quoted 3 lines · Hauke Mehrtens
Nice work,
what kernel version(s) without PCI support have you tested this against?
I'm using this with kernel version 2.6.24.7
Quoted 3 lines
There are also PCI(e) functions in
backport/compat/compat-3.7.candbackport/compat/compat-2.6.27.c
That's true but they do not break the build. The functions which are called inside these PCI(e) functions have already empty stub functions if PCI support is not enabled.
Quoted 56 lines · Patrick Ziegler
Quoted 54 lines
Signed-off-by Patrick Ziegler <[email protected]>--- backport/compat/compat-2.6.25.c | 2 ++ backport/compat/compat-2.6.28.c | 4 ++++ 2 files changed, 6 insertions(+)backport/compat/compat-2.6.25.c +2
-0@@ -210,6 +210,7 @@ EXPORT_SYMBOL_GPL(sg_alloc_table);* to it. We implement a sloppy work around for backporting * this. */ +#ifdef CONFIG_PCI int pci_enable_device_mem (struct pci_dev *dev) {int bars =pci_select_bars (dev,IORESOURCE_MEM );@@ -217,6 +218,7 @@ int pci_enable_device_mem(struct pci_dev *dev) return pci_enable_device_bars(dev, bars); }EXPORT_SYMBOL_GPL (pci_enable_device_mem); +#endif /** * The following things are out of ./lib/vsprintf.c backport/compat/compat-2.6.28.c +3
-0@@ -238,6 +238,7 @@ EXPORT_SYMBOL_GPL(usb_anchor_empty);#endif /* CONFIG_USB */ #endif +#ifdef CONFIG_PCI void __iomem *pci_ioremap_bar (struct pci_dev *pdev,int bar) {/* @@ -251,6 +252,7 @@ void __iomem *pci_ioremap_bar(struct pci_dev *pdev, int bar) pci_resource_len(pdev, bar)); }EXPORT_SYMBOL_GPL (pci_ioremap_bar); +#endif static unsigned long round_jiffies_common (unsigned long j,int cpu,bool force_up)@@ -455,6 +457,7 @@ EXPORT_SYMBOL_GPL(n_tty_ioctl_helper);* generating PME# from both D3_hot and D3_cold, and the platform is unable to * enable wake-up power for it. */ +#ifdef CONFIG_PCI int pci_wake_from_d3 (struct pci_dev *dev,bool enable) { return pci_pme_capable(dev, PCI_D3cold) ?
Quoted 9 lines
backport/compat/compat-2.6.28.c int pci_wake_from_d3(struct pci_dev *dev, bool enable) · line 468
Quoted 5 lines
backport/compat/compat-2.6.28.c +1
-0@@ -462,4 +465,5 @@ int pci_wake_from_d3(struct pci_dev *dev, bool enable) pci_enable_wake(dev, PCI_D3hot, enable); }EXPORT_SYMBOL_GPL (pci_wake_from_d3); +#endif The mainline Linux kernel uses a empty
pci_wake_from_d3()function ifCONFIG_PCIis not set ininclude/linux/pci.h
Indeed, I've just realized that an include of pci.h in compat-2.6.28.c is enough to make it work with kernel version 2.6.24. I will resend the patch with this change.
Patrick
Signature · 15 lines
Dipl.-Inf. (FH) Patrick Ziegler University Of Applied Sciences Kaiserslautern Amerikastrasse 1 D-66482 Zweibruecken Germany Phone: +49 631 3724 5526 Mail: [email protected] PGP KeyID 0xB4796B8C http://www.fh-kl.de http://www.fh-kl.de/fachbereiche/imst/iuk-knowhow.html
RFC v2 2/8 backports: add eth_prepare_mac_addr_change() and eth_commit_mac_addr_change()
In reply to a message not in the archiveThese functions are required by qmi_wwan device driver.
--- backport/backport-include/linux/etherdevice.h | 7 ++++++ backport/backport-include/linux/if.h | 4 ++++ backport/compat/compat-3.9.c | 33 +++++++++++++++++++++++++++ 3 files changed, 44 insertions(+)
backport/backport-include/linux/etherdevice.h +7 -0
@@ -114,6 +114,13 @@ static inline int is_unicast_ether_addr(const u8 *addr) }#endif +#if LINUX_VERSION_CODE <KERNEL_VERSION (3 ,9 ,0 ) +#define eth_prepare_mac_addr_change LINUX_BACKPORT(eth_prepare_mac_addr_change) +extern int eth_prepare_mac_addr_change (struct net_device *dev,void *p); +#define eth_commit_mac_addr_change LINUX_BACKPORT(eth_commit_mac_addr_change) +extern void eth_commit_mac_addr_change (struct net_device *dev,void *p); +#endif /* < 3.9 */ +#if LINUX_VERSION_CODE <KERNEL_VERSION (2 ,6 ,29 )#define eth_mac_addr LINUX_BACKPORT(eth_mac_addr)extern int eth_mac_addr (struct net_device *dev,void *p);
backport/backport-include/linux/if.h +4 -0
@@ -29,4 +29,8 @@#define IFF_TX_SKB_SHARING 0x10000#endif +#ifndef IFF_LIVE_ADDR_CHANGE +#define IFF_LIVE_ADDR_CHANGE 0x100000 +#endif +#endif /* _BACKPORT_LINUX_IF_H */
backport/compat/compat-3.9.c +33 -0
@@ -12,6 +12,9 @@#include <linux/scatterlist.h> #include <linux/device.h> #include <linux/err.h> +#include <linux/netdevice.h> +#include <linux/if.h> +#include <linux/if_ether.h> #ifdef __sg_page_iter_next
@@ -64,4 +67,34 @@ void __iomem *devm_ioremap_resource(struct device *dev, struct resource *res) }EXPORT_SYMBOL_GPL (devm_ioremap_resource); +/** +* eth_prepare_mac_addr_change - prepare for mac change +* @dev: network device +* @p: socket address +*/ +int eth_prepare_mac_addr_change (struct net_device *dev,void *p) +{ +struct sockaddr *addr = p; + +if (!(dev->priv_flags &IFF_LIVE_ADDR_CHANGE ) &&netif_running (dev)) +return -EBUSY ; +if (!is_valid_ether_addr (addr->sa_data)) +return -EADDRNOTAVAIL ; +return 0 ; +} +EXPORT_SYMBOL (eth_prepare_mac_addr_change); + +/** +* eth_commit_mac_addr_change - commit mac change +* @dev: network device +* @p: socket address +*/ +void eth_commit_mac_addr_change (struct net_device *dev,void *p) +{ +struct sockaddr *addr = p; + +memcpy (dev->dev_addr, addr->sa_data,ETH_ALEN ); +} +EXPORT_SYMBOL (eth_commit_mac_addr_change); +#endif /* __sg_page_iter_next */
Signature · 20 lines
1.8.1.2 -- Dipl.-Inf. (FH) Patrick Ziegler University Of Applied Sciences Kaiserslautern Amerikastrasse 1 D-66482 Zweibruecken Germany Phone: +49 631 3724 5526 Mail: [email protected] PGP KeyID 0xB4796B8C http://www.fh-kl.de http://www.fh-kl.de/fachbereiche/imst/iuk-knowhow.html
RFC v2 3/8 backports: define PM_EVENT_AUTO
In reply to a message not in the archiveThis macro is missing for < 2.6.25
--- backport/backport-include/linux/pm.h | 4 ++++ 1 file changed, 4 insertions(+)
backport/backport-include/linux/pm.h +4 -0
@@ -2,6 +2,10 @@#define __BACKPORT_PM_H#include_next <linux/pm.h> +#ifndef PM_EVENT_AUTO +#define PM_EVENT_AUTO 0x0400 +#endif +#ifndef PM_EVENT_SLEEP #define PM_EVENT_SLEEP (PM_EVENT_SUSPEND)#endif
Signature · 20 lines
1.8.1.2 -- Dipl.-Inf. (FH) Patrick Ziegler University Of Applied Sciences Kaiserslautern Amerikastrasse 1 D-66482 Zweibruecken Germany Phone: +49 631 3724 5526 Mail: [email protected] PGP KeyID 0xB4796B8C http://www.fh-kl.de http://www.fh-kl.de/fachbereiche/imst/iuk-knowhow.html
RFC v2 4/8 backports: add usb_translate_errors()
In reply to a message not in the archiveThis inline function is missing for version < 2.6.39 but required by em28xx and cdc-wdm device driver.
--- backport/backport-include/linux/usb.h | 17 +++++++++++++++++ 1 file changed, 17 insertions(+)
backport/backport-include/linux/usb.h +17 -0
@@ -145,4 +145,21 @@ extern void usb_unpoison_urb(struct urb *urb);extern int usb_anchor_empty (struct usb_anchor *anchor);#endif /* 2.6.23-2.6.27 */ +#if LINUX_VERSION_CODE <KERNEL_VERSION (2 ,6 ,39 ) +#if defined(CONFIG_USB ) || defined(CONFIG_USB_MODULE ) +static inline int usb_translate_errors (int error_code) +{ +switch (error_code) { +case 0 : +case -ENOMEM : +case -ENODEV : +case -EOPNOTSUPP : +return error_code; +default : +return -EIO ; + } +} +#endif /* CONFIG_USB */ +#endif /* < 2.6.39 */ +#endif /* __BACKPORT_USB_H */
Signature · 20 lines
1.8.1.2 -- Dipl.-Inf. (FH) Patrick Ziegler University Of Applied Sciences Kaiserslautern Amerikastrasse 1 D-66482 Zweibruecken Germany Phone: +49 631 3724 5526 Mail: [email protected] PGP KeyID 0xB4796B8C http://www.fh-kl.de http://www.fh-kl.de/fachbereiche/imst/iuk-knowhow.html
RFC v2 5/8 backports: add usb_endpoint_maxp()
In reply to a message not in the archiveThis function is missing for kernel version < 3.2 but required by uvc_video and cdc-wdm device drivers.
--- backport/backport-include/linux/usb/ch9.h | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) create mode 100644 backport/backport-include/linux/usb/ch9.h
backport/backport-include/linux/usb/ch9.h new file +23 -0
@@ -0,0 +1,23 @@ +#ifndef __BACKPORT__LINUX_USB_CH9_H +#define __BACKPORT__LINUX_USB_CH9_H + +#include_next <linux/usb/ch9.h> +#include <linux/version.h> + +#if LINUX_VERSION_CODE <KERNEL_VERSION (3 ,2 ,0 ) +#include <linux/types.h> /* __u8 etc */ +#include <asm/byteorder.h> /* le16_to_cpu */ + +/** +* usb_endpoint_maxp - get endpoint's max packet size +* @epd: endpoint to be checked +* +* Returns @epd's max packet +*/ +static inline int usb_endpoint_maxp (const struct usb_endpoint_descriptor *epd) +{ +return __le16_to_cpu (epd->wMaxPacketSize); +} +#endif /* < 3.2 */ + +#endif /* __BACKPORT__LINUX_USB_CH9_H */
Signature · 20 lines
1.8.1.2 -- Dipl.-Inf. (FH) Patrick Ziegler University Of Applied Sciences Kaiserslautern Amerikastrasse 1 D-66482 Zweibruecken Germany Phone: +49 631 3724 5526 Mail: [email protected] PGP KeyID 0xB4796B8C http://www.fh-kl.de http://www.fh-kl.de/fachbereiche/imst/iuk-knowhow.html
RFC v2 6/8 backports: include headers directly if math64 header is missing
In reply to a message not in the archiveIf math64 header is not available, include div64.h directly. It is required for do_div() that is used inside the backport version of math64.h.
--- backport/backport-include/linux/math64.h | 3 +++ 1 file changed, 3 insertions(+)
backport/backport-include/linux/math64.h +3 -0
@@ -5,6 +5,9 @@#if (LINUX_VERSION_CODE >KERNEL_VERSION (2 ,6 ,25 ))#include_next <linux/math64.h> +#else +#include <linux/types.h> +#include <asm/div64.h> #endif /* (LINUX_VERSION_CODE > KERNEL_VERSION(2,6,25)) */ #if LINUX_VERSION_CODE <KERNEL_VERSION (2 ,6 ,26 )
Signature · 20 lines
1.8.1.2 -- Dipl.-Inf. (FH) Patrick Ziegler University Of Applied Sciences Kaiserslautern Amerikastrasse 1 D-66482 Zweibruecken Germany Phone: +49 631 3724 5526 Mail: [email protected] PGP KeyID 0xB4796B8C http://www.fh-kl.de http://www.fh-kl.de/fachbereiche/imst/iuk-knowhow.html
RFC v2 7/8 backports: define phys_addr_t for ARM on kernel version < 2.6.25
In reply to a message not in the archivephys_addr_t is not defined on ARM systems if kernel version < 2.6.25.
--- backport/backport-include/linux/types.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
backport/backport-include/linux/types.h +2 -2
@@ -4,7 +4,7 @@#include <linux/version.h> #if LINUX_VERSION_CODE <KERNEL_VERSION (2 ,6 ,25 ) -#if defined(CONFIG_X86 ) || defined(CONFIG_X86_64 ) +#if defined(CONFIG_X86 ) || defined(CONFIG_X86_64 ) || defined(CONFIG_ARM )#if defined(CONFIG_64BIT ) || defined(CONFIG_X86_PAE ) || defined(CONFIG_PHYS_64BIT )typedef u64 phys_addr_t ;
@@ -12,7 +12,7 @@ typedef u64 phys_addr_t;typedef u32 phys_addr_t ;#endif -#endif /* x86 */ +#endif /* x86 || ARM */ #elif LINUX_VERSION_CODE < KERNEL_VERSION(2,6,28)/* < 2.6.25 */ #if defined(CONFIG_X86 ) || defined(CONFIG_X86_64 ) || defined(CONFIG_PPC )
Signature · 20 lines
1.8.1.2 -- Dipl.-Inf. (FH) Patrick Ziegler University Of Applied Sciences Kaiserslautern Amerikastrasse 1 D-66482 Zweibruecken Germany Phone: +49 631 3724 5526 Mail: [email protected] PGP KeyID 0xB4796B8C http://www.fh-kl.de http://www.fh-kl.de/fachbereiche/imst/iuk-knowhow.html
RFC v2 8/8 backports: add wwan device drivers
In reply to a message not in the archiveAdd cdc_mbim, cdc_ncm, sierra_net, qmi_wwan device drivers.
--- backport/Kconfig | 2 ++ backport/Makefile.kernel | 3 +++ copy-list | 14 ++++++++++++++ .../network/0001-netdev_ops/qmi_wwan.patch | 11 +++++++++++ .../network/0001-netdev_ops/sierra_net.patch | 11 +++++++++++ .../62-usb_driver_lpm/drivers_net_usb_cdc_mbim.patch | 12 ++++++++++++ .../62-usb_driver_lpm/drivers_net_usb_cdc_ncm.patch | 12 ++++++++++++ .../62-usb_driver_lpm/drivers_net_usb_qmi_wwan.patch | 12 ++++++++++++ .../62-usb_driver_lpm/drivers_net_usb_sierra_net.patch | 12 ++++++++++++ .../62-usb_driver_lpm/drivers_usb_class_cdc-wdm.patch | 12 ++++++++++++ 10 files changed, 101 insertions(+) create mode 100644 patches/collateral-evolutions/network/0001-netdev_ops/qmi_wwan.patch create mode 100644 patches/collateral-evolutions/network/0001-netdev_ops/sierra_net.patch create mode 100644 patches/collateral-evolutions/network/62-usb_driver_lpm/drivers_net_usb_cdc_mbim.patch create mode 100644 patches/collateral-evolutions/network/62-usb_driver_lpm/drivers_net_usb_cdc_ncm.patch create mode 100644 patches/collateral-evolutions/network/62-usb_driver_lpm/drivers_net_usb_qmi_wwan.patch create mode 100644 patches/collateral-evolutions/network/62-usb_driver_lpm/drivers_net_usb_sierra_net.patch create mode 100644 patches/collateral-evolutions/network/62-usb_driver_lpm/drivers_usb_class_cdc-wdm.patch
backport/Kconfig +2 -0
@@ -48,3 +48,5 @@ source drivers/platform/x86/Kconfig source net/ieee802154/Kconfig source net/mac802154/Kconfig source drivers/net/ieee802154/Kconfig + +source drivers/usb/class/Kconfig
backport/Makefile.kernel +3 -0
@@ -40,3 +40,6 @@ obj-$(CPTCFG_INTEL_IPS) += drivers/platform/x86/ obj-$(CPTCFG_IEEE802154) += net/ieee802154/ obj-$(CPTCFG_MAC802154) += net/mac802154/ obj-$(CPTCFG_IEEE802154) += drivers/net/ieee802154/ + +obj-$(CPTCFG_USB_WDM) += drivers/usb/class/ +obj-$(CPTCFG_USB_USBNET) += drivers/net/usb/
copy-list +14 -0
@@ -100,6 +100,20 @@ drivers/net/ethernet/broadcom/Makefile drivers/net/ethernet/broadcom/b44.c drivers/net/ethernet/broadcom/b44.h +# wwan drivers +include/uapi/linux/usb/cdc.h +include/uapi/linux/usb/cdc-wdm.h +include/linux/usb/cdc_ncm.h +include/linux/usb/cdc-wdm.h + +drivers/usb/class/Makefile +drivers/usb/class/Kconfig +drivers/usb/class/cdc-wdm.c +drivers/net/usb/cdc_mbim.c +drivers/net/usb/cdc_ncm.c +drivers/net/usb/sierra_net.c +drivers/net/usb/qmi_wwan.c + # DRM include/drm/ include/uapi/drm/
patches/collateral-evolutions/network/0001-netdev_ops/qmi_wwan.patch new file +11 -0
@@ -0,0 +1,11 @@ +--- a/drivers/net/usb/qmi_wwan.c ++++ b/drivers/net/usb/qmi_wwan.c +@@ -331,7 +331,7 @@ + dev->net->dev_addr[0] |= 0x02; /* set local assignment bit */ + dev->net->dev_addr[0] &= 0xbf; /* clear "IP" bit */ + } +- dev->net->netdev_ops = &qmi_wwan_netdev_ops; ++ netdev_attach_ops(dev->net, &qmi_wwan_netdev_ops); + err: + return status; + }
patches/collateral-evolutions/network/0001-netdev_ops/sierra_net.patch new file +11 -0
@@ -0,0 +1,11 @@ +--- a/drivers/net/usb/sierra_net.c ++++ b/drivers/net/usb/sierra_net.c +@@ -695,7 +695,7 @@ + + priv->usbnet = dev; + priv->ifnum = ifacenum; +- dev->net->netdev_ops = &sierra_net_device_ops; ++ netdev_attach_ops(dev->net, &sierra_net_device_ops); + + /* change MAC addr to include, ifacenum, and to be unique */ + dev->net->dev_addr[ETH_ALEN-2] = atomic_inc_return(&iface_counter);
patches/collateral-evolutions/network/62-usb_driver_lpm/drivers_net_usb_cdc_mbim.patch new file +12 -0
@@ -0,0 +1,12 @@ +--- a/drivers/net/usb/cdc_mbim.c ++++ b/drivers/net/usb/cdc_mbim.c +@@ -417,7 +417,9 @@ + .resume = cdc_mbim_resume, + .reset_resume = cdc_mbim_resume, + .supports_autosuspend = 1, ++#if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,5,0)) + .disable_hub_initiated_lpm = 1, ++#endif + }; + module_usb_driver(cdc_mbim_driver); +
patches/collateral-evolutions/network/62-usb_driver_lpm/drivers_net_usb_cdc_ncm.patch new file +12 -0
@@ -0,0 +1,12 @@ +--- a/drivers/net/usb/cdc_ncm.c ++++ b/drivers/net/usb/cdc_ncm.c +@@ -1271,7 +1271,9 @@ + .resume = usbnet_resume, + .reset_resume = usbnet_resume, + .supports_autosuspend = 1, ++#if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,5,0)) + .disable_hub_initiated_lpm = 1, ++#endif + }; + + module_usb_driver(cdc_ncm_driver);
patches/collateral-evolutions/network/62-usb_driver_lpm/drivers_net_usb_qmi_wwan.patch new file +12 -0
@@ -0,0 +1,12 @@ +--- a/drivers/net/usb/qmi_wwan.c ++++ b/drivers/net/usb/qmi_wwan.c +@@ -672,7 +672,9 @@ + .resume = qmi_wwan_resume, + .reset_resume = qmi_wwan_resume, + .supports_autosuspend = 1, ++#if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,5,0)) + .disable_hub_initiated_lpm = 1, ++#endif + }; + + module_usb_driver(qmi_wwan_driver);
patches/collateral-evolutions/network/62-usb_driver_lpm/drivers_net_usb_sierra_net.patch new file +12 -0
@@ -0,0 +1,12 @@ +--- a/drivers/net/usb/sierra_net.c ++++ b/drivers/net/usb/sierra_net.c +@@ -959,7 +959,9 @@ + .suspend = usbnet_suspend, + .resume = usbnet_resume, + .no_dynamic_id = 1, ++#if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,5,0)) + .disable_hub_initiated_lpm = 1, ++#endif + }; + + module_usb_driver(sierra_net_driver);
patches/collateral-evolutions/network/62-usb_driver_lpm/drivers_usb_class_cdc-wdm.patch new file +12 -0
@@ -0,0 +1,12 @@ +--- a/drivers/usb/class/cdc-wdm.c ++++ b/drivers/usb/class/cdc-wdm.c +@@ -1060,7 +1060,9 @@ + .post_reset = wdm_post_reset, + .id_table = wdm_ids, + .supports_autosuspend = 1, ++#if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,5,0)) + .disable_hub_initiated_lpm = 1, ++#endif + }; + + module_usb_driver(wdm_driver);
Signature · 19 lines
1.8.1.2 -- Dipl.-Inf. (FH) Patrick Ziegler University Of Applied Sciences Kaiserslautern Amerikastrasse 1 D-66482 Zweibruecken Germany Phone: +49 631 3724 5526 Mail: [email protected] PGP KeyID 0xB4796B8C http://www.fh-kl.de http://www.fh-kl.de/fachbereiche/imst/iuk-knowhow.html