* [PATCH v2 2/9] backports: add eth_prepare_mac_addr_change() and eth_commit_mac_addr_change()
[not found] <cover.1376467862.git.patrick.ziegler@fh-kl.de>
@ 2013-08-14 8:17 ` Patrick Ziegler
2013-08-14 8:17 ` [PATCH v2 1/9] backports: fix build errors for old kernel versions without PCI support Patrick Ziegler
` (7 subsequent siblings)
8 siblings, 0 replies; 12+ messages in thread
From: Patrick Ziegler @ 2013-08-14 8:17 UTC (permalink / raw)
To: Luis R. Rodriguez; +Cc: backports
These functions are required by qmi_wwan device driver.
Signed-off-by: Patrick Ziegler <patrick.ziegler@fh-kl.de>
---
backport/backport-include/linux/etherdevice.h | 8 +++++++
backport/backport-include/linux/if.h | 4 ++++
backport/compat/compat-3.9.c | 33 +++++++++++++++++++++++++++
3 files changed, 45 insertions(+)
diff --git a/backport/backport-include/linux/etherdevice.h b/backport/backport-include/linux/etherdevice.h
index 5c82fc4..6aff244 100644
--- a/backport/backport-include/linux/etherdevice.h
+++ b/backport/backport-include/linux/etherdevice.h
@@ -114,6 +114,14 @@ 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);
diff --git a/backport/backport-include/linux/if.h b/backport/backport-include/linux/if.h
index 7926082..8f85b83 100644
--- a/backport/backport-include/linux/if.h
+++ b/backport/backport-include/linux/if.h
@@ -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 */
diff --git a/backport/compat/compat-3.9.c b/backport/compat/compat-3.9.c
index 03f3af8..ba8e3cf 100644
--- a/backport/compat/compat-3.9.c
+++ b/backport/compat/compat-3.9.c
@@ -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_GPL(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_GPL(eth_commit_mac_addr_change);
+
#endif /* __sg_page_iter_next */
--
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: patrick.ziegler@fh-kl.de
PGP KeyID 0xB4796B8C
http://www.fh-kl.de
http://www.fh-kl.de/fachbereiche/imst/iuk-knowhow.html
^ permalink raw reply related [flat|nested] 12+ messages in thread* [PATCH v2 1/9] backports: fix build errors for old kernel versions without PCI support
[not found] <cover.1376467862.git.patrick.ziegler@fh-kl.de>
2013-08-14 8:17 ` [PATCH v2 2/9] backports: add eth_prepare_mac_addr_change() and eth_commit_mac_addr_change() Patrick Ziegler
@ 2013-08-14 8:17 ` Patrick Ziegler
2013-08-14 8:17 ` [PATCH v2 3/9] backports: define PM_EVENT_AUTO Patrick Ziegler
` (6 subsequent siblings)
8 siblings, 0 replies; 12+ messages in thread
From: Patrick Ziegler @ 2013-08-14 8:17 UTC (permalink / raw)
To: Luis R. Rodriguez; +Cc: backports
Signed-off-by: Patrick Ziegler <patrick.ziegler@fh-kl.de>
---
backport/compat/compat-2.6.25.c | 2 ++
backport/compat/compat-2.6.28.c | 1 +
2 files changed, 3 insertions(+)
diff --git a/backport/compat/compat-2.6.25.c b/backport/compat/compat-2.6.25.c
index b3597ea..37407a4 100644
--- a/backport/compat/compat-2.6.25.c
+++ b/backport/compat/compat-2.6.25.c
@@ -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
diff --git a/backport/compat/compat-2.6.28.c b/backport/compat/compat-2.6.28.c
index e47626b..2ff6b1e 100644
--- a/backport/compat/compat-2.6.28.c
+++ b/backport/compat/compat-2.6.28.c
@@ -12,6 +12,7 @@
#include <linux/usb.h>
#include <linux/tty.h>
#include <linux/skbuff.h>
+#include <linux/pci.h>
#include <asm/poll.h>
/* 2.6.28 compat code goes here */
--
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: patrick.ziegler@fh-kl.de
PGP KeyID 0xB4796B8C
http://www.fh-kl.de
http://www.fh-kl.de/fachbereiche/imst/iuk-knowhow.html
^ permalink raw reply related [flat|nested] 12+ messages in thread* [PATCH v2 3/9] backports: define PM_EVENT_AUTO
[not found] <cover.1376467862.git.patrick.ziegler@fh-kl.de>
2013-08-14 8:17 ` [PATCH v2 2/9] backports: add eth_prepare_mac_addr_change() and eth_commit_mac_addr_change() Patrick Ziegler
2013-08-14 8:17 ` [PATCH v2 1/9] backports: fix build errors for old kernel versions without PCI support Patrick Ziegler
@ 2013-08-14 8:17 ` Patrick Ziegler
2013-08-14 8:18 ` [PATCH v2 4/9] backports: add usb_translate_errors() Patrick Ziegler
` (5 subsequent siblings)
8 siblings, 0 replies; 12+ messages in thread
From: Patrick Ziegler @ 2013-08-14 8:17 UTC (permalink / raw)
To: Luis R. Rodriguez; +Cc: backports
This macro is missing for < 2.6.25
Signed-off-by: Patrick Ziegler <patrick.ziegler@fh-kl.de>
---
backport/backport-include/linux/pm.h | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/backport/backport-include/linux/pm.h b/backport/backport-include/linux/pm.h
index 70f3a21..d217c81 100644
--- a/backport/backport-include/linux/pm.h
+++ b/backport/backport-include/linux/pm.h
@@ -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
--
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: patrick.ziegler@fh-kl.de
PGP KeyID 0xB4796B8C
http://www.fh-kl.de
http://www.fh-kl.de/fachbereiche/imst/iuk-knowhow.html
^ permalink raw reply related [flat|nested] 12+ messages in thread* [PATCH v2 4/9] backports: add usb_translate_errors()
[not found] <cover.1376467862.git.patrick.ziegler@fh-kl.de>
` (2 preceding siblings ...)
2013-08-14 8:17 ` [PATCH v2 3/9] backports: define PM_EVENT_AUTO Patrick Ziegler
@ 2013-08-14 8:18 ` Patrick Ziegler
2013-08-15 11:29 ` Hauke Mehrtens
2013-08-14 8:18 ` [PATCH v2 5/9] backports: add usb_endpoint_maxp() Patrick Ziegler
` (4 subsequent siblings)
8 siblings, 1 reply; 12+ messages in thread
From: Patrick Ziegler @ 2013-08-14 8:18 UTC (permalink / raw)
To: Luis R. Rodriguez; +Cc: backports
This inline function is missing for version < 2.6.39 but required by em28xx
and cdc-wdm device driver.
Signed-off-by: Patrick Ziegler <patrick.ziegler@fh-kl.de>
---
backport/backport-include/linux/usb.h | 17 +++++++++++++++++
1 file changed, 17 insertions(+)
diff --git a/backport/backport-include/linux/usb.h b/backport/backport-include/linux/usb.h
index 368da6c..49a5762 100644
--- a/backport/backport-include/linux/usb.h
+++ b/backport/backport-include/linux/usb.h
@@ -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 */
--
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: patrick.ziegler@fh-kl.de
PGP KeyID 0xB4796B8C
http://www.fh-kl.de
http://www.fh-kl.de/fachbereiche/imst/iuk-knowhow.html
^ permalink raw reply related [flat|nested] 12+ messages in thread* Re: [PATCH v2 4/9] backports: add usb_translate_errors()
2013-08-14 8:18 ` [PATCH v2 4/9] backports: add usb_translate_errors() Patrick Ziegler
@ 2013-08-15 11:29 ` Hauke Mehrtens
0 siblings, 0 replies; 12+ messages in thread
From: Hauke Mehrtens @ 2013-08-15 11:29 UTC (permalink / raw)
To: Patrick Ziegler; +Cc: Luis R. Rodriguez, backports
On 08/14/2013 10:18 AM, Patrick Ziegler wrote:
> This inline function is missing for version < 2.6.39 but required by em28xx
> and cdc-wdm device driver.
>
> Signed-off-by: Patrick Ziegler <patrick.ziegler@fh-kl.de>
> ---
> backport/backport-include/linux/usb.h | 17 +++++++++++++++++
> 1 file changed, 17 insertions(+)
>
> diff --git a/backport/backport-include/linux/usb.h b/backport/backport-include/linux/usb.h
> index 368da6c..49a5762 100644
> --- a/backport/backport-include/linux/usb.h
> +++ b/backport/backport-include/linux/usb.h
> @@ -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)
This check for CONFIG_USB is not needed, remove it.
> +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 */
>
^ permalink raw reply [flat|nested] 12+ messages in thread
* [PATCH v2 5/9] backports: add usb_endpoint_maxp()
[not found] <cover.1376467862.git.patrick.ziegler@fh-kl.de>
` (3 preceding siblings ...)
2013-08-14 8:18 ` [PATCH v2 4/9] backports: add usb_translate_errors() Patrick Ziegler
@ 2013-08-14 8:18 ` Patrick Ziegler
2013-08-14 8:18 ` [PATCH v2 6/9] backports: update enum usb_device_speed with USB_SPEED_SUPER Patrick Ziegler
` (3 subsequent siblings)
8 siblings, 0 replies; 12+ messages in thread
From: Patrick Ziegler @ 2013-08-14 8:18 UTC (permalink / raw)
To: Luis R. Rodriguez; +Cc: backports
This function is missing for kernel version < 3.2 but required by uvc_video
and cdc-wdm device drivers.
Signed-off-by: Patrick Ziegler <patrick.ziegler@fh-kl.de>
---
backport/backport-include/linux/usb/ch9.h | 23 +++++++++++++++++++++++
1 file changed, 23 insertions(+)
create mode 100644 backport/backport-include/linux/usb/ch9.h
diff --git a/backport/backport-include/linux/usb/ch9.h b/backport/backport-include/linux/usb/ch9.h
new file mode 100644
index 0000000..252a6f1
--- /dev/null
+++ b/backport/backport-include/linux/usb/ch9.h
@@ -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 */
--
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: patrick.ziegler@fh-kl.de
PGP KeyID 0xB4796B8C
http://www.fh-kl.de
http://www.fh-kl.de/fachbereiche/imst/iuk-knowhow.html
^ permalink raw reply related [flat|nested] 12+ messages in thread* [PATCH v2 6/9] backports: update enum usb_device_speed with USB_SPEED_SUPER
[not found] <cover.1376467862.git.patrick.ziegler@fh-kl.de>
` (4 preceding siblings ...)
2013-08-14 8:18 ` [PATCH v2 5/9] backports: add usb_endpoint_maxp() Patrick Ziegler
@ 2013-08-14 8:18 ` Patrick Ziegler
2013-08-14 8:18 ` [PATCH v2 7/9] backports: include headers directly if math64 header is missing Patrick Ziegler
` (2 subsequent siblings)
8 siblings, 0 replies; 12+ messages in thread
From: Patrick Ziegler @ 2013-08-14 8:18 UTC (permalink / raw)
To: Luis R. Rodriguez; +Cc: backports
USB_SPEED_SUPER is missing for kernel versions < 2.6.30 but used by uvc_video and
usbnet.
Signed-off-by: Patrick Ziegler <patrick.ziegler@fh-kl.de>
---
backport/backport-include/linux/usb/ch9.h | 24 +++++++++++++++++++++++-
1 file changed, 23 insertions(+), 1 deletion(-)
diff --git a/backport/backport-include/linux/usb/ch9.h b/backport/backport-include/linux/usb/ch9.h
index 252a6f1..40d5d3f 100644
--- a/backport/backport-include/linux/usb/ch9.h
+++ b/backport/backport-include/linux/usb/ch9.h
@@ -1,9 +1,31 @@
#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(2,6,30)
+#define usb_device_speed old_usb_device_speed
+#define USB_SPEED_UNKNOWN OLD_USB_SPEED_UNKNOWN
+#define USB_SPEED_LOW OLD_USB_SPEED_LOW
+#define USB_SPEED_FULL OLD_USB_SPEED_FULL
+#define USB_SPEED_HIGH OLD_USB_SPEED_HIGH
+#include_next <linux/usb/ch9.h>
+#undef usb_device_speed
+#undef USB_SPEED_UNKNOWN
+#undef USB_SPEED_LOW
+#undef USB_SPEED_FULL
+#undef USB_SPEED_HIGH
+enum usb_device_speed {
+ USB_SPEED_UNKNOWN = 0, /* enumerating */
+ USB_SPEED_LOW, USB_SPEED_FULL, /* usb 1.1 */
+ USB_SPEED_HIGH, /* usb 2.0 */
+ USB_SPEED_WIRELESS, /* wireless (usb 2.5) */
+ USB_SPEED_SUPER, /* usb 3.0 */
+};
+#else
+#include_next <linux/usb/ch9.h>
+#endif /* < 2.6.30 */
+
#if LINUX_VERSION_CODE < KERNEL_VERSION(3,2,0)
#include <linux/types.h> /* __u8 etc */
#include <asm/byteorder.h> /* le16_to_cpu */
--
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: patrick.ziegler@fh-kl.de
PGP KeyID 0xB4796B8C
http://www.fh-kl.de
http://www.fh-kl.de/fachbereiche/imst/iuk-knowhow.html
^ permalink raw reply related [flat|nested] 12+ messages in thread* [PATCH v2 7/9] backports: include headers directly if math64 header is missing
[not found] <cover.1376467862.git.patrick.ziegler@fh-kl.de>
` (5 preceding siblings ...)
2013-08-14 8:18 ` [PATCH v2 6/9] backports: update enum usb_device_speed with USB_SPEED_SUPER Patrick Ziegler
@ 2013-08-14 8:18 ` Patrick Ziegler
2013-08-14 8:18 ` [PATCH v2 8/9] backports: define phys_addr_t for ARM on kernel version < 2.6.25 Patrick Ziegler
2013-08-14 8:18 ` [PATCH v2 9/9] backports: add wwan device drivers Patrick Ziegler
8 siblings, 0 replies; 12+ messages in thread
From: Patrick Ziegler @ 2013-08-14 8:18 UTC (permalink / raw)
To: Luis R. Rodriguez; +Cc: backports
If 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.
Signed-off-by: Patrick Ziegler <patrick.ziegler@fh-kl.de>
---
backport/backport-include/linux/math64.h | 3 +++
1 file changed, 3 insertions(+)
diff --git a/backport/backport-include/linux/math64.h b/backport/backport-include/linux/math64.h
index 7f3a81b..775c2d3 100644
--- a/backport/backport-include/linux/math64.h
+++ b/backport/backport-include/linux/math64.h
@@ -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)
--
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: patrick.ziegler@fh-kl.de
PGP KeyID 0xB4796B8C
http://www.fh-kl.de
http://www.fh-kl.de/fachbereiche/imst/iuk-knowhow.html
^ permalink raw reply related [flat|nested] 12+ messages in thread* [PATCH v2 8/9] backports: define phys_addr_t for ARM on kernel version < 2.6.25
[not found] <cover.1376467862.git.patrick.ziegler@fh-kl.de>
` (6 preceding siblings ...)
2013-08-14 8:18 ` [PATCH v2 7/9] backports: include headers directly if math64 header is missing Patrick Ziegler
@ 2013-08-14 8:18 ` Patrick Ziegler
2013-08-14 8:18 ` [PATCH v2 9/9] backports: add wwan device drivers Patrick Ziegler
8 siblings, 0 replies; 12+ messages in thread
From: Patrick Ziegler @ 2013-08-14 8:18 UTC (permalink / raw)
To: Luis R. Rodriguez; +Cc: backports
phys_addr_t is not defined on ARM systems if kernel version < 2.6.25.
Signed-off-by: Patrick Ziegler <patrick.ziegler@fh-kl.de>
---
backport/backport-include/linux/types.h | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/backport/backport-include/linux/types.h b/backport/backport-include/linux/types.h
index 504a615..0aadc80 100644
--- a/backport/backport-include/linux/types.h
+++ b/backport/backport-include/linux/types.h
@@ -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)
--
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: patrick.ziegler@fh-kl.de
PGP KeyID 0xB4796B8C
http://www.fh-kl.de
http://www.fh-kl.de/fachbereiche/imst/iuk-knowhow.html
^ permalink raw reply related [flat|nested] 12+ messages in thread* [PATCH v2 9/9] backports: add wwan device drivers
[not found] <cover.1376467862.git.patrick.ziegler@fh-kl.de>
` (7 preceding siblings ...)
2013-08-14 8:18 ` [PATCH v2 8/9] backports: define phys_addr_t for ARM on kernel version < 2.6.25 Patrick Ziegler
@ 2013-08-14 8:18 ` Patrick Ziegler
2013-08-15 11:35 ` Hauke Mehrtens
8 siblings, 1 reply; 12+ messages in thread
From: Patrick Ziegler @ 2013-08-14 8:18 UTC (permalink / raw)
To: Luis R. Rodriguez; +Cc: backports
Add cdc_mbim, cdc_ncm, sierra_net, qmi_wwan device drivers.
Signed-off-by: Patrick Ziegler <patrick.ziegler@fh-kl.de>
---
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
diff --git a/backport/Kconfig b/backport/Kconfig
index 845b233..64a5f8b 100644
--- a/backport/Kconfig
+++ b/backport/Kconfig
@@ -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
diff --git a/backport/Makefile.kernel b/backport/Makefile.kernel
index ac29dea..ca75ce1 100644
--- a/backport/Makefile.kernel
+++ b/backport/Makefile.kernel
@@ -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/
diff --git a/copy-list b/copy-list
index aaf5ae9..7da4bb7 100644
--- a/copy-list
+++ b/copy-list
@@ -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/
diff --git a/patches/collateral-evolutions/network/0001-netdev_ops/qmi_wwan.patch b/patches/collateral-evolutions/network/0001-netdev_ops/qmi_wwan.patch
new file mode 100644
index 0000000..6281c8d
--- /dev/null
+++ b/patches/collateral-evolutions/network/0001-netdev_ops/qmi_wwan.patch
@@ -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;
+ }
diff --git a/patches/collateral-evolutions/network/0001-netdev_ops/sierra_net.patch b/patches/collateral-evolutions/network/0001-netdev_ops/sierra_net.patch
new file mode 100644
index 0000000..e7ff14b
--- /dev/null
+++ b/patches/collateral-evolutions/network/0001-netdev_ops/sierra_net.patch
@@ -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);
diff --git a/patches/collateral-evolutions/network/62-usb_driver_lpm/drivers_net_usb_cdc_mbim.patch b/patches/collateral-evolutions/network/62-usb_driver_lpm/drivers_net_usb_cdc_mbim.patch
new file mode 100644
index 0000000..0feffc8
--- /dev/null
+++ b/patches/collateral-evolutions/network/62-usb_driver_lpm/drivers_net_usb_cdc_mbim.patch
@@ -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);
+
diff --git a/patches/collateral-evolutions/network/62-usb_driver_lpm/drivers_net_usb_cdc_ncm.patch b/patches/collateral-evolutions/network/62-usb_driver_lpm/drivers_net_usb_cdc_ncm.patch
new file mode 100644
index 0000000..c6419fe
--- /dev/null
+++ b/patches/collateral-evolutions/network/62-usb_driver_lpm/drivers_net_usb_cdc_ncm.patch
@@ -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);
diff --git a/patches/collateral-evolutions/network/62-usb_driver_lpm/drivers_net_usb_qmi_wwan.patch b/patches/collateral-evolutions/network/62-usb_driver_lpm/drivers_net_usb_qmi_wwan.patch
new file mode 100644
index 0000000..8f3355d
--- /dev/null
+++ b/patches/collateral-evolutions/network/62-usb_driver_lpm/drivers_net_usb_qmi_wwan.patch
@@ -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);
diff --git a/patches/collateral-evolutions/network/62-usb_driver_lpm/drivers_net_usb_sierra_net.patch b/patches/collateral-evolutions/network/62-usb_driver_lpm/drivers_net_usb_sierra_net.patch
new file mode 100644
index 0000000..553f2ca
--- /dev/null
+++ b/patches/collateral-evolutions/network/62-usb_driver_lpm/drivers_net_usb_sierra_net.patch
@@ -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);
diff --git a/patches/collateral-evolutions/network/62-usb_driver_lpm/drivers_usb_class_cdc-wdm.patch b/patches/collateral-evolutions/network/62-usb_driver_lpm/drivers_usb_class_cdc-wdm.patch
new file mode 100644
index 0000000..c3af4a1
--- /dev/null
+++ b/patches/collateral-evolutions/network/62-usb_driver_lpm/drivers_usb_class_cdc-wdm.patch
@@ -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);
--
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: patrick.ziegler@fh-kl.de
PGP KeyID 0xB4796B8C
http://www.fh-kl.de
http://www.fh-kl.de/fachbereiche/imst/iuk-knowhow.html
^ permalink raw reply related [flat|nested] 12+ messages in thread* Re: [PATCH v2 9/9] backports: add wwan device drivers
2013-08-14 8:18 ` [PATCH v2 9/9] backports: add wwan device drivers Patrick Ziegler
@ 2013-08-15 11:35 ` Hauke Mehrtens
2013-08-15 11:44 ` Patrick Ziegler
0 siblings, 1 reply; 12+ messages in thread
From: Hauke Mehrtens @ 2013-08-15 11:35 UTC (permalink / raw)
To: Patrick Ziegler; +Cc: Luis R. Rodriguez, backports
On 08/14/2013 10:18 AM, Patrick Ziegler wrote:
> Add cdc_mbim, cdc_ncm, sierra_net, qmi_wwan device drivers.
>
> Signed-off-by: Patrick Ziegler <patrick.ziegler@fh-kl.de>
> ---
> 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
Please add a defconfig/wwan file which activates these drivers.
Hauke
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: [PATCH v2 9/9] backports: add wwan device drivers
2013-08-15 11:35 ` Hauke Mehrtens
@ 2013-08-15 11:44 ` Patrick Ziegler
0 siblings, 0 replies; 12+ messages in thread
From: Patrick Ziegler @ 2013-08-15 11:44 UTC (permalink / raw)
To: Hauke Mehrtens; +Cc: Luis R. Rodriguez, backports
On 15.08.2013 13:35, Hauke Mehrtens wrote:
> On 08/14/2013 10:18 AM, Patrick Ziegler wrote:
>> Add cdc_mbim, cdc_ncm, sierra_net, qmi_wwan device drivers.
>>
>> Signed-off-by: Patrick Ziegler <patrick.ziegler@fh-kl.de>
>> ---
>> 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
>
> Please add a defconfig/wwan file which activates these drivers.
>
Thanks for reviewing. I will implement your comments.
Patrick
--
Dipl.-Inf. (FH) Patrick Ziegler
University Of Applied Sciences
Kaiserslautern
Amerikastrasse 1
D-66482 Zweibruecken
Germany
Phone: +49 631 3724 5526
Mail: patrick.ziegler@fh-kl.de
PGP KeyID 0xB4796B8C
http://www.fh-kl.de
http://www.fh-kl.de/fachbereiche/imst/iuk-knowhow.html
^ permalink raw reply [flat|nested] 12+ messages in thread