netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 1/3] USB: qmi_wwan: Make forced int 4 whitelist generic
@ 2012-05-20  8:28 Andrew Bird
       [not found] ` <1337502518-1444-1-git-send-email-ajb-5+cxppFmGx6/3pe1ocb+s/XRex20P6io@public.gmane.org>
                   ` (3 more replies)
  0 siblings, 4 replies; 9+ messages in thread
From: Andrew Bird @ 2012-05-20  8:28 UTC (permalink / raw)
  To: bjorn; +Cc: gregkh, linux-usb, netdev, linux-kernel, Andrew Bird

Change the forced interface 4 whitelist to use the generic shared
binder instead of the Gobi specific one. Certain ZTE devices
(K3520-Z & K3765-Z) don't work with the Gobi version, but function
quite happily with the generic. This has been tested with the following
devices:
K3520-Z
K3565-Z
K3765-Z
K4505-Z
It hasn't been tested with the ZTE MF820D, which is the only other
device that uses this whitelist at present. Although Bjorn doesn't
expect any problems, any testing with that device would be appreciated.

Signed-off-by: Andrew Bird <ajb@spheresystems.co.uk>
---
 drivers/net/usb/qmi_wwan.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/net/usb/qmi_wwan.c b/drivers/net/usb/qmi_wwan.c
index d316503b..62a1a43 100644
--- a/drivers/net/usb/qmi_wwan.c
+++ b/drivers/net/usb/qmi_wwan.c
@@ -357,9 +357,9 @@ static const struct driver_info	qmi_wwan_gobi = {
 
 /* ZTE suck at making USB descriptors */
 static const struct driver_info	qmi_wwan_force_int4 = {
-	.description	= "Qualcomm Gobi wwan/QMI device",
+	.description	= "Qualcomm WWAN/QMI device",
 	.flags		= FLAG_WWAN,
-	.bind		= qmi_wwan_bind_gobi,
+	.bind		= qmi_wwan_bind_shared,
 	.unbind		= qmi_wwan_unbind_shared,
 	.manage_power	= qmi_wwan_manage_power,
 	.data		= BIT(4), /* interface whitelist bitmap */
-- 
1.7.5.4

^ permalink raw reply related	[flat|nested] 9+ messages in thread

* [PATCH 2/3] USB: qmi_wwan: Add ZTE (Vodafone) K3765-Z
       [not found] ` <1337502518-1444-1-git-send-email-ajb-5+cxppFmGx6/3pe1ocb+s/XRex20P6io@public.gmane.org>
@ 2012-05-20  8:28   ` Andrew Bird
  2012-05-20 10:52     ` Bjørn Mork
                       ` (2 more replies)
  0 siblings, 3 replies; 9+ messages in thread
From: Andrew Bird @ 2012-05-20  8:28 UTC (permalink / raw)
  To: bjorn-yOkvZcmFvRU
  Cc: gregkh-hQyY1W1yCW8ekmWlsbkhG0B+6BGkLq7r,
	linux-usb-u79uwXL29TY76Z2rM5mHXA, netdev-u79uwXL29TY76Z2rM5mHXA,
	linux-kernel-u79uwXL29TY76Z2rM5mHXA, Andrew Bird

Add the ZTE (Vodafone) K3765-Z to the whitelist. This requires the
previous patch to make the whitelist with forced interface 4 generic
or the device fails to initialise. After applying this patch and
loading the Option driver without usb-modeswitch's bind all
interfaces trick, a wwan0 net interface and /dev/cdc-wdm0 device
file were created. Using Bjorn Mork's perl connection script a
connection was made to a mobile network using QMI and the network
interface's IPv4 address was configured OK.

Signed-off-by: Andrew Bird <ajb-5+cxppFmGx6/3pe1ocb+s/XRex20P6io@public.gmane.org>
---
 drivers/net/usb/qmi_wwan.c |    9 +++++++++
 1 files changed, 9 insertions(+), 0 deletions(-)

diff --git a/drivers/net/usb/qmi_wwan.c b/drivers/net/usb/qmi_wwan.c
index 62a1a43..0646e45 100644
--- a/drivers/net/usb/qmi_wwan.c
+++ b/drivers/net/usb/qmi_wwan.c
@@ -457,6 +457,15 @@ static const struct usb_device_id products[] = {
 		.bInterfaceProtocol = 0xff,
 		.driver_info        = (unsigned long)&qmi_wwan_force_int4,
 	},
+	{	/* ZTE (Vodafone) K3765-Z */
+		.match_flags	    = USB_DEVICE_ID_MATCH_DEVICE | USB_DEVICE_ID_MATCH_INT_INFO,
+		.idVendor           = 0x19d2,
+		.idProduct          = 0x2002,
+		.bInterfaceClass    = 0xff,
+		.bInterfaceSubClass = 0xff,
+		.bInterfaceProtocol = 0xff,
+		.driver_info        = (unsigned long)&qmi_wwan_force_int4,
+	},
 	{	/* ZTE (Vodafone) K4505-Z */
 		.match_flags	    = USB_DEVICE_ID_MATCH_DEVICE | USB_DEVICE_ID_MATCH_INT_INFO,
 		.idVendor           = 0x19d2,
-- 
1.7.5.4

--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

^ permalink raw reply related	[flat|nested] 9+ messages in thread

* [PATCH 3/3] USB: qmi_wwan: Add ZTE (Vodafone) K3520-Z
  2012-05-20  8:28 [PATCH 1/3] USB: qmi_wwan: Make forced int 4 whitelist generic Andrew Bird
       [not found] ` <1337502518-1444-1-git-send-email-ajb-5+cxppFmGx6/3pe1ocb+s/XRex20P6io@public.gmane.org>
@ 2012-05-20  8:28 ` Andrew Bird
  2012-05-20 10:53   ` Bjørn Mork
  2012-05-20 10:50 ` [PATCH 1/3] USB: qmi_wwan: Make forced int 4 whitelist generic Bjørn Mork
  2012-05-20 20:59 ` David Miller
  3 siblings, 1 reply; 9+ messages in thread
From: Andrew Bird @ 2012-05-20  8:28 UTC (permalink / raw)
  To: bjorn; +Cc: gregkh, linux-usb, netdev, linux-kernel, Andrew Bird


Signed-off-by: Andrew Bird <ajb@spheresystems.co.uk>
---
 drivers/net/usb/qmi_wwan.c |   18 ++++++++++++++++++
 1 files changed, 18 insertions(+), 0 deletions(-)

diff --git a/drivers/net/usb/qmi_wwan.c b/drivers/net/usb/qmi_wwan.c
index 0646e45..f64dac3 100644
--- a/drivers/net/usb/qmi_wwan.c
+++ b/drivers/net/usb/qmi_wwan.c
@@ -356,6 +356,15 @@ static const struct driver_info	qmi_wwan_gobi = {
 };
 
 /* ZTE suck at making USB descriptors */
+static const struct driver_info	qmi_wwan_force_int1 = {
+	.description	= "Qualcomm WWAN/QMI device",
+	.flags		= FLAG_WWAN,
+	.bind		= qmi_wwan_bind_shared,
+	.unbind		= qmi_wwan_unbind_shared,
+	.manage_power	= qmi_wwan_manage_power,
+	.data		= BIT(1), /* interface whitelist bitmap */
+};
+
 static const struct driver_info	qmi_wwan_force_int4 = {
 	.description	= "Qualcomm WWAN/QMI device",
 	.flags		= FLAG_WWAN,
@@ -430,6 +439,15 @@ static const struct usb_device_id products[] = {
 		.bInterfaceProtocol = 0xff,
 		.driver_info        = (unsigned long)&qmi_wwan_force_int4,
 	},
+	{	/* ZTE (Vodafone) K3520-Z */
+		.match_flags	    = USB_DEVICE_ID_MATCH_DEVICE | USB_DEVICE_ID_MATCH_INT_INFO,
+		.idVendor           = 0x19d2,
+		.idProduct          = 0x0055,
+		.bInterfaceClass    = 0xff,
+		.bInterfaceSubClass = 0xff,
+		.bInterfaceProtocol = 0xff,
+		.driver_info        = (unsigned long)&qmi_wwan_force_int1,
+	},
 	{	/* ZTE (Vodafone) K3565-Z */
 		.match_flags	    = USB_DEVICE_ID_MATCH_DEVICE | USB_DEVICE_ID_MATCH_INT_INFO,
 		.idVendor           = 0x19d2,
-- 
1.7.5.4

^ permalink raw reply related	[flat|nested] 9+ messages in thread

* Re: [PATCH 1/3] USB: qmi_wwan: Make forced int 4 whitelist generic
  2012-05-20  8:28 [PATCH 1/3] USB: qmi_wwan: Make forced int 4 whitelist generic Andrew Bird
       [not found] ` <1337502518-1444-1-git-send-email-ajb-5+cxppFmGx6/3pe1ocb+s/XRex20P6io@public.gmane.org>
  2012-05-20  8:28 ` [PATCH 3/3] USB: qmi_wwan: Add ZTE (Vodafone) K3520-Z Andrew Bird
@ 2012-05-20 10:50 ` Bjørn Mork
  2012-05-20 20:59 ` David Miller
  3 siblings, 0 replies; 9+ messages in thread
From: Bjørn Mork @ 2012-05-20 10:50 UTC (permalink / raw)
  To: Andrew Bird; +Cc: gregkh, linux-usb, netdev, linux-kernel

Andrew Bird <ajb@spheresystems.co.uk> writes:

> Change the forced interface 4 whitelist to use the generic shared
> binder instead of the Gobi specific one. Certain ZTE devices
> (K3520-Z & K3765-Z) don't work with the Gobi version, but function
> quite happily with the generic. This has been tested with the following
> devices:
> K3520-Z
> K3565-Z
> K3765-Z
> K4505-Z
> It hasn't been tested with the ZTE MF820D, which is the only other
> device that uses this whitelist at present. Although Bjorn doesn't
> expect any problems, any testing with that device would be appreciated.
>
> Signed-off-by: Andrew Bird <ajb@spheresystems.co.uk>
> ---
>  drivers/net/usb/qmi_wwan.c |    4 ++--
>  1 files changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/net/usb/qmi_wwan.c b/drivers/net/usb/qmi_wwan.c
> index d316503b..62a1a43 100644
> --- a/drivers/net/usb/qmi_wwan.c
> +++ b/drivers/net/usb/qmi_wwan.c
> @@ -357,9 +357,9 @@ static const struct driver_info	qmi_wwan_gobi = {
>  
>  /* ZTE suck at making USB descriptors */
>  static const struct driver_info	qmi_wwan_force_int4 = {
> -	.description	= "Qualcomm Gobi wwan/QMI device",
> +	.description	= "Qualcomm WWAN/QMI device",
>  	.flags		= FLAG_WWAN,
> -	.bind		= qmi_wwan_bind_gobi,
> +	.bind		= qmi_wwan_bind_shared,
>  	.unbind		= qmi_wwan_unbind_shared,
>  	.manage_power	= qmi_wwan_manage_power,
>  	.data		= BIT(4), /* interface whitelist bitmap */

Acked-by: Bjørn Mork <bjorn@mork.no>

This fixes a logical error in the code.  Minidriver constructs with an
interface whitelist should not use qmi_wwan_bind_gobi.  It was made to
prevent binding to the serial interfaces on Gobi devices, and serves no
useful purpose when used with a whitelist.  The change is a no-op for
the ZTE MF820D, but is important for new devices.

Thanks for fixing this.


Bjør

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [PATCH 2/3] USB: qmi_wwan: Add ZTE (Vodafone) K3765-Z
  2012-05-20  8:28   ` [PATCH 2/3] USB: qmi_wwan: Add ZTE (Vodafone) K3765-Z Andrew Bird
@ 2012-05-20 10:52     ` Bjørn Mork
  2012-05-20 20:59     ` David Miller
  2012-05-20 20:59     ` David Miller
  2 siblings, 0 replies; 9+ messages in thread
From: Bjørn Mork @ 2012-05-20 10:52 UTC (permalink / raw)
  To: Andrew Bird; +Cc: gregkh, linux-usb, netdev, linux-kernel

Andrew Bird <ajb@spheresystems.co.uk> writes:

> Add the ZTE (Vodafone) K3765-Z to the whitelist.

Acked-by: Bjørn Mork <bjorn@mork.no>

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [PATCH 3/3] USB: qmi_wwan: Add ZTE (Vodafone) K3520-Z
  2012-05-20  8:28 ` [PATCH 3/3] USB: qmi_wwan: Add ZTE (Vodafone) K3520-Z Andrew Bird
@ 2012-05-20 10:53   ` Bjørn Mork
  0 siblings, 0 replies; 9+ messages in thread
From: Bjørn Mork @ 2012-05-20 10:53 UTC (permalink / raw)
  To: Andrew Bird; +Cc: gregkh, linux-usb, netdev, linux-kernel

Andrew Bird <ajb@spheresystems.co.uk> writes:

> Signed-off-by: Andrew Bird <ajb@spheresystems.co.uk>


Acked-by: Bjørn Mork <bjorn@mork.no>

>  /* ZTE suck at making USB descriptors */
> +static const struct driver_info	qmi_wwan_force_int1 = {
> +	.description	= "Qualcomm WWAN/QMI device",
> +	.flags		= FLAG_WWAN,
> +	.bind		= qmi_wwan_bind_shared,
> +	.unbind		= qmi_wwan_unbind_shared,
> +	.manage_power	= qmi_wwan_manage_power,
> +	.data		= BIT(1), /* interface whitelist bitmap */
> +};
> +
>  static const struct driver_info	qmi_wwan_force_int4 = {
>  	.description	= "Qualcomm WWAN/QMI device",
>  	.flags		= FLAG_WWAN,
> @@ -430,6 +439,15 @@ static const struct usb_device_id products[] = {
>  		.bInterfaceProtocol = 0xff,
>  		.driver_info        = (unsigned long)&qmi_wwan_force_int4,
>  	},
> +	{	/* ZTE (Vodafone) K3520-Z */
> +		.match_flags	    = USB_DEVICE_ID_MATCH_DEVICE | USB_DEVICE_ID_MATCH_INT_INFO,
> +		.idVendor           = 0x19d2,
> +		.idProduct          = 0x0055,
> +		.bInterfaceClass    = 0xff,
> +		.bInterfaceSubClass = 0xff,
> +		.bInterfaceProtocol = 0xff,
> +		.driver_info        = (unsigned long)&qmi_wwan_force_int1,
> +	},
>  	{	/* ZTE (Vodafone) K3565-Z */
>  		.match_flags	    = USB_DEVICE_ID_MATCH_DEVICE | USB_DEVICE_ID_MATCH_INT_INFO,
>  		.idVendor           = 0x19d2,


Looking forward to changing all this to a single line device + interface
number macro in 3.6 :-)


Bjørn

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [PATCH 1/3] USB: qmi_wwan: Make forced int 4 whitelist generic
  2012-05-20  8:28 [PATCH 1/3] USB: qmi_wwan: Make forced int 4 whitelist generic Andrew Bird
                   ` (2 preceding siblings ...)
  2012-05-20 10:50 ` [PATCH 1/3] USB: qmi_wwan: Make forced int 4 whitelist generic Bjørn Mork
@ 2012-05-20 20:59 ` David Miller
  3 siblings, 0 replies; 9+ messages in thread
From: David Miller @ 2012-05-20 20:59 UTC (permalink / raw)
  To: ajb; +Cc: bjorn, gregkh, linux-usb, netdev, linux-kernel

From: Andrew Bird <ajb@spheresystems.co.uk>
Date: Sun, 20 May 2012 09:28:36 +0100

> Change the forced interface 4 whitelist to use the generic shared
> binder instead of the Gobi specific one. Certain ZTE devices
> (K3520-Z & K3765-Z) don't work with the Gobi version, but function
> quite happily with the generic. This has been tested with the following
> devices:
> K3520-Z
> K3565-Z
> K3765-Z
> K4505-Z
> It hasn't been tested with the ZTE MF820D, which is the only other
> device that uses this whitelist at present. Although Bjorn doesn't
> expect any problems, any testing with that device would be appreciated.
> 
> Signed-off-by: Andrew Bird <ajb@spheresystems.co.uk>

Applied to net-next.

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [PATCH 2/3] USB: qmi_wwan: Add ZTE (Vodafone) K3765-Z
  2012-05-20  8:28   ` [PATCH 2/3] USB: qmi_wwan: Add ZTE (Vodafone) K3765-Z Andrew Bird
  2012-05-20 10:52     ` Bjørn Mork
@ 2012-05-20 20:59     ` David Miller
  2012-05-20 20:59     ` David Miller
  2 siblings, 0 replies; 9+ messages in thread
From: David Miller @ 2012-05-20 20:59 UTC (permalink / raw)
  To: ajb; +Cc: bjorn, gregkh, linux-usb, netdev, linux-kernel

From: Andrew Bird <ajb@spheresystems.co.uk>
Date: Sun, 20 May 2012 09:28:37 +0100

> Add the ZTE (Vodafone) K3765-Z to the whitelist. This requires the
> previous patch to make the whitelist with forced interface 4 generic
> or the device fails to initialise. After applying this patch and
> loading the Option driver without usb-modeswitch's bind all
> interfaces trick, a wwan0 net interface and /dev/cdc-wdm0 device
> file were created. Using Bjorn Mork's perl connection script a
> connection was made to a mobile network using QMI and the network
> interface's IPv4 address was configured OK.
> 
> Signed-off-by: Andrew Bird <ajb@spheresystems.co.uk>

Applied to net-next.

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [PATCH 2/3] USB: qmi_wwan: Add ZTE (Vodafone) K3765-Z
  2012-05-20  8:28   ` [PATCH 2/3] USB: qmi_wwan: Add ZTE (Vodafone) K3765-Z Andrew Bird
  2012-05-20 10:52     ` Bjørn Mork
  2012-05-20 20:59     ` David Miller
@ 2012-05-20 20:59     ` David Miller
  2 siblings, 0 replies; 9+ messages in thread
From: David Miller @ 2012-05-20 20:59 UTC (permalink / raw)
  To: ajb; +Cc: bjorn, gregkh, linux-usb, netdev, linux-kernel

From: Andrew Bird <ajb@spheresystems.co.uk>
Date: Sun, 20 May 2012 09:28:37 +0100

> Add the ZTE (Vodafone) K3765-Z to the whitelist. This requires the
> previous patch to make the whitelist with forced interface 4 generic
> or the device fails to initialise. After applying this patch and
> loading the Option driver without usb-modeswitch's bind all
> interfaces trick, a wwan0 net interface and /dev/cdc-wdm0 device
> file were created. Using Bjorn Mork's perl connection script a
> connection was made to a mobile network using QMI and the network
> interface's IPv4 address was configured OK.
> 
> Signed-off-by: Andrew Bird <ajb@spheresystems.co.uk>

Applied to net-next.

^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2012-05-20 21:00 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-05-20  8:28 [PATCH 1/3] USB: qmi_wwan: Make forced int 4 whitelist generic Andrew Bird
     [not found] ` <1337502518-1444-1-git-send-email-ajb-5+cxppFmGx6/3pe1ocb+s/XRex20P6io@public.gmane.org>
2012-05-20  8:28   ` [PATCH 2/3] USB: qmi_wwan: Add ZTE (Vodafone) K3765-Z Andrew Bird
2012-05-20 10:52     ` Bjørn Mork
2012-05-20 20:59     ` David Miller
2012-05-20 20:59     ` David Miller
2012-05-20  8:28 ` [PATCH 3/3] USB: qmi_wwan: Add ZTE (Vodafone) K3520-Z Andrew Bird
2012-05-20 10:53   ` Bjørn Mork
2012-05-20 10:50 ` [PATCH 1/3] USB: qmi_wwan: Make forced int 4 whitelist generic Bjørn Mork
2012-05-20 20:59 ` David Miller

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).