linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* USB option driver PID updates
@ 2011-08-16 23:20 Andrew Bird
  2011-08-16 23:20 ` [PATCH 1/3] USB option driver add PID of Huawei Vodafone K3806 Andrew Bird
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: Andrew Bird @ 2011-08-16 23:20 UTC (permalink / raw)
  To: gregkh; +Cc: linux-usb, linux-kernel


This is a slightly updated patchset for the one that Alex just posted.
It's rebased against latest master, and also prevents binding of the
CDC_DATA interface where necessary.

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

* [PATCH 1/3] USB option driver add PID of Huawei Vodafone K3806
  2011-08-16 23:20 USB option driver PID updates Andrew Bird
@ 2011-08-16 23:20 ` Andrew Bird
  2011-08-16 23:20 ` [PATCH 2/3] USB option driver K3765/K4505 avoid CDC_DATA interface Andrew Bird
  2011-08-16 23:20 ` [PATCH 3/3] USB option driver add PID of Huawei Vodafone K4605 Andrew Bird
  2 siblings, 0 replies; 4+ messages in thread
From: Andrew Bird @ 2011-08-16 23:20 UTC (permalink / raw)
  To: gregkh; +Cc: linux-usb, linux-kernel, Andrew Bird

This patch adds the product ID of Huawei's Vodafone K3806 mobile broadband
modem to option.c. This is necessary so that the driver gets loaded on demand
without the intervention of usb_modeswitch. This has the benefit of it becoming
available faster and also ensures that the option driver is not bound to a
network interface that should be claimed by cdc_ether.

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

diff --git a/drivers/usb/serial/option.c b/drivers/usb/serial/option.c
index 8156561..6e04222 100644
--- a/drivers/usb/serial/option.c
+++ b/drivers/usb/serial/option.c
@@ -148,6 +148,7 @@ static void option_instat_callback(struct urb *urb);
 #define HUAWEI_PRODUCT_K4505			0x1464
 #define HUAWEI_PRODUCT_K3765			0x1465
 #define HUAWEI_PRODUCT_E14AC			0x14AC
+#define HUAWEI_PRODUCT_K3806			0x14AE
 #define HUAWEI_PRODUCT_K3770			0x14C9
 #define HUAWEI_PRODUCT_K3771			0x14CA
 #define HUAWEI_PRODUCT_K4510			0x14CB
@@ -551,6 +552,7 @@ static const struct usb_device_id option_ids[] = {
 	{ USB_DEVICE_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, HUAWEI_PRODUCT_K3765, 0xff, 0xff, 0xff) },
 	{ USB_DEVICE_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, HUAWEI_PRODUCT_ETS1220, 0xff, 0xff, 0xff) },
 	{ USB_DEVICE_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, HUAWEI_PRODUCT_E14AC, 0xff, 0xff, 0xff) },
+	{ USB_DEVICE_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, HUAWEI_PRODUCT_K3806, 0xff, 0xff, 0xff) },
 	{ USB_DEVICE_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, HUAWEI_PRODUCT_K3770, 0xff, 0x02, 0x31) },
 	{ USB_DEVICE_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, HUAWEI_PRODUCT_K3770, 0xff, 0x02, 0x32) },
 	{ USB_DEVICE_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, HUAWEI_PRODUCT_K3771, 0xff, 0x02, 0x31) },
-- 
1.7.3.2


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

* [PATCH 2/3] USB option driver K3765/K4505 avoid CDC_DATA interface
  2011-08-16 23:20 USB option driver PID updates Andrew Bird
  2011-08-16 23:20 ` [PATCH 1/3] USB option driver add PID of Huawei Vodafone K3806 Andrew Bird
@ 2011-08-16 23:20 ` Andrew Bird
  2011-08-16 23:20 ` [PATCH 3/3] USB option driver add PID of Huawei Vodafone K4605 Andrew Bird
  2 siblings, 0 replies; 4+ messages in thread
From: Andrew Bird @ 2011-08-16 23:20 UTC (permalink / raw)
  To: gregkh; +Cc: linux-usb, linux-kernel, Andrew Bird

Currently the Option driver avoids binding interface 1 on Huawei K3765
and K4505 broadband modems as it should be handled by the cdc_ether
driver instead. This patch ensures we don't bind the interface 2
on those devices as that is CDC_DATA.

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

diff --git a/drivers/usb/serial/option.c b/drivers/usb/serial/option.c
index 6e04222..53911aa 100644
--- a/drivers/usb/serial/option.c
+++ b/drivers/usb/serial/option.c
@@ -1140,7 +1140,8 @@ static int option_probe(struct usb_serial *serial,
 	if (serial->dev->descriptor.idVendor == HUAWEI_VENDOR_ID &&
 		(serial->dev->descriptor.idProduct == HUAWEI_PRODUCT_K3765 ||
 			serial->dev->descriptor.idProduct == HUAWEI_PRODUCT_K4505) &&
-		serial->interface->cur_altsetting->desc.bInterfaceNumber == 1)
+		(serial->interface->cur_altsetting->desc.bInterfaceNumber == 1 ||
+			serial->interface->cur_altsetting->desc.bInterfaceNumber == 2))
 		return -ENODEV;
 
 	/* Don't bind network interface on Samsung GT-B3730, it is handled by a separate module */
-- 
1.7.3.2


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

* [PATCH 3/3] USB option driver add PID of Huawei Vodafone K4605
  2011-08-16 23:20 USB option driver PID updates Andrew Bird
  2011-08-16 23:20 ` [PATCH 1/3] USB option driver add PID of Huawei Vodafone K3806 Andrew Bird
  2011-08-16 23:20 ` [PATCH 2/3] USB option driver K3765/K4505 avoid CDC_DATA interface Andrew Bird
@ 2011-08-16 23:20 ` Andrew Bird
  2 siblings, 0 replies; 4+ messages in thread
From: Andrew Bird @ 2011-08-16 23:20 UTC (permalink / raw)
  To: gregkh; +Cc: linux-usb, linux-kernel, Andrew Bird

This patch adds the product ID of Huawei's Vodafone K4605 mobile broadband
modem to option.c. This is necessary so that the driver gets loaded on
demand without the intervention of usb_modeswitch. In addition we make sure
that the device's network port interfaces are not bound by option.c, so
allowing another suitable driver to claim that instead. Unfortunately the
network device doesn't appear to be cdc_ether compatible.

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

diff --git a/drivers/usb/serial/option.c b/drivers/usb/serial/option.c
index 53911aa..7e0f34b 100644
--- a/drivers/usb/serial/option.c
+++ b/drivers/usb/serial/option.c
@@ -149,6 +149,7 @@ static void option_instat_callback(struct urb *urb);
 #define HUAWEI_PRODUCT_K3765			0x1465
 #define HUAWEI_PRODUCT_E14AC			0x14AC
 #define HUAWEI_PRODUCT_K3806			0x14AE
+#define HUAWEI_PRODUCT_K4605			0x14C6
 #define HUAWEI_PRODUCT_K3770			0x14C9
 #define HUAWEI_PRODUCT_K3771			0x14CA
 #define HUAWEI_PRODUCT_K4510			0x14CB
@@ -553,6 +554,7 @@ static const struct usb_device_id option_ids[] = {
 	{ USB_DEVICE_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, HUAWEI_PRODUCT_ETS1220, 0xff, 0xff, 0xff) },
 	{ USB_DEVICE_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, HUAWEI_PRODUCT_E14AC, 0xff, 0xff, 0xff) },
 	{ USB_DEVICE_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, HUAWEI_PRODUCT_K3806, 0xff, 0xff, 0xff) },
+	{ USB_DEVICE_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, HUAWEI_PRODUCT_K4605, 0xff, 0xff, 0xff) },
 	{ USB_DEVICE_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, HUAWEI_PRODUCT_K3770, 0xff, 0x02, 0x31) },
 	{ USB_DEVICE_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, HUAWEI_PRODUCT_K3770, 0xff, 0x02, 0x32) },
 	{ USB_DEVICE_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, HUAWEI_PRODUCT_K3771, 0xff, 0x02, 0x31) },
@@ -1136,10 +1138,11 @@ static int option_probe(struct usb_serial *serial,
 		serial->interface->cur_altsetting->desc.bInterfaceClass != 0xff)
 		return -ENODEV;
 
-	/* Don't bind network interfaces on Huawei K3765 & K4505 */
+	/* Don't bind network interfaces on Huawei K3765, K4505 & K4605 */
 	if (serial->dev->descriptor.idVendor == HUAWEI_VENDOR_ID &&
 		(serial->dev->descriptor.idProduct == HUAWEI_PRODUCT_K3765 ||
-			serial->dev->descriptor.idProduct == HUAWEI_PRODUCT_K4505) &&
+			serial->dev->descriptor.idProduct == HUAWEI_PRODUCT_K4505 ||
+			serial->dev->descriptor.idProduct == HUAWEI_PRODUCT_K4605) &&
 		(serial->interface->cur_altsetting->desc.bInterfaceNumber == 1 ||
 			serial->interface->cur_altsetting->desc.bInterfaceNumber == 2))
 		return -ENODEV;
-- 
1.7.3.2


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

end of thread, other threads:[~2011-08-16 23:20 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-08-16 23:20 USB option driver PID updates Andrew Bird
2011-08-16 23:20 ` [PATCH 1/3] USB option driver add PID of Huawei Vodafone K3806 Andrew Bird
2011-08-16 23:20 ` [PATCH 2/3] USB option driver K3765/K4505 avoid CDC_DATA interface Andrew Bird
2011-08-16 23:20 ` [PATCH 3/3] USB option driver add PID of Huawei Vodafone K4605 Andrew Bird

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).