[PATCH] usb: serial: move zte MF330 from sierra to option
From: Kevin Lloyd <[EMAIL PROTECTED]> Moves the Onda H600/ZTE MF33 device from the sierra driver to the option driver. Signed-off-by: Kevin Lloyd <[EMAIL PROTECTED]> --- drivers/usb/serial/sierra.c | 1 - drivers/usb/serial/option.c | 2 + 2 files changed, 2 insertions(+), 1 deletion(-) --- linux-2.6.25-rc1/drivers/usb/serial/sierra.c.orig 2008-02-11 11:34:06.0 -0800 +++ linux-2.6.25-rc1/drivers/usb/serial/sierra.c2008-02-11 11:34:36.0 -0800 @@ -178,7 +178,6 @@ static struct usb_device_id id_table [] { USB_DEVICE(0x1199, 0x0112), .driver_info = DEVICE_1_PORT }, /* Sierra Wireless AirCard 580 */ { USB_DEVICE(0x0F3D, 0x0112), .driver_info = DEVICE_1_PORT }, /* Airprime/Sierra PC 5220 */ - { USB_DEVICE(0x05C6, 0x6613), .driver_info = DEVICE_1_PORT }, /* Onda H600/ZTE MF330 */ { USB_DEVICE(0x1199, 0x0FFF), .driver_info = DEVICE_INSTALLER}, { } --- linux-2.6.25-rc1/drivers/usb/serial/option.c.orig 2008-02-11 11:42:10.0 -0800 +++ linux-2.6.25-rc1/drivers/usb/serial/option.c2008-02-11 11:42:18.0 -0800 @@ -121,6 +121,8 @@ static int option_send_setup(struct usb #define BANDRICH_PRODUCT_C100_1 0x1002 #define BANDRICH_PRODUCT_C100_2 0x1003 +#define QUALCOMM_VENDOR_ID 0x05C6 + static struct usb_device_id option_ids[] = { { USB_DEVICE(OPTION_VENDOR_ID, OPTION_PRODUCT_COLT) }, { USB_DEVICE(OPTION_VENDOR_ID, OPTION_PRODUCT_RICOLA) }, @@ -186,6 +188,7 @@ static struct usb_device_id option_ids[] { USB_DEVICE(ANYDATA_VENDOR_ID, ANYDATA_PRODUCT_ADU_500A) }, { USB_DEVICE(BANDRICH_VENDOR_ID, BANDRICH_PRODUCT_C100_1) }, { USB_DEVICE(BANDRICH_VENDOR_ID, BANDRICH_PRODUCT_C100_2) }, + { USB_DEVICE(QUALCOMM_VENDOR_ID, 0x6613)}, /* Onda H600/ZTE MF330 */ { } /* Terminating entry */ }; MODULE_DEVICE_TABLE(usb, option_ids); -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
[PATCH] usb: serial: move zte MF330 from sierra to option
From: Kevin Lloyd [EMAIL PROTECTED] Moves the Onda H600/ZTE MF33 device from the sierra driver to the option driver. Signed-off-by: Kevin Lloyd [EMAIL PROTECTED] --- drivers/usb/serial/sierra.c | 1 - drivers/usb/serial/option.c | 2 + 2 files changed, 2 insertions(+), 1 deletion(-) --- linux-2.6.25-rc1/drivers/usb/serial/sierra.c.orig 2008-02-11 11:34:06.0 -0800 +++ linux-2.6.25-rc1/drivers/usb/serial/sierra.c2008-02-11 11:34:36.0 -0800 @@ -178,7 +178,6 @@ static struct usb_device_id id_table [] { USB_DEVICE(0x1199, 0x0112), .driver_info = DEVICE_1_PORT }, /* Sierra Wireless AirCard 580 */ { USB_DEVICE(0x0F3D, 0x0112), .driver_info = DEVICE_1_PORT }, /* Airprime/Sierra PC 5220 */ - { USB_DEVICE(0x05C6, 0x6613), .driver_info = DEVICE_1_PORT }, /* Onda H600/ZTE MF330 */ { USB_DEVICE(0x1199, 0x0FFF), .driver_info = DEVICE_INSTALLER}, { } --- linux-2.6.25-rc1/drivers/usb/serial/option.c.orig 2008-02-11 11:42:10.0 -0800 +++ linux-2.6.25-rc1/drivers/usb/serial/option.c2008-02-11 11:42:18.0 -0800 @@ -121,6 +121,8 @@ static int option_send_setup(struct usb #define BANDRICH_PRODUCT_C100_1 0x1002 #define BANDRICH_PRODUCT_C100_2 0x1003 +#define QUALCOMM_VENDOR_ID 0x05C6 + static struct usb_device_id option_ids[] = { { USB_DEVICE(OPTION_VENDOR_ID, OPTION_PRODUCT_COLT) }, { USB_DEVICE(OPTION_VENDOR_ID, OPTION_PRODUCT_RICOLA) }, @@ -186,6 +188,7 @@ static struct usb_device_id option_ids[] { USB_DEVICE(ANYDATA_VENDOR_ID, ANYDATA_PRODUCT_ADU_500A) }, { USB_DEVICE(BANDRICH_VENDOR_ID, BANDRICH_PRODUCT_C100_1) }, { USB_DEVICE(BANDRICH_VENDOR_ID, BANDRICH_PRODUCT_C100_2) }, + { USB_DEVICE(QUALCOMM_VENDOR_ID, 0x6613)}, /* Onda H600/ZTE MF330 */ { } /* Terminating entry */ }; MODULE_DEVICE_TABLE(usb, option_ids); -- To unsubscribe from this list: send the line unsubscribe linux-kernel in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
RE: [patch 13/45] USB: sierra: add support for Onda H600/ZteMF330datacard to USB Driver for Sierra Wireless
> For now, yes, we should mirror what is going to be in the 2.6.25 kernel > release. I see the split happening for 2.6.26. So I say leave this for > now, it adds support for users of these devices. It's not that big a of a deal and I'm not sure how much of a pain it would be to change it, but if the end plan is to have it in the option.c driver and it is a one line change we might just want to get it done now? -Kevin -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
RE: [patch 13/45] USB: sierra: add support for Onda H600/ZteMF330datacard to USB Driver for Sierra Wireless
For now, yes, we should mirror what is going to be in the 2.6.25 kernel release. I see the split happening for 2.6.26. So I say leave this for now, it adds support for users of these devices. It's not that big a of a deal and I'm not sure how much of a pain it would be to change it, but if the end plan is to have it in the option.c driver and it is a one line change we might just want to get it done now? -Kevin -- To unsubscribe from this list: send the line unsubscribe linux-kernel in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
RE: [patch 13/45] USB: sierra: add support for Onda H600/Zte MF330datacard to USB Driver for Sierra Wireless
> 2.6.24-stable review patch. If anyone has any objections, please let us > know. > > -- > From: Bruno Redondi <[EMAIL PROTECTED]> > > Added support for Onda H600/Zte MF330 GPRS/UMTS/HSDPA datacard Per our earlier discussion we probably don't want to have this one in the Sierra driver. -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
RE: [patch 13/45] USB: sierra: add support for Onda H600/Zte MF330datacard to USB Driver for Sierra Wireless
2.6.24-stable review patch. If anyone has any objections, please let us know. -- From: Bruno Redondi [EMAIL PROTECTED] Added support for Onda H600/Zte MF330 GPRS/UMTS/HSDPA datacard Per our earlier discussion we probably don't want to have this one in the Sierra driver. -- To unsubscribe from this list: send the line unsubscribe linux-kernel in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
RE: [PATCH] usb-serial: Sierra driver - add devices and update dtr
> > Correct, the 0x0023 is the only newly added device that requires the new > > features. > > Does that mean things will not work for this device if it is added to > the device table, without the code updates? Adding the device will not break the driver (assuming you remove the tag). > And is this device even public yet? No, but we are trying to add native support for devices into kernels well before they are released in an effort give better native support to end-users. > > When do you expect the other changes will be propagated to the kernel? > > Would it be in a 2.6.24.x point release or will they have to wait until > > 2.6.25? > > They will have to wait until 2.6.25, they are too big to go into 2.6.24 > (we are in severe bug-fix mode only right now for .24). Darn. Thanks, -Kevin -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
RE: [PATCH] usb-serial: Sierra driver - add devices and update dtr
Correct, the 0x0023 is the only newly added device that requires the new features. Does that mean things will not work for this device if it is added to the device table, without the code updates? Adding the device will not break the driver (assuming you remove the tag). And is this device even public yet? No, but we are trying to add native support for devices into kernels well before they are released in an effort give better native support to end-users. When do you expect the other changes will be propagated to the kernel? Would it be in a 2.6.24.x point release or will they have to wait until 2.6.25? They will have to wait until 2.6.25, they are too big to go into 2.6.24 (we are in severe bug-fix mode only right now for .24). Darn. Thanks, -Kevin -- To unsubscribe from this list: send the line unsubscribe linux-kernel in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
RE: [PATCH] usb-serial: Sierra driver - add devices and update dtr
> Hm, no, the intrusion into the driver is just too much this late in the > release cycle to allow this. > > Now I will be glad to only add the new device ids for the devices that > do not rely on the new changes right now, but that's it. > > So, right now I have a separate patch split out of your original one > that is below. Should I modify it and not include some of these device > ids right now? You mention 0023, is that the only one I should remove > from this patch? Correct, the 0x0023 is the only newly added device that requires the new features. When do you expect the other changes will be propagated to the kernel? Would it be in a 2.6.24.x point release or will they have to wait until 2.6.25? Thanks, -Kevin ----- From: Kevin Lloyd <[EMAIL PROTECTED]> Subject: USB: sierra driver - add devices From: Kevin Lloyd <[EMAIL PROTECTED]> The following improvements were made: - Added new product support: MC5725, AC 880 U, MP 3G (UMTS & CDMA) Signed-off-by: Kevin Lloyd <[EMAIL PROTECTED]> Signed-off-by: Greg Kroah-Hartman <[EMAIL PROTECTED]> --- drivers/usb/serial/sierra.c |9 + 1 file changed, 9 insertions(+) --- a/drivers/usb/serial/sierra.c +++ b/drivers/usb/serial/sierra.c @@ -104,6 +104,7 @@ static struct usb_device_id id_table [] { USB_DEVICE(0x1199, 0x0019) }, /* Sierra Wireless AirCard 595 */ { USB_DEVICE(0x1199, 0x0021) }, /* Sierra Wireless AirCard 597E */ { USB_DEVICE(0x1199, 0x0120) }, /* Sierra Wireless USB Dongle 595U */ + { USB_DEVICE(0x1199, 0x0023) }, /* Sierra Wireless AirCard */ { USB_DEVICE(0x1199, 0x6802) }, /* Sierra Wireless MC8755 */ { USB_DEVICE(0x1199, 0x6804) }, /* Sierra Wireless MC8755 */ @@ -117,8 +118,12 @@ static struct usb_device_id id_table [] { USB_DEVICE(0x1199, 0x6851) }, /* Sierra Wireless AirCard 881 */ { USB_DEVICE(0x1199, 0x6852) }, /* Sierra Wireless AirCard 880 E */ { USB_DEVICE(0x1199, 0x6853) }, /* Sierra Wireless AirCard 881 E */ + { USB_DEVICE(0x1199, 0x6855) }, /* Sierra Wireless AirCard 880 U */ { USB_DEVICE(0x1199, 0x6856) }, /* Sierra Wireless AirCard 881 U */ + { USB_DEVICE(0x1199, 0x6468) }, /* Sierra Wireless MP3G - EVDO */ + { USB_DEVICE(0x1199, 0x6469) }, /* Sierra Wireless MP3G - UMTS/HSPA */ + { USB_DEVICE(0x1199, 0x0112), .driver_info = DEVICE_1_PORT }, /* Sierra Wireless AirCard 580 */ { USB_DEVICE(0x0F3D, 0x0112), .driver_info = DEVICE_1_PORT }, /* Airprime/Sierra PC 5220 */ @@ -143,6 +148,7 @@ static struct usb_device_id id_table_3po { USB_DEVICE(0x1199, 0x0019) }, /* Sierra Wireless AirCard 595 */ { USB_DEVICE(0x1199, 0x0021) }, /* Sierra Wireless AirCard 597E */ { USB_DEVICE(0x1199, 0x0120) }, /* Sierra Wireless USB Dongle 595U*/ + { USB_DEVICE(0x1199, 0x0023) }, /* Sierra Wireless AirCard */ { USB_DEVICE(0x1199, 0x6802) }, /* Sierra Wireless MC8755 */ { USB_DEVICE(0x1199, 0x6804) }, /* Sierra Wireless MC8755 */ @@ -156,7 +162,10 @@ static struct usb_device_id id_table_3po { USB_DEVICE(0x1199, 0x6851) }, /* Sierra Wireless AirCard 881 */ { USB_DEVICE(0x1199, 0x6852) }, /* Sierra Wireless AirCard 880E */ { USB_DEVICE(0x1199, 0x6853) }, /* Sierra Wireless AirCard 881E */ + { USB_DEVICE(0x1199, 0x6855) }, /* Sierra Wireless AirCard 880 U */ { USB_DEVICE(0x1199, 0x6856) }, /* Sierra Wireless AirCard 881U */ + { USB_DEVICE(0x1199, 0x6468) }, /* Sierra Wireless MP3G - EVDO */ + { USB_DEVICE(0x1199, 0x6469) }, /* Sierra Wireless MP3G - UMTS/HSPA */ { } }; -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
RE: [PATCH] usb-serial: Sierra driver - add devices and update dtr
Hm, no, the intrusion into the driver is just too much this late in the release cycle to allow this. Now I will be glad to only add the new device ids for the devices that do not rely on the new changes right now, but that's it. So, right now I have a separate patch split out of your original one that is below. Should I modify it and not include some of these device ids right now? You mention 0023, is that the only one I should remove from this patch? Correct, the 0x0023 is the only newly added device that requires the new features. When do you expect the other changes will be propagated to the kernel? Would it be in a 2.6.24.x point release or will they have to wait until 2.6.25? Thanks, -Kevin - From: Kevin Lloyd [EMAIL PROTECTED] Subject: USB: sierra driver - add devices From: Kevin Lloyd [EMAIL PROTECTED] The following improvements were made: - Added new product support: MC5725, AC 880 U, MP 3G (UMTS CDMA) Signed-off-by: Kevin Lloyd [EMAIL PROTECTED] Signed-off-by: Greg Kroah-Hartman [EMAIL PROTECTED] --- drivers/usb/serial/sierra.c |9 + 1 file changed, 9 insertions(+) --- a/drivers/usb/serial/sierra.c +++ b/drivers/usb/serial/sierra.c @@ -104,6 +104,7 @@ static struct usb_device_id id_table [] { USB_DEVICE(0x1199, 0x0019) }, /* Sierra Wireless AirCard 595 */ { USB_DEVICE(0x1199, 0x0021) }, /* Sierra Wireless AirCard 597E */ { USB_DEVICE(0x1199, 0x0120) }, /* Sierra Wireless USB Dongle 595U */ + { USB_DEVICE(0x1199, 0x0023) }, /* Sierra Wireless AirCard */ { USB_DEVICE(0x1199, 0x6802) }, /* Sierra Wireless MC8755 */ { USB_DEVICE(0x1199, 0x6804) }, /* Sierra Wireless MC8755 */ @@ -117,8 +118,12 @@ static struct usb_device_id id_table [] { USB_DEVICE(0x1199, 0x6851) }, /* Sierra Wireless AirCard 881 */ { USB_DEVICE(0x1199, 0x6852) }, /* Sierra Wireless AirCard 880 E */ { USB_DEVICE(0x1199, 0x6853) }, /* Sierra Wireless AirCard 881 E */ + { USB_DEVICE(0x1199, 0x6855) }, /* Sierra Wireless AirCard 880 U */ { USB_DEVICE(0x1199, 0x6856) }, /* Sierra Wireless AirCard 881 U */ + { USB_DEVICE(0x1199, 0x6468) }, /* Sierra Wireless MP3G - EVDO */ + { USB_DEVICE(0x1199, 0x6469) }, /* Sierra Wireless MP3G - UMTS/HSPA */ + { USB_DEVICE(0x1199, 0x0112), .driver_info = DEVICE_1_PORT }, /* Sierra Wireless AirCard 580 */ { USB_DEVICE(0x0F3D, 0x0112), .driver_info = DEVICE_1_PORT }, /* Airprime/Sierra PC 5220 */ @@ -143,6 +148,7 @@ static struct usb_device_id id_table_3po { USB_DEVICE(0x1199, 0x0019) }, /* Sierra Wireless AirCard 595 */ { USB_DEVICE(0x1199, 0x0021) }, /* Sierra Wireless AirCard 597E */ { USB_DEVICE(0x1199, 0x0120) }, /* Sierra Wireless USB Dongle 595U*/ + { USB_DEVICE(0x1199, 0x0023) }, /* Sierra Wireless AirCard */ { USB_DEVICE(0x1199, 0x6802) }, /* Sierra Wireless MC8755 */ { USB_DEVICE(0x1199, 0x6804) }, /* Sierra Wireless MC8755 */ @@ -156,7 +162,10 @@ static struct usb_device_id id_table_3po { USB_DEVICE(0x1199, 0x6851) }, /* Sierra Wireless AirCard 881 */ { USB_DEVICE(0x1199, 0x6852) }, /* Sierra Wireless AirCard 880E */ { USB_DEVICE(0x1199, 0x6853) }, /* Sierra Wireless AirCard 881E */ + { USB_DEVICE(0x1199, 0x6855) }, /* Sierra Wireless AirCard 880 U */ { USB_DEVICE(0x1199, 0x6856) }, /* Sierra Wireless AirCard 881U */ + { USB_DEVICE(0x1199, 0x6468) }, /* Sierra Wireless MP3G - EVDO */ + { USB_DEVICE(0x1199, 0x6469) }, /* Sierra Wireless MP3G - UMTS/HSPA */ { } }; -- To unsubscribe from this list: send the line unsubscribe linux-kernel in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
RE: [PATCH] usb-serial: Sierra driver - add devices and update dtr
> Those device ids are already in my tree, as it was my understanding that > you would not be sending me patches for them :) You're right, I normally wouldn't, but since someone else already had, I figured it would be alright. > I'll split this patch up into something that updates the device ids and > then does all of the other changes. The device ids can go into 2.6.24 > (and -stable if I miss the merge window), but the other changes should > wait until 2.6.25. > > Any objection to this? Actually some of the added functionality (calc_num_ports) is required for device 0x0023 and will be necessary for future devices (should someone want to add the VID/PID of a new device it will likely require the added support). So my preference would be to please include the other changes in the 2.6.24 release. Thanks, -Kevin -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
RE: [PATCH] usb-serial: Sierra driver - add devices and update dtr
Those device ids are already in my tree, as it was my understanding that you would not be sending me patches for them :) You're right, I normally wouldn't, but since someone else already had, I figured it would be alright. I'll split this patch up into something that updates the device ids and then does all of the other changes. The device ids can go into 2.6.24 (and -stable if I miss the merge window), but the other changes should wait until 2.6.25. Any objection to this? Actually some of the added functionality (calc_num_ports) is required for device 0x0023 and will be necessary for future devices (should someone want to add the VID/PID of a new device it will likely require the added support). So my preference would be to please include the other changes in the 2.6.24 release. Thanks, -Kevin -- To unsubscribe from this list: send the line unsubscribe linux-kernel in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
[PATCH] usb-serial: Sierra driver - add devices and update dtr
From: Kevin Lloyd <[EMAIL PROTECTED]> This patch is targeted for the 2.6.24-rc7 kernel. The following improvements were made: - Added new product support: MC5725, AC 880 U, MP 3G (UMTS & CDMA) - Fixed control line issue where asserting DTR on ep5 would close ep2 - Added support for calc_num_ports (will help support future composite devices) This also covers the devices added by [EMAIL PROTECTED] and [EMAIL PROTECTED] since their patches were not committed to the 2.6.23-rc7 kernel. Signed-off-by: Kevin Lloyd <[EMAIL PROTECTED]> --- --- /home/shared/kernels/linux-2.6.24-rc7-final/drivers/usb/serial/sierra.c.orig 2008-01-09 17:37:40.0 -0800 +++ /home/shared/kernels/linux-2.6.24-rc7-final/drivers/usb/serial/sierra.c 2008-01-10 11:08:57.0 -0800 @@ -1,7 +1,7 @@ /* USB Driver for Sierra Wireless - Copyright (C) 2006, 2007 Kevin Lloyd <[EMAIL PROTECTED]> + Copyright (C) 2008 Kevin Lloyd <[EMAIL PROTECTED]> IMPORTANT DISCLAIMER: This driver is not commercially supported by Sierra Wireless. Use at your own risk. @@ -14,7 +14,7 @@ Whom based his on the Keyspan driver by Hugh Blemings <[EMAIL PROTECTED]> */ -#define DRIVER_VERSION "v.1.2.5b" +#define DRIVER_VERSION "v.1.2.7" #define DRIVER_AUTHOR "Kevin Lloyd <[EMAIL PROTECTED]>" #define DRIVER_DESC "USB Driver for Sierra Wireless USB modems" @@ -26,10 +26,12 @@ #include #include #include +#include +#define SWIMS_USB_REQUEST_SetPower 0x00 +#define SWIMS_USB_REQUEST_SetNmea 0x07 #define SWIMS_USB_REQUEST_SetMode 0x0B -#define SWIMS_USB_REQUEST_TYPE_SetMode 0x40 -#define SWIMS_USB_INDEX_SetMode0x +#define SWIMS_USB_REQUEST_TYPE_VSC_SET 0x40 #define SWIMS_SET_MODE_Modem 0x0001 /* per port private data */ @@ -38,6 +40,8 @@ #define IN_BUFLEN 4096 static int debug; +static int nmea = 0; +static int truinstall = 1; enum devicetype { DEVICE_3_PORT = 0, @@ -50,48 +54,90 @@ static int sierra_set_power_state(struct int result; dev_dbg(>dev, "%s", "SET POWER STATE"); result = usb_control_msg(udev, usb_sndctrlpipe(udev, 0), - 0x00, /* __u8 request */ - 0x40, /* __u8 request type */ - swiState, /* __u16 value */ - 0, /* __u16 index */ - NULL, /* void *data*/ - 0, /* __u16 size*/ - USB_CTRL_SET_TIMEOUT); /* int timeout */ + SWIMS_USB_REQUEST_SetPower, /* __u8 request */ + SWIMS_USB_REQUEST_TYPE_VSC_SET, /* __u8 request type */ + swiState, /* __u16 value */ + 0, /* __u16 index */ + NULL, /* void *data*/ + 0, /* __u16 size*/ + USB_CTRL_SET_TIMEOUT); /* int timeout */ return result; } -static int sierra_set_ms_mode(struct usb_device *udev, __u16 eSocMode) +static int sierra_set_ms_mode(struct usb_device *udev, __u16 eSWocMode) { int result; dev_dbg(>dev, "%s", "DEVICE MODE SWITCH"); result = usb_control_msg(udev, usb_sndctrlpipe(udev, 0), SWIMS_USB_REQUEST_SetMode, /* __u8 request */ - SWIMS_USB_REQUEST_TYPE_SetMode, /* __u8 request type */ - eSocMode, /* __u16 value */ - SWIMS_USB_INDEX_SetMode,/* __u16 index */ + SWIMS_USB_REQUEST_TYPE_VSC_SET, /* __u8 request type */ + eSWocMode, /* __u16 value */ + 0x, /* __u16 index */ NULL, /* void *data*/ 0, /* __u16 size*/ USB_CTRL_SET_TIMEOUT); /* int timeout */ return result; } -static int sierra_probe(struct usb_interface *iface, - const struct usb_device_id *id) +int sierra_vsc_set_nmea(struct usb_device *udev, __u16 enable) { int result; + dev_dbg(>dev, "%s", "NMEA Enable sent"); + result = usb_control_msg(udev, usb_sndctrlpipe(udev, 0), + SWIMS_USB_REQUEST_SetNmea, /* __u8 request */ + SWIMS_USB_REQUEST_TYPE_VSC_SET, /* __u8 request type */ +
[PATCH] usb-serial: Sierra driver - add devices and update dtr
From: Kevin Lloyd [EMAIL PROTECTED] This patch is targeted for the 2.6.24-rc7 kernel. The following improvements were made: - Added new product support: MC5725, AC 880 U, MP 3G (UMTS CDMA) - Fixed control line issue where asserting DTR on ep5 would close ep2 - Added support for calc_num_ports (will help support future composite devices) This also covers the devices added by [EMAIL PROTECTED] and [EMAIL PROTECTED] since their patches were not committed to the 2.6.23-rc7 kernel. Signed-off-by: Kevin Lloyd [EMAIL PROTECTED] --- --- /home/shared/kernels/linux-2.6.24-rc7-final/drivers/usb/serial/sierra.c.orig 2008-01-09 17:37:40.0 -0800 +++ /home/shared/kernels/linux-2.6.24-rc7-final/drivers/usb/serial/sierra.c 2008-01-10 11:08:57.0 -0800 @@ -1,7 +1,7 @@ /* USB Driver for Sierra Wireless - Copyright (C) 2006, 2007 Kevin Lloyd [EMAIL PROTECTED] + Copyright (C) 2008 Kevin Lloyd [EMAIL PROTECTED] IMPORTANT DISCLAIMER: This driver is not commercially supported by Sierra Wireless. Use at your own risk. @@ -14,7 +14,7 @@ Whom based his on the Keyspan driver by Hugh Blemings [EMAIL PROTECTED] */ -#define DRIVER_VERSION v.1.2.5b +#define DRIVER_VERSION v.1.2.7 #define DRIVER_AUTHOR Kevin Lloyd [EMAIL PROTECTED] #define DRIVER_DESC USB Driver for Sierra Wireless USB modems @@ -26,10 +26,12 @@ #include linux/module.h #include linux/usb.h #include linux/usb/serial.h +#include linux/usb/ch9.h +#define SWIMS_USB_REQUEST_SetPower 0x00 +#define SWIMS_USB_REQUEST_SetNmea 0x07 #define SWIMS_USB_REQUEST_SetMode 0x0B -#define SWIMS_USB_REQUEST_TYPE_SetMode 0x40 -#define SWIMS_USB_INDEX_SetMode0x +#define SWIMS_USB_REQUEST_TYPE_VSC_SET 0x40 #define SWIMS_SET_MODE_Modem 0x0001 /* per port private data */ @@ -38,6 +40,8 @@ #define IN_BUFLEN 4096 static int debug; +static int nmea = 0; +static int truinstall = 1; enum devicetype { DEVICE_3_PORT = 0, @@ -50,48 +54,90 @@ static int sierra_set_power_state(struct int result; dev_dbg(udev-dev, %s, SET POWER STATE); result = usb_control_msg(udev, usb_sndctrlpipe(udev, 0), - 0x00, /* __u8 request */ - 0x40, /* __u8 request type */ - swiState, /* __u16 value */ - 0, /* __u16 index */ - NULL, /* void *data*/ - 0, /* __u16 size*/ - USB_CTRL_SET_TIMEOUT); /* int timeout */ + SWIMS_USB_REQUEST_SetPower, /* __u8 request */ + SWIMS_USB_REQUEST_TYPE_VSC_SET, /* __u8 request type */ + swiState, /* __u16 value */ + 0, /* __u16 index */ + NULL, /* void *data*/ + 0, /* __u16 size*/ + USB_CTRL_SET_TIMEOUT); /* int timeout */ return result; } -static int sierra_set_ms_mode(struct usb_device *udev, __u16 eSocMode) +static int sierra_set_ms_mode(struct usb_device *udev, __u16 eSWocMode) { int result; dev_dbg(udev-dev, %s, DEVICE MODE SWITCH); result = usb_control_msg(udev, usb_sndctrlpipe(udev, 0), SWIMS_USB_REQUEST_SetMode, /* __u8 request */ - SWIMS_USB_REQUEST_TYPE_SetMode, /* __u8 request type */ - eSocMode, /* __u16 value */ - SWIMS_USB_INDEX_SetMode,/* __u16 index */ + SWIMS_USB_REQUEST_TYPE_VSC_SET, /* __u8 request type */ + eSWocMode, /* __u16 value */ + 0x, /* __u16 index */ NULL, /* void *data*/ 0, /* __u16 size*/ USB_CTRL_SET_TIMEOUT); /* int timeout */ return result; } -static int sierra_probe(struct usb_interface *iface, - const struct usb_device_id *id) +int sierra_vsc_set_nmea(struct usb_device *udev, __u16 enable) { int result; + dev_dbg(udev-dev, %s, NMEA Enable sent); + result = usb_control_msg(udev, usb_sndctrlpipe(udev, 0), + SWIMS_USB_REQUEST_SetNmea, /* __u8 request */ + SWIMS_USB_REQUEST_TYPE_VSC_SET, /* __u8 request type */ + enable, /* __u16 value */ + 0x
[PATCH 02/02] USB: sierra: Add new devices
From: Kevin Lloyd <[EMAIL PROTECTED]> This patch adds new devices to the Sierra Wireless driver. This is being resubmitted because the dependent patch (patch 01/02) needed to be resubmitted. This patch depends on the recently submitted TRU-Install Patch (patch 01/02). There were previous submissions on 7/11/2007 & 7/12/2007, please disregard those. Signed-off-by: Kevin Lloyd <[EMAIL PROTECTED]> --- diff -uprN -X dontdiff b/drivers/usb/serial/sierra.c c/drivers/usb/serial/sierra.c --- b/drivers/usb/serial/sierra.c 2007-07-16 10:35:59.0 -0700 +++ c/drivers/usb/serial/sierra.c 2007-07-16 10:35:47.0 -0700 @@ -14,7 +14,7 @@ Whom based his on the Keyspan driver by Hugh Blemings <[EMAIL PROTECTED]> */ -#define DRIVER_VERSION "v.1.2.4b" +#define DRIVER_VERSION "v.1.2.5b" #define DRIVER_AUTHOR "Kevin Lloyd <[EMAIL PROTECTED]>" #define DRIVER_DESC "USB Driver for Sierra Wireless USB modems" @@ -96,20 +96,29 @@ int sierra_probe(struct usb_interface *i static struct usb_device_id id_table [] = { { USB_DEVICE(0x1199, 0x0017) }, /* Sierra Wireless EM5625 */ { USB_DEVICE(0x1199, 0x0018) }, /* Sierra Wireless MC5720 */ + { USB_DEVICE(0x0f30, 0x1b1d) }, /* Sierra Wireless MC5720 */ { USB_DEVICE(0x1199, 0x0218) }, /* Sierra Wireless MC5720 */ { USB_DEVICE(0x1199, 0x0020) }, /* Sierra Wireless MC5725 */ { USB_DEVICE(0x1199, 0x0019) }, /* Sierra Wireless AirCard 595 */ - { USB_DEVICE(0x1199, 0x0120) }, /* Sierra Wireless AirCard 595U */ { USB_DEVICE(0x1199, 0x0021) }, /* Sierra Wireless AirCard 597E */ + { USB_DEVICE(0x1199, 0x0120) }, /* Sierra Wireless USB Dongle 595U*/ + { USB_DEVICE(0x1199, 0x6802) }, /* Sierra Wireless MC8755 */ { USB_DEVICE(0x1199, 0x6804) }, /* Sierra Wireless MC8755 */ { USB_DEVICE(0x1199, 0x6803) }, /* Sierra Wireless MC8765 */ - { USB_DEVICE(0x1199, 0x6812) }, /* Sierra Wireless MC8775 */ + { USB_DEVICE(0x1199, 0x6812) }, /* Sierra Wireless MC8775 & AC 875U */ { USB_DEVICE(0x1199, 0x6820) }, /* Sierra Wireless AirCard 875 */ + { USB_DEVICE(0x1199, 0x6832) }, /* Sierra Wireless MC8780*/ + { USB_DEVICE(0x1199, 0x6833) }, /* Sierra Wireless MC8781*/ + { USB_DEVICE(0x1199, 0x6850) }, /* Sierra Wireless AirCard 880 */ + { USB_DEVICE(0x1199, 0x6851) }, /* Sierra Wireless AirCard 881 */ + { USB_DEVICE(0x1199, 0x6852) }, /* Sierra Wireless AirCard 880 E */ + { USB_DEVICE(0x1199, 0x6853) }, /* Sierra Wireless AirCard 881 E */ { USB_DEVICE(0x1199, 0x0112), .driver_info = DEVICE_1_PORT }, /* Sierra Wireless AirCard 580 */ { USB_DEVICE(0x0F3D, 0x0112), .driver_info = DEVICE_1_PORT }, /* Airprime/Sierra PC 5220 */ - + + { USB_DEVICE(0x1199, 0x0FFF), .driver_info = DEVICE_INSTALLER}, { } }; @@ -122,21 +131,26 @@ static struct usb_device_id id_table_1po }; static struct usb_device_id id_table_3port [] = { - /* CDMA Devices */ { USB_DEVICE(0x1199, 0x0017) }, /* Sierra Wireless EM5625 */ { USB_DEVICE(0x1199, 0x0018) }, /* Sierra Wireless MC5720 */ + { USB_DEVICE(0x0f30, 0x1b1d) }, /* Sierra Wireless MC5720 */ { USB_DEVICE(0x1199, 0x0218) }, /* Sierra Wireless MC5720 */ { USB_DEVICE(0x1199, 0x0020) }, /* Sierra Wireless MC5725 */ { USB_DEVICE(0x1199, 0x0019) }, /* Sierra Wireless AirCard 595 */ - { USB_DEVICE(0x1199, 0x0120) }, /* Sierra Wireless AirCard 595U */ { USB_DEVICE(0x1199, 0x0021) }, /* Sierra Wireless AirCard 597E */ - - /* GSM/UMTS Devices */ + { USB_DEVICE(0x1199, 0x0120) }, /* Sierra Wireless USB Dongle 595U*/ + { USB_DEVICE(0x1199, 0x6802) }, /* Sierra Wireless MC8755 */ { USB_DEVICE(0x1199, 0x6804) }, /* Sierra Wireless MC8755 */ { USB_DEVICE(0x1199, 0x6803) }, /* Sierra Wireless MC8765 */ - { USB_DEVICE(0x1199, 0x6812) }, /* Sierra Wireless MC8775 */ + { USB_DEVICE(0x1199, 0x6812) }, /* Sierra Wireless MC8775 & AC 875U */ { USB_DEVICE(0x1199, 0x6820) }, /* Sierra Wireless AirCard 875 */ + { USB_DEVICE(0x1199, 0x6832) }, /* Sierra Wireless MC8780*/ + { USB_DEVICE(0x1199, 0x6833) }, /* Sierra Wireless MC8781*/ + { USB_DEVICE(0x1199, 0x6850) }, /* Sierra Wireless AirCard 880 */ + { USB_DEVICE(0x1199, 0x6851) }, /* Sierra Wireless AirCard 881 */ + { USB_DEVICE(0x1199, 0x6852) }, /* Sierra Wireless AirCard 880E */ + { USB_DEVICE(0x1199, 0x6853) }, /* Sierra Wireless AirCard 881E */ { } }; - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
[PATCH 01/02] USB: sierra: Add TRU-Install (c) Support [ATTEMPT 5]
From: Kevin Lloyd <[EMAIL PROTECTED]> This patch adds compatibility with Sierra Wireless' new TRU-Install feature. Future devices that use this feature will not work unless this patch has been applied. This recent attempt fixes the return of the probe function so that the device does not bind when in "install mode." This patch was tested on the 2.6.22-git6 driver. There were previous submissions for similar support (6/6/2007 & 6/5/2007 & 7/11/2007 & 7/12/2007) they were however rejected so please disregard those. Signed-off-by: Kevin Lloyd <[EMAIL PROTECTED]> --- diff -uprN a/drivers/usb/serial/sierra.c b/drivers/usb/serial/sierra.c --- a/drivers/usb/serial/sierra.c 2007-07-10 16:53:07.0 -0700 +++ b/drivers/usb/serial/sierra.c 2007-07-16 10:35:59.0 -0700 @@ -1,7 +1,7 @@ /* USB Driver for Sierra Wireless - Copyright (C) 2006 Kevin Lloyd <[EMAIL PROTECTED]> + Copyright (C) 2007 Kevin Lloyd <[EMAIL PROTECTED]> IMPORTANT DISCLAIMER: This driver is not commercially supported by Sierra Wireless. Use at your own risk. @@ -12,10 +12,9 @@ Portions based on the option driver by Matthias Urlichs <[EMAIL PROTECTED]> Whom based his on the Keyspan driver by Hugh Blemings <[EMAIL PROTECTED]> - */ -#define DRIVER_VERSION "v.1.0.6" +#define DRIVER_VERSION "v.1.2.4b" #define DRIVER_AUTHOR "Kevin Lloyd <[EMAIL PROTECTED]>" #define DRIVER_DESC "USB Driver for Sierra Wireless USB modems" @@ -28,6 +27,71 @@ #include #include +#define SWIMS_USB_REQUEST_SetMode 0x0B +#define SWIMS_USB_REQUEST_TYPE_SetMode 0x40 +#define SWIMS_USB_INDEX_SetMode0x +#define SWIMS_SET_MODE_Modem 0x0001 + +/* per port private data */ +#define N_IN_URB 4 +#define N_OUT_URB 4 +#define IN_BUFLEN 4096 + +static int debug; + +enum devicetype { + DEVICE_3_PORT = 0, + DEVICE_1_PORT = 1, + DEVICE_INSTALLER = 2, +}; + +int sierra_set_power_state(struct usb_device *udev, __u16 swiState) +{ + int result; + dev_dbg(>dev, "%s", "SET POWER STATE"); + result = usb_control_msg(udev, usb_sndctrlpipe(udev, 0), + 0x00, /* __u8 request */ + 0x40, /* __u8 request type */ + swiState, /* __u16 value */ + 0, /* __u16 index */ + NULL, /* void *data*/ + 0, /* __u16 size*/ + USB_CTRL_SET_TIMEOUT); /* int timeout */ + return result; +} + +int sierra_set_ms_mode(struct usb_device *udev, __u16 eSocMode) +{ + int result; + dev_dbg(>dev, "%s", "DEVICE MODE SWITCH"); + result = usb_control_msg(udev, usb_sndctrlpipe(udev, 0), + SWIMS_USB_REQUEST_SetMode, /* __u8 request */ + SWIMS_USB_REQUEST_TYPE_SetMode, /* __u8 request type */ + eSocMode, /* __u16 value */ + SWIMS_USB_INDEX_SetMode,/* __u16 index */ + NULL, /* void *data*/ + 0, /* __u16 size*/ + USB_CTRL_SET_TIMEOUT); /* int timeout */ + return result; +} + +int sierra_probe(struct usb_interface *iface, const struct usb_device_id *id) +{ + int result; + struct usb_device *udev; + + udev = usb_get_dev(interface_to_usbdev(iface)); + + /* Check if in installer mode */ + if (id->driver_info == DEVICE_INSTALLER){ + dev_dbg(>dev, "%s", "FOUND DEVICE(SW)\n"); + result = sierra_set_ms_mode(udev, SWIMS_SET_MODE_Modem); + /*We do not want to bind to the device when in installer mode*/ + return -EIO; + } + + return usb_serial_probe(iface, id); +} static struct usb_device_id id_table [] = { { USB_DEVICE(0x1199, 0x0017) }, /* Sierra Wireless EM5625 */ @@ -43,8 +107,10 @@ static struct usb_device_id id_table [] { USB_DEVICE(0x1199, 0x6812) }, /* Sierra Wireless MC8775 */ { USB_DEVICE(0x1199, 0x6820) }, /* Sierra Wireless AirCard 875 */ - { USB_DEVICE(0x1199, 0x0112) }, /* Sierra Wireless AirCard 580 */ - { USB_DEVICE(0x0F3D, 0x0112) }, /* AirPrime/Sierra PC 5220 */ + { USB_DEVICE(0x1199, 0x0112), .driver_info = DEVICE_1_PORT }, /* Sierra Wireless AirCard 580 */ + { USB_DEVICE(0x0F3D, 0x0112), .driver_info = DEVICE_1_PORT }, /* Airprime/Sierra PC 5220 */ + + { USB_DEVICE(0x1199, 0x0FFF), .driver_info = DEVICE_INSTALLER},
RE: [linux-usb-devel] [PATCH 01/02] USB: sierra: Add TRU-Install (c) Support [ATTEMPT 4]
Ah, thanks for spelling it out for me :) I misunderstood you before. - Kevin -Original Message- From: Oliver Neukum [mailto:[EMAIL PROTECTED] Sent: Monday, July 16, 2007 4:55 AM To: [EMAIL PROTECTED] Cc: Kevin Lloyd; [EMAIL PROTECTED]; Linux Development Group; [EMAIL PROTECTED]; linux-kernel@vger.kernel.org Subject: Re: [linux-usb-devel] [PATCH 01/02] USB: sierra: Add TRU-Install (c) Support [ATTEMPT 4] Am Freitag 13 Juli 2007 schrieb Kevin Lloyd: > +int sierra_probe(struct usb_interface *iface, const struct > +usb_device_id *id) { > + int result; > + struct usb_device *udev; > + > + udev = usb_get_dev(interface_to_usbdev(iface)); > + > + /* Check if in installer mode */ > + if (id->driver_info == DEVICE_INSTALLER){ > + dev_dbg(>dev, "%s", "FOUND DEVICE(SW)\n"); > + result = sierra_set_ms_mode(udev, > +SWIMS_SET_MODE_Modem); > + return result; As I mentioned, you'd better return -EIO here. You don't want to bind to the device, as it is not yet a serial device and you want the driver core to stop trying while it goes away and transforms itself. Regards Oliver - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
RE: [linux-usb-devel] [PATCH 01/02] USB: sierra: Add TRU-Install (c) Support [ATTEMPT 4]
Ah, thanks for spelling it out for me :) I misunderstood you before. - Kevin -Original Message- From: Oliver Neukum [mailto:[EMAIL PROTECTED] Sent: Monday, July 16, 2007 4:55 AM To: [EMAIL PROTECTED] Cc: Kevin Lloyd; [EMAIL PROTECTED]; Linux Development Group; [EMAIL PROTECTED]; linux-kernel@vger.kernel.org Subject: Re: [linux-usb-devel] [PATCH 01/02] USB: sierra: Add TRU-Install (c) Support [ATTEMPT 4] Am Freitag 13 Juli 2007 schrieb Kevin Lloyd: +int sierra_probe(struct usb_interface *iface, const struct +usb_device_id *id) { + int result; + struct usb_device *udev; + + udev = usb_get_dev(interface_to_usbdev(iface)); + + /* Check if in installer mode */ + if (id-driver_info == DEVICE_INSTALLER){ + dev_dbg(udev-dev, %s, FOUND DEVICE(SW)\n); + result = sierra_set_ms_mode(udev, +SWIMS_SET_MODE_Modem); + return result; As I mentioned, you'd better return -EIO here. You don't want to bind to the device, as it is not yet a serial device and you want the driver core to stop trying while it goes away and transforms itself. Regards Oliver - To unsubscribe from this list: send the line unsubscribe linux-kernel in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
[PATCH 01/02] USB: sierra: Add TRU-Install (c) Support [ATTEMPT 5]
From: Kevin Lloyd [EMAIL PROTECTED] This patch adds compatibility with Sierra Wireless' new TRU-Install feature. Future devices that use this feature will not work unless this patch has been applied. This recent attempt fixes the return of the probe function so that the device does not bind when in install mode. This patch was tested on the 2.6.22-git6 driver. There were previous submissions for similar support (6/6/2007 6/5/2007 7/11/2007 7/12/2007) they were however rejected so please disregard those. Signed-off-by: Kevin Lloyd [EMAIL PROTECTED] --- diff -uprN a/drivers/usb/serial/sierra.c b/drivers/usb/serial/sierra.c --- a/drivers/usb/serial/sierra.c 2007-07-10 16:53:07.0 -0700 +++ b/drivers/usb/serial/sierra.c 2007-07-16 10:35:59.0 -0700 @@ -1,7 +1,7 @@ /* USB Driver for Sierra Wireless - Copyright (C) 2006 Kevin Lloyd [EMAIL PROTECTED] + Copyright (C) 2007 Kevin Lloyd [EMAIL PROTECTED] IMPORTANT DISCLAIMER: This driver is not commercially supported by Sierra Wireless. Use at your own risk. @@ -12,10 +12,9 @@ Portions based on the option driver by Matthias Urlichs [EMAIL PROTECTED] Whom based his on the Keyspan driver by Hugh Blemings [EMAIL PROTECTED] - */ -#define DRIVER_VERSION v.1.0.6 +#define DRIVER_VERSION v.1.2.4b #define DRIVER_AUTHOR Kevin Lloyd [EMAIL PROTECTED] #define DRIVER_DESC USB Driver for Sierra Wireless USB modems @@ -28,6 +27,71 @@ #include linux/usb.h #include linux/usb/serial.h +#define SWIMS_USB_REQUEST_SetMode 0x0B +#define SWIMS_USB_REQUEST_TYPE_SetMode 0x40 +#define SWIMS_USB_INDEX_SetMode0x +#define SWIMS_SET_MODE_Modem 0x0001 + +/* per port private data */ +#define N_IN_URB 4 +#define N_OUT_URB 4 +#define IN_BUFLEN 4096 + +static int debug; + +enum devicetype { + DEVICE_3_PORT = 0, + DEVICE_1_PORT = 1, + DEVICE_INSTALLER = 2, +}; + +int sierra_set_power_state(struct usb_device *udev, __u16 swiState) +{ + int result; + dev_dbg(udev-dev, %s, SET POWER STATE); + result = usb_control_msg(udev, usb_sndctrlpipe(udev, 0), + 0x00, /* __u8 request */ + 0x40, /* __u8 request type */ + swiState, /* __u16 value */ + 0, /* __u16 index */ + NULL, /* void *data*/ + 0, /* __u16 size*/ + USB_CTRL_SET_TIMEOUT); /* int timeout */ + return result; +} + +int sierra_set_ms_mode(struct usb_device *udev, __u16 eSocMode) +{ + int result; + dev_dbg(udev-dev, %s, DEVICE MODE SWITCH); + result = usb_control_msg(udev, usb_sndctrlpipe(udev, 0), + SWIMS_USB_REQUEST_SetMode, /* __u8 request */ + SWIMS_USB_REQUEST_TYPE_SetMode, /* __u8 request type */ + eSocMode, /* __u16 value */ + SWIMS_USB_INDEX_SetMode,/* __u16 index */ + NULL, /* void *data*/ + 0, /* __u16 size*/ + USB_CTRL_SET_TIMEOUT); /* int timeout */ + return result; +} + +int sierra_probe(struct usb_interface *iface, const struct usb_device_id *id) +{ + int result; + struct usb_device *udev; + + udev = usb_get_dev(interface_to_usbdev(iface)); + + /* Check if in installer mode */ + if (id-driver_info == DEVICE_INSTALLER){ + dev_dbg(udev-dev, %s, FOUND DEVICE(SW)\n); + result = sierra_set_ms_mode(udev, SWIMS_SET_MODE_Modem); + /*We do not want to bind to the device when in installer mode*/ + return -EIO; + } + + return usb_serial_probe(iface, id); +} static struct usb_device_id id_table [] = { { USB_DEVICE(0x1199, 0x0017) }, /* Sierra Wireless EM5625 */ @@ -43,8 +107,10 @@ static struct usb_device_id id_table [] { USB_DEVICE(0x1199, 0x6812) }, /* Sierra Wireless MC8775 */ { USB_DEVICE(0x1199, 0x6820) }, /* Sierra Wireless AirCard 875 */ - { USB_DEVICE(0x1199, 0x0112) }, /* Sierra Wireless AirCard 580 */ - { USB_DEVICE(0x0F3D, 0x0112) }, /* AirPrime/Sierra PC 5220 */ + { USB_DEVICE(0x1199, 0x0112), .driver_info = DEVICE_1_PORT }, /* Sierra Wireless AirCard 580 */ + { USB_DEVICE(0x0F3D, 0x0112), .driver_info = DEVICE_1_PORT }, /* Airprime/Sierra PC 5220 */ + + { USB_DEVICE(0x1199, 0x0FFF), .driver_info = DEVICE_INSTALLER}, { } }; MODULE_DEVICE_TABLE(usb, id_table); @@ -56,6 +122,7 @@ static struct usb_device_id id_table_1po }; static struct usb_device_id id_table_3port [] = { + /* CDMA
[PATCH 02/02] USB: sierra: Add new devices
From: Kevin Lloyd [EMAIL PROTECTED] This patch adds new devices to the Sierra Wireless driver. This is being resubmitted because the dependent patch (patch 01/02) needed to be resubmitted. This patch depends on the recently submitted TRU-Install Patch (patch 01/02). There were previous submissions on 7/11/2007 7/12/2007, please disregard those. Signed-off-by: Kevin Lloyd [EMAIL PROTECTED] --- diff -uprN -X dontdiff b/drivers/usb/serial/sierra.c c/drivers/usb/serial/sierra.c --- b/drivers/usb/serial/sierra.c 2007-07-16 10:35:59.0 -0700 +++ c/drivers/usb/serial/sierra.c 2007-07-16 10:35:47.0 -0700 @@ -14,7 +14,7 @@ Whom based his on the Keyspan driver by Hugh Blemings [EMAIL PROTECTED] */ -#define DRIVER_VERSION v.1.2.4b +#define DRIVER_VERSION v.1.2.5b #define DRIVER_AUTHOR Kevin Lloyd [EMAIL PROTECTED] #define DRIVER_DESC USB Driver for Sierra Wireless USB modems @@ -96,20 +96,29 @@ int sierra_probe(struct usb_interface *i static struct usb_device_id id_table [] = { { USB_DEVICE(0x1199, 0x0017) }, /* Sierra Wireless EM5625 */ { USB_DEVICE(0x1199, 0x0018) }, /* Sierra Wireless MC5720 */ + { USB_DEVICE(0x0f30, 0x1b1d) }, /* Sierra Wireless MC5720 */ { USB_DEVICE(0x1199, 0x0218) }, /* Sierra Wireless MC5720 */ { USB_DEVICE(0x1199, 0x0020) }, /* Sierra Wireless MC5725 */ { USB_DEVICE(0x1199, 0x0019) }, /* Sierra Wireless AirCard 595 */ - { USB_DEVICE(0x1199, 0x0120) }, /* Sierra Wireless AirCard 595U */ { USB_DEVICE(0x1199, 0x0021) }, /* Sierra Wireless AirCard 597E */ + { USB_DEVICE(0x1199, 0x0120) }, /* Sierra Wireless USB Dongle 595U*/ + { USB_DEVICE(0x1199, 0x6802) }, /* Sierra Wireless MC8755 */ { USB_DEVICE(0x1199, 0x6804) }, /* Sierra Wireless MC8755 */ { USB_DEVICE(0x1199, 0x6803) }, /* Sierra Wireless MC8765 */ - { USB_DEVICE(0x1199, 0x6812) }, /* Sierra Wireless MC8775 */ + { USB_DEVICE(0x1199, 0x6812) }, /* Sierra Wireless MC8775 AC 875U */ { USB_DEVICE(0x1199, 0x6820) }, /* Sierra Wireless AirCard 875 */ + { USB_DEVICE(0x1199, 0x6832) }, /* Sierra Wireless MC8780*/ + { USB_DEVICE(0x1199, 0x6833) }, /* Sierra Wireless MC8781*/ + { USB_DEVICE(0x1199, 0x6850) }, /* Sierra Wireless AirCard 880 */ + { USB_DEVICE(0x1199, 0x6851) }, /* Sierra Wireless AirCard 881 */ + { USB_DEVICE(0x1199, 0x6852) }, /* Sierra Wireless AirCard 880 E */ + { USB_DEVICE(0x1199, 0x6853) }, /* Sierra Wireless AirCard 881 E */ { USB_DEVICE(0x1199, 0x0112), .driver_info = DEVICE_1_PORT }, /* Sierra Wireless AirCard 580 */ { USB_DEVICE(0x0F3D, 0x0112), .driver_info = DEVICE_1_PORT }, /* Airprime/Sierra PC 5220 */ - + + { USB_DEVICE(0x1199, 0x0FFF), .driver_info = DEVICE_INSTALLER}, { } }; @@ -122,21 +131,26 @@ static struct usb_device_id id_table_1po }; static struct usb_device_id id_table_3port [] = { - /* CDMA Devices */ { USB_DEVICE(0x1199, 0x0017) }, /* Sierra Wireless EM5625 */ { USB_DEVICE(0x1199, 0x0018) }, /* Sierra Wireless MC5720 */ + { USB_DEVICE(0x0f30, 0x1b1d) }, /* Sierra Wireless MC5720 */ { USB_DEVICE(0x1199, 0x0218) }, /* Sierra Wireless MC5720 */ { USB_DEVICE(0x1199, 0x0020) }, /* Sierra Wireless MC5725 */ { USB_DEVICE(0x1199, 0x0019) }, /* Sierra Wireless AirCard 595 */ - { USB_DEVICE(0x1199, 0x0120) }, /* Sierra Wireless AirCard 595U */ { USB_DEVICE(0x1199, 0x0021) }, /* Sierra Wireless AirCard 597E */ - - /* GSM/UMTS Devices */ + { USB_DEVICE(0x1199, 0x0120) }, /* Sierra Wireless USB Dongle 595U*/ + { USB_DEVICE(0x1199, 0x6802) }, /* Sierra Wireless MC8755 */ { USB_DEVICE(0x1199, 0x6804) }, /* Sierra Wireless MC8755 */ { USB_DEVICE(0x1199, 0x6803) }, /* Sierra Wireless MC8765 */ - { USB_DEVICE(0x1199, 0x6812) }, /* Sierra Wireless MC8775 */ + { USB_DEVICE(0x1199, 0x6812) }, /* Sierra Wireless MC8775 AC 875U */ { USB_DEVICE(0x1199, 0x6820) }, /* Sierra Wireless AirCard 875 */ + { USB_DEVICE(0x1199, 0x6832) }, /* Sierra Wireless MC8780*/ + { USB_DEVICE(0x1199, 0x6833) }, /* Sierra Wireless MC8781*/ + { USB_DEVICE(0x1199, 0x6850) }, /* Sierra Wireless AirCard 880 */ + { USB_DEVICE(0x1199, 0x6851) }, /* Sierra Wireless AirCard 881 */ + { USB_DEVICE(0x1199, 0x6852) }, /* Sierra Wireless AirCard 880E */ + { USB_DEVICE(0x1199, 0x6853) }, /* Sierra Wireless AirCard 881E */ { } }; - To unsubscribe from this list: send the line unsubscribe linux-kernel in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
[PATCH 02/02] USB: sierra: Add new devices
From: Kevin Lloyd <[EMAIL PROTECTED]> This patch adds new devices to the sierra wireless driver. This is being resubmitted because the dependent patch (patch 01/02) needed to be resubmitted. This patch was tested on the 2.6.21.1 kernel source patched with the following patches (found at http://www.kernel.org/pub/linux/kernel/people/gregkh/gregkh-2.6/patches/usb/): usb-sierra-cleanup-urb-startup.patch usb-sierra-fix-status-usage.patch usb-sierra-status.patch This patch also depends on the recently submitted TRU-Install Patch (patch 01/02). There was a previous submission on 7/11/2007, please disregard that one. Signed-off-by: Kevin Lloyd <[EMAIL PROTECTED]> --- diff -uprN -X dontdiff b/drivers/usb/serial/sierra.c c/drivers/usb/serial/sierra.c --- b/drivers/usb/serial/sierra.c 2007-07-12 09:17:44.0 -0700 +++ c/drivers/usb/serial/sierra.c 2007-07-12 09:17:18.0 -0700 @@ -14,7 +14,7 @@ Whom based his on the Keyspan driver by Hugh Blemings <[EMAIL PROTECTED]> */ -#define DRIVER_VERSION "v.1.2.4" +#define DRIVER_VERSION "v.1.2.5" #define DRIVER_AUTHOR "Kevin Lloyd <[EMAIL PROTECTED]>" #define DRIVER_DESC "USB Driver for Sierra Wireless USB modems" @@ -95,20 +95,29 @@ int sierra_probe(struct usb_interface *i static struct usb_device_id id_table [] = { { USB_DEVICE(0x1199, 0x0017) }, /* Sierra Wireless EM5625 */ { USB_DEVICE(0x1199, 0x0018) }, /* Sierra Wireless MC5720 */ + { USB_DEVICE(0x0f30, 0x1b1d) }, /* Sierra Wireless MC5720 */ { USB_DEVICE(0x1199, 0x0218) }, /* Sierra Wireless MC5720 */ { USB_DEVICE(0x1199, 0x0020) }, /* Sierra Wireless MC5725 */ { USB_DEVICE(0x1199, 0x0019) }, /* Sierra Wireless AirCard 595 */ - { USB_DEVICE(0x1199, 0x0120) }, /* Sierra Wireless AirCard 595U */ { USB_DEVICE(0x1199, 0x0021) }, /* Sierra Wireless AirCard 597E */ + { USB_DEVICE(0x1199, 0x0120) }, /* Sierra Wireless USB Dongle 595U*/ + { USB_DEVICE(0x1199, 0x6802) }, /* Sierra Wireless MC8755 */ { USB_DEVICE(0x1199, 0x6804) }, /* Sierra Wireless MC8755 */ { USB_DEVICE(0x1199, 0x6803) }, /* Sierra Wireless MC8765 */ - { USB_DEVICE(0x1199, 0x6812) }, /* Sierra Wireless MC8775 */ + { USB_DEVICE(0x1199, 0x6812) }, /* Sierra Wireless MC8775 & AC 875U */ { USB_DEVICE(0x1199, 0x6820) }, /* Sierra Wireless AirCard 875 */ + { USB_DEVICE(0x1199, 0x6832) }, /* Sierra Wireless MC8780*/ + { USB_DEVICE(0x1199, 0x6833) }, /* Sierra Wireless MC8781*/ + { USB_DEVICE(0x1199, 0x6850) }, /* Sierra Wireless AirCard 880 */ + { USB_DEVICE(0x1199, 0x6851) }, /* Sierra Wireless AirCard 881 */ + { USB_DEVICE(0x1199, 0x6852) }, /* Sierra Wireless AirCard 880 E */ + { USB_DEVICE(0x1199, 0x6853) }, /* Sierra Wireless AirCard 881 E */ { USB_DEVICE(0x1199, 0x0112), .driver_info = DEVICE_1_PORT }, /* Sierra Wireless AirCard 580 */ { USB_DEVICE(0x0F3D, 0x0112), .driver_info = DEVICE_1_PORT }, /* Airprime/Sierra PC 5220 */ - + + { USB_DEVICE(0x1199, 0x0FFF), .driver_info = DEVICE_INSTALLER}, { } }; @@ -121,21 +130,26 @@ static struct usb_device_id id_table_1po }; static struct usb_device_id id_table_3port [] = { - /* CDMA Devices */ { USB_DEVICE(0x1199, 0x0017) }, /* Sierra Wireless EM5625 */ { USB_DEVICE(0x1199, 0x0018) }, /* Sierra Wireless MC5720 */ + { USB_DEVICE(0x0f30, 0x1b1d) }, /* Sierra Wireless MC5720 */ { USB_DEVICE(0x1199, 0x0218) }, /* Sierra Wireless MC5720 */ { USB_DEVICE(0x1199, 0x0020) }, /* Sierra Wireless MC5725 */ { USB_DEVICE(0x1199, 0x0019) }, /* Sierra Wireless AirCard 595 */ - { USB_DEVICE(0x1199, 0x0120) }, /* Sierra Wireless AirCard 595U */ { USB_DEVICE(0x1199, 0x0021) }, /* Sierra Wireless AirCard 597E */ - - /* GSM/UMTS Devices */ + { USB_DEVICE(0x1199, 0x0120) }, /* Sierra Wireless USB Dongle 595U*/ + { USB_DEVICE(0x1199, 0x6802) }, /* Sierra Wireless MC8755 */ { USB_DEVICE(0x1199, 0x6804) }, /* Sierra Wireless MC8755 */ { USB_DEVICE(0x1199, 0x6803) }, /* Sierra Wireless MC8765 */ - { USB_DEVICE(0x1199, 0x6812) }, /* Sierra Wireless MC8775 */ + { USB_DEVICE(0x1199, 0x6812) }, /* Sierra Wireless MC8775 & AC 875U */ { USB_DEVICE(0x1199, 0x6820) }, /* Sierra Wireless AirCard 875 */ + { USB_DEVICE(0x1199, 0x6832) }, /* Sierra Wireless MC8780*/ + { USB_DEVICE(0x1199, 0x6833) }, /* Sierra Wireless MC8781*/ + { USB_DEVICE(0x1199, 0x6850) }, /* Sierra Wireless AirCard 880 */ + { USB_DEVICE(0x1199, 0x6851) }, /* Sierra Wireless AirCard 881 */ + { USB_DEVICE(0x1199, 0x6852) }, /* Sierra Wireless AirCard 880E */ + { USB_DEVICE(0x1199, 0x6853) }, /* Sierra Wireless AirCard 881E */ { } }; - To unsubscribe from this list: send the line "unsubscribe li
[PATCH 01/02] USB: sierra: Add TRU-Install (c) Support [ATTEMPT 4]
From: Kevin Lloyd <[EMAIL PROTECTED]> This patch adds compatibility with Sierra Wireless' new TRU-Install feature. Future devices that use this feature will not work unless this patch has been applied. This attempt of the patch corrects a hard-coded return and the dev_dbg messages form the previous patch submission. This patch was tested on the 2.6.21.1 kernel source patched with the following patches (found at http://www.kernel.org/pub/linux/kernel/people/gregkh/gregkh-2.6/patches/usb/): usb-sierra-cleanup-urb-startup.patch usb-sierra-fix-status-usage.patch usb-sierra-status.patch There were three previous submissions for similar support (6/6/2007 & 6/5/2007 & 7/11/2007) they were however rejected so please disregard those. Signed-off-by: Kevin Lloyd <[EMAIL PROTECTED]> --- diff -uprN a/drivers/usb/serial/sierra.c b/drivers/usb/serial/sierra.c --- a/drivers/usb/serial/sierra.c 2007-07-10 16:53:07.0 -0700 +++ b/drivers/usb/serial/sierra.c 2007-07-12 09:17:44.0 -0700 @@ -1,7 +1,7 @@ /* USB Driver for Sierra Wireless - Copyright (C) 2006 Kevin Lloyd <[EMAIL PROTECTED]> + Copyright (C) 2007 Kevin Lloyd <[EMAIL PROTECTED]> IMPORTANT DISCLAIMER: This driver is not commercially supported by Sierra Wireless. Use at your own risk. @@ -12,10 +12,9 @@ Portions based on the option driver by Matthias Urlichs <[EMAIL PROTECTED]> Whom based his on the Keyspan driver by Hugh Blemings <[EMAIL PROTECTED]> - */ -#define DRIVER_VERSION "v.1.0.6" +#define DRIVER_VERSION "v.1.2.4" #define DRIVER_AUTHOR "Kevin Lloyd <[EMAIL PROTECTED]>" #define DRIVER_DESC "USB Driver for Sierra Wireless USB modems" @@ -28,6 +27,70 @@ #include #include +#define SWIMS_USB_REQUEST_SetMode 0x0B +#define SWIMS_USB_REQUEST_TYPE_SetMode 0x40 +#define SWIMS_USB_INDEX_SetMode0x +#define SWIMS_SET_MODE_Modem 0x0001 + +/* per port private data */ +#define N_IN_URB 4 +#define N_OUT_URB 4 +#define IN_BUFLEN 4096 + +static int debug; + +enum devicetype { + DEVICE_3_PORT = 0, + DEVICE_1_PORT = 1, + DEVICE_INSTALLER = 2, +}; + +int sierra_set_power_state(struct usb_device *udev, __u16 swiState) +{ + int result; + dev_dbg(>dev, "%s", "SET POWER STATE"); + result = usb_control_msg(udev, usb_sndctrlpipe(udev, 0), + 0x00, /* __u8 request */ + 0x40, /* __u8 request type */ + swiState, /* __u16 value */ + 0, /* __u16 index */ + NULL, /* void *data*/ + 0, /* __u16 size*/ + USB_CTRL_SET_TIMEOUT); /* int timeout */ + return result; +} + +int sierra_set_ms_mode(struct usb_device *udev, __u16 eSocMode) +{ + int result; + dev_dbg(>dev, "%s", "DEVICE MODE SWITCH"); + result = usb_control_msg(udev, usb_sndctrlpipe(udev, 0), + SWIMS_USB_REQUEST_SetMode, /* __u8 request */ + SWIMS_USB_REQUEST_TYPE_SetMode, /* __u8 request type */ + eSocMode, /* __u16 value */ + SWIMS_USB_INDEX_SetMode,/* __u16 index */ + NULL, /* void *data*/ + 0, /* __u16 size*/ + USB_CTRL_SET_TIMEOUT); /* int timeout */ + return result; +} + +int sierra_probe(struct usb_interface *iface, const struct usb_device_id *id) +{ + int result; + struct usb_device *udev; + + udev = usb_get_dev(interface_to_usbdev(iface)); + + /* Check if in installer mode */ + if (id->driver_info == DEVICE_INSTALLER){ + dev_dbg(>dev, "%s", "FOUND DEVICE(SW)\n"); + result = sierra_set_ms_mode(udev, SWIMS_SET_MODE_Modem); + return result; + } + + return usb_serial_probe(iface, id); +} static struct usb_device_id id_table [] = { { USB_DEVICE(0x1199, 0x0017) }, /* Sierra Wireless EM5625 */ @@ -43,8 +106,10 @@ static struct usb_device_id id_table [] { USB_DEVICE(0x1199, 0x6812) }, /* Sierra Wireless MC8775 */ { USB_DEVICE(0x1199, 0x6820) }, /* Sierra Wireless AirCard 875 */ - { USB_DEVICE(0x1199, 0x0112) }, /* Sierra Wireless AirCard 580 */ - { USB_DEVICE(0x0F3D, 0x0112) }, /* AirPrime/Sierra PC 5220 */ + { USB_DEVICE(0x1199, 0x0112), .driver_info = DEVICE_1_PORT }, /* Sierra Wireless AirCard 580 */ + { USB_DEVICE(0x0F3D, 0x0112), .driver_info =
[PATCH 01/02] USB: sierra: Add TRU-Install (c) Support [ATTEMPT 4]
From: Kevin Lloyd [EMAIL PROTECTED] This patch adds compatibility with Sierra Wireless' new TRU-Install feature. Future devices that use this feature will not work unless this patch has been applied. This attempt of the patch corrects a hard-coded return and the dev_dbg messages form the previous patch submission. This patch was tested on the 2.6.21.1 kernel source patched with the following patches (found at http://www.kernel.org/pub/linux/kernel/people/gregkh/gregkh-2.6/patches/usb/): usb-sierra-cleanup-urb-startup.patch usb-sierra-fix-status-usage.patch usb-sierra-status.patch There were three previous submissions for similar support (6/6/2007 6/5/2007 7/11/2007) they were however rejected so please disregard those. Signed-off-by: Kevin Lloyd [EMAIL PROTECTED] --- diff -uprN a/drivers/usb/serial/sierra.c b/drivers/usb/serial/sierra.c --- a/drivers/usb/serial/sierra.c 2007-07-10 16:53:07.0 -0700 +++ b/drivers/usb/serial/sierra.c 2007-07-12 09:17:44.0 -0700 @@ -1,7 +1,7 @@ /* USB Driver for Sierra Wireless - Copyright (C) 2006 Kevin Lloyd [EMAIL PROTECTED] + Copyright (C) 2007 Kevin Lloyd [EMAIL PROTECTED] IMPORTANT DISCLAIMER: This driver is not commercially supported by Sierra Wireless. Use at your own risk. @@ -12,10 +12,9 @@ Portions based on the option driver by Matthias Urlichs [EMAIL PROTECTED] Whom based his on the Keyspan driver by Hugh Blemings [EMAIL PROTECTED] - */ -#define DRIVER_VERSION v.1.0.6 +#define DRIVER_VERSION v.1.2.4 #define DRIVER_AUTHOR Kevin Lloyd [EMAIL PROTECTED] #define DRIVER_DESC USB Driver for Sierra Wireless USB modems @@ -28,6 +27,70 @@ #include linux/usb.h #include linux/usb/serial.h +#define SWIMS_USB_REQUEST_SetMode 0x0B +#define SWIMS_USB_REQUEST_TYPE_SetMode 0x40 +#define SWIMS_USB_INDEX_SetMode0x +#define SWIMS_SET_MODE_Modem 0x0001 + +/* per port private data */ +#define N_IN_URB 4 +#define N_OUT_URB 4 +#define IN_BUFLEN 4096 + +static int debug; + +enum devicetype { + DEVICE_3_PORT = 0, + DEVICE_1_PORT = 1, + DEVICE_INSTALLER = 2, +}; + +int sierra_set_power_state(struct usb_device *udev, __u16 swiState) +{ + int result; + dev_dbg(udev-dev, %s, SET POWER STATE); + result = usb_control_msg(udev, usb_sndctrlpipe(udev, 0), + 0x00, /* __u8 request */ + 0x40, /* __u8 request type */ + swiState, /* __u16 value */ + 0, /* __u16 index */ + NULL, /* void *data*/ + 0, /* __u16 size*/ + USB_CTRL_SET_TIMEOUT); /* int timeout */ + return result; +} + +int sierra_set_ms_mode(struct usb_device *udev, __u16 eSocMode) +{ + int result; + dev_dbg(udev-dev, %s, DEVICE MODE SWITCH); + result = usb_control_msg(udev, usb_sndctrlpipe(udev, 0), + SWIMS_USB_REQUEST_SetMode, /* __u8 request */ + SWIMS_USB_REQUEST_TYPE_SetMode, /* __u8 request type */ + eSocMode, /* __u16 value */ + SWIMS_USB_INDEX_SetMode,/* __u16 index */ + NULL, /* void *data*/ + 0, /* __u16 size*/ + USB_CTRL_SET_TIMEOUT); /* int timeout */ + return result; +} + +int sierra_probe(struct usb_interface *iface, const struct usb_device_id *id) +{ + int result; + struct usb_device *udev; + + udev = usb_get_dev(interface_to_usbdev(iface)); + + /* Check if in installer mode */ + if (id-driver_info == DEVICE_INSTALLER){ + dev_dbg(udev-dev, %s, FOUND DEVICE(SW)\n); + result = sierra_set_ms_mode(udev, SWIMS_SET_MODE_Modem); + return result; + } + + return usb_serial_probe(iface, id); +} static struct usb_device_id id_table [] = { { USB_DEVICE(0x1199, 0x0017) }, /* Sierra Wireless EM5625 */ @@ -43,8 +106,10 @@ static struct usb_device_id id_table [] { USB_DEVICE(0x1199, 0x6812) }, /* Sierra Wireless MC8775 */ { USB_DEVICE(0x1199, 0x6820) }, /* Sierra Wireless AirCard 875 */ - { USB_DEVICE(0x1199, 0x0112) }, /* Sierra Wireless AirCard 580 */ - { USB_DEVICE(0x0F3D, 0x0112) }, /* AirPrime/Sierra PC 5220 */ + { USB_DEVICE(0x1199, 0x0112), .driver_info = DEVICE_1_PORT }, /* Sierra Wireless AirCard 580 */ + { USB_DEVICE(0x0F3D, 0x0112), .driver_info = DEVICE_1_PORT }, /* Airprime/Sierra PC 5220 */ + + { USB_DEVICE(0x1199, 0x0FFF), .driver_info = DEVICE_INSTALLER}, { } }; MODULE_DEVICE_TABLE(usb
[PATCH 02/02] USB: sierra: Add new devices
From: Kevin Lloyd [EMAIL PROTECTED] This patch adds new devices to the sierra wireless driver. This is being resubmitted because the dependent patch (patch 01/02) needed to be resubmitted. This patch was tested on the 2.6.21.1 kernel source patched with the following patches (found at http://www.kernel.org/pub/linux/kernel/people/gregkh/gregkh-2.6/patches/usb/): usb-sierra-cleanup-urb-startup.patch usb-sierra-fix-status-usage.patch usb-sierra-status.patch This patch also depends on the recently submitted TRU-Install Patch (patch 01/02). There was a previous submission on 7/11/2007, please disregard that one. Signed-off-by: Kevin Lloyd [EMAIL PROTECTED] --- diff -uprN -X dontdiff b/drivers/usb/serial/sierra.c c/drivers/usb/serial/sierra.c --- b/drivers/usb/serial/sierra.c 2007-07-12 09:17:44.0 -0700 +++ c/drivers/usb/serial/sierra.c 2007-07-12 09:17:18.0 -0700 @@ -14,7 +14,7 @@ Whom based his on the Keyspan driver by Hugh Blemings [EMAIL PROTECTED] */ -#define DRIVER_VERSION v.1.2.4 +#define DRIVER_VERSION v.1.2.5 #define DRIVER_AUTHOR Kevin Lloyd [EMAIL PROTECTED] #define DRIVER_DESC USB Driver for Sierra Wireless USB modems @@ -95,20 +95,29 @@ int sierra_probe(struct usb_interface *i static struct usb_device_id id_table [] = { { USB_DEVICE(0x1199, 0x0017) }, /* Sierra Wireless EM5625 */ { USB_DEVICE(0x1199, 0x0018) }, /* Sierra Wireless MC5720 */ + { USB_DEVICE(0x0f30, 0x1b1d) }, /* Sierra Wireless MC5720 */ { USB_DEVICE(0x1199, 0x0218) }, /* Sierra Wireless MC5720 */ { USB_DEVICE(0x1199, 0x0020) }, /* Sierra Wireless MC5725 */ { USB_DEVICE(0x1199, 0x0019) }, /* Sierra Wireless AirCard 595 */ - { USB_DEVICE(0x1199, 0x0120) }, /* Sierra Wireless AirCard 595U */ { USB_DEVICE(0x1199, 0x0021) }, /* Sierra Wireless AirCard 597E */ + { USB_DEVICE(0x1199, 0x0120) }, /* Sierra Wireless USB Dongle 595U*/ + { USB_DEVICE(0x1199, 0x6802) }, /* Sierra Wireless MC8755 */ { USB_DEVICE(0x1199, 0x6804) }, /* Sierra Wireless MC8755 */ { USB_DEVICE(0x1199, 0x6803) }, /* Sierra Wireless MC8765 */ - { USB_DEVICE(0x1199, 0x6812) }, /* Sierra Wireless MC8775 */ + { USB_DEVICE(0x1199, 0x6812) }, /* Sierra Wireless MC8775 AC 875U */ { USB_DEVICE(0x1199, 0x6820) }, /* Sierra Wireless AirCard 875 */ + { USB_DEVICE(0x1199, 0x6832) }, /* Sierra Wireless MC8780*/ + { USB_DEVICE(0x1199, 0x6833) }, /* Sierra Wireless MC8781*/ + { USB_DEVICE(0x1199, 0x6850) }, /* Sierra Wireless AirCard 880 */ + { USB_DEVICE(0x1199, 0x6851) }, /* Sierra Wireless AirCard 881 */ + { USB_DEVICE(0x1199, 0x6852) }, /* Sierra Wireless AirCard 880 E */ + { USB_DEVICE(0x1199, 0x6853) }, /* Sierra Wireless AirCard 881 E */ { USB_DEVICE(0x1199, 0x0112), .driver_info = DEVICE_1_PORT }, /* Sierra Wireless AirCard 580 */ { USB_DEVICE(0x0F3D, 0x0112), .driver_info = DEVICE_1_PORT }, /* Airprime/Sierra PC 5220 */ - + + { USB_DEVICE(0x1199, 0x0FFF), .driver_info = DEVICE_INSTALLER}, { } }; @@ -121,21 +130,26 @@ static struct usb_device_id id_table_1po }; static struct usb_device_id id_table_3port [] = { - /* CDMA Devices */ { USB_DEVICE(0x1199, 0x0017) }, /* Sierra Wireless EM5625 */ { USB_DEVICE(0x1199, 0x0018) }, /* Sierra Wireless MC5720 */ + { USB_DEVICE(0x0f30, 0x1b1d) }, /* Sierra Wireless MC5720 */ { USB_DEVICE(0x1199, 0x0218) }, /* Sierra Wireless MC5720 */ { USB_DEVICE(0x1199, 0x0020) }, /* Sierra Wireless MC5725 */ { USB_DEVICE(0x1199, 0x0019) }, /* Sierra Wireless AirCard 595 */ - { USB_DEVICE(0x1199, 0x0120) }, /* Sierra Wireless AirCard 595U */ { USB_DEVICE(0x1199, 0x0021) }, /* Sierra Wireless AirCard 597E */ - - /* GSM/UMTS Devices */ + { USB_DEVICE(0x1199, 0x0120) }, /* Sierra Wireless USB Dongle 595U*/ + { USB_DEVICE(0x1199, 0x6802) }, /* Sierra Wireless MC8755 */ { USB_DEVICE(0x1199, 0x6804) }, /* Sierra Wireless MC8755 */ { USB_DEVICE(0x1199, 0x6803) }, /* Sierra Wireless MC8765 */ - { USB_DEVICE(0x1199, 0x6812) }, /* Sierra Wireless MC8775 */ + { USB_DEVICE(0x1199, 0x6812) }, /* Sierra Wireless MC8775 AC 875U */ { USB_DEVICE(0x1199, 0x6820) }, /* Sierra Wireless AirCard 875 */ + { USB_DEVICE(0x1199, 0x6832) }, /* Sierra Wireless MC8780*/ + { USB_DEVICE(0x1199, 0x6833) }, /* Sierra Wireless MC8781*/ + { USB_DEVICE(0x1199, 0x6850) }, /* Sierra Wireless AirCard 880 */ + { USB_DEVICE(0x1199, 0x6851) }, /* Sierra Wireless AirCard 881 */ + { USB_DEVICE(0x1199, 0x6852) }, /* Sierra Wireless AirCard 880E */ + { USB_DEVICE(0x1199, 0x6853) }, /* Sierra Wireless AirCard 881E */ { } }; - To unsubscribe from this list: send the line unsubscribe linux-kernel in the body of a message to [EMAIL PROTECTED] More majordomo info at http
RE: [linux-usb-devel] [PATCH 01/02] Sierra Wireless - Add TRU-Install (c) Support
Unfortunately I can not myself comment on the feature at this point, however the code is pretty obvious :). I'll go ahead and change it so that it returns the result of sierra_set_ms_mode. Also, I realized that the second patch (02/02) fixes a bug in the first patch (01/02), particularly the dev_dbg messages are implemented incorrectly in the first patch. I'll move that fix up to the first patch. I'll wait another day for other comments and then resubmit with those changes. - Kevin -Original Message- From: Oliver Neukum [mailto:[EMAIL PROTECTED] Sent: Wednesday, July 11, 2007 3:37 PM To: [EMAIL PROTECTED] Cc: Kevin Lloyd; [EMAIL PROTECTED]; Linux Development Group; [EMAIL PROTECTED]; linux-kernel@vger.kernel.org Subject: Re: [linux-usb-devel] [PATCH 01/02] Sierra Wireless - Add TRU-Install (c) Support Am Donnerstag, 12. Juli 2007 schrieb Kevin Lloyd: > From: Kevin Lloyd <[EMAIL PROTECTED]> > > This patch adds compatibility with Sierra Wireless' new TRU-Install feature. Future devices that use this feature will not work unless this patch has been applied. Is this some type of CD-ROM simulation to provide drivers? > +int sierra_probe(struct usb_interface *iface, const struct > +usb_device_id *id) { > + int result; > + struct usb_device *udev; > + > + udev = usb_get_dev(interface_to_usbdev(iface)); > + > + /* Check if in installer mode */ > + if (id->driver_info == DEVICE_INSTALLER){ > + dev_dbg("FOUND DEVICE(SW)\n"); > + result = sierra_set_ms_mode(udev, SWIMS_SET_MODE_Modem); > + return 0; This is not a good idea in the long run. If you don't return an error here, disconnect() will be called for your driver and will have to deal with a semiinitialized device. Regards Oliver - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
[PATCH 01/02] Sierra Wireless - Add TRU-Install (c) Support
From: Kevin Lloyd <[EMAIL PROTECTED]> This patch adds compatibility with Sierra Wireless' new TRU-Install feature. Future devices that use this feature will not work unless this patch has been applied. This patch was tested on the 2.6.21.1 kernel source patched with the following patches (found at http://www.kernel.org/pub/linux/kernel/people/gregkh/gregkh-2.6/patches/usb/): usb-sierra-cleanup-urb-startup.patch usb-sierra-fix-status-usage.patch usb-sierra-status.patch There were two previous submissions for similar support (6/6/2007 & 6/5/2007) they were however rejected so please disregard those. Signed-off-by: Kevin Lloyd <[EMAIL PROTECTED]> --- diff -uprN a/drivers/usb/serial/sierra.c b/drivers/usb/serial/sierra.c --- a/drivers/usb/serial/sierra.c 2007-07-10 16:53:07.0 -0700 +++ b/drivers/usb/serial/sierra.c 2007-07-10 16:35:48.0 -0700 @@ -1,7 +1,7 @@ /* USB Driver for Sierra Wireless - Copyright (C) 2006 Kevin Lloyd <[EMAIL PROTECTED]> + Copyright (C) 2007 Kevin Lloyd <[EMAIL PROTECTED]> IMPORTANT DISCLAIMER: This driver is not commercially supported by Sierra Wireless. Use at your own risk. @@ -12,10 +12,9 @@ Portions based on the option driver by Matthias Urlichs <[EMAIL PROTECTED]> Whom based his on the Keyspan driver by Hugh Blemings <[EMAIL PROTECTED]> - */ -#define DRIVER_VERSION "v.1.0.6" +#define DRIVER_VERSION "v.1.2.4" #define DRIVER_AUTHOR "Kevin Lloyd <[EMAIL PROTECTED]>" #define DRIVER_DESC "USB Driver for Sierra Wireless USB modems" @@ -28,6 +27,70 @@ #include #include +#define SWIMS_USB_REQUEST_SetMode 0x0B +#define SWIMS_USB_REQUEST_TYPE_SetMode 0x40 +#define SWIMS_USB_INDEX_SetMode0x +#define SWIMS_SET_MODE_Modem 0x0001 + +/* per port private data */ +#define N_IN_URB 4 +#define N_OUT_URB 4 +#define IN_BUFLEN 4096 + +static int debug; + +enum devicetype { + DEVICE_3_PORT = 0, + DEVICE_1_PORT = 1, + DEVICE_INSTALLER = 2, +}; + +int sierra_set_power_state(struct usb_device *udev, __u16 swiState) +{ + int result; + dev_dbg("SET POWER STATE"); + result = usb_control_msg(udev, usb_sndctrlpipe(udev, 0), + 0x00, /* __u8 request */ + 0x40, /* __u8 request type */ + swiState, /* __u16 value */ + 0, /* __u16 index */ + NULL, /* void *data*/ + 0, /* __u16 size*/ + USB_CTRL_SET_TIMEOUT); /* int timeout */ + return result; +} + +int sierra_set_ms_mode(struct usb_device *udev, __u16 eSocMode) +{ + int result; + dev_dbg("DEVICE MODE SWITCH"); + result = usb_control_msg(udev, usb_sndctrlpipe(udev, 0), + SWIMS_USB_REQUEST_SetMode, /* __u8 request */ + SWIMS_USB_REQUEST_TYPE_SetMode, /* __u8 request type */ + eSocMode, /* __u16 value */ + SWIMS_USB_INDEX_SetMode,/* __u16 index */ + NULL, /* void *data*/ + 0, /* __u16 size*/ + USB_CTRL_SET_TIMEOUT); /* int timeout */ + return result; +} + +int sierra_probe(struct usb_interface *iface, const struct usb_device_id *id) +{ + int result; + struct usb_device *udev; + + udev = usb_get_dev(interface_to_usbdev(iface)); + + /* Check if in installer mode */ + if (id->driver_info == DEVICE_INSTALLER){ + dev_dbg("FOUND DEVICE(SW)\n"); + result = sierra_set_ms_mode(udev, SWIMS_SET_MODE_Modem); + return 0; + } + + return usb_serial_probe(iface, id); +} static struct usb_device_id id_table [] = { { USB_DEVICE(0x1199, 0x0017) }, /* Sierra Wireless EM5625 */ @@ -43,8 +106,10 @@ static struct usb_device_id id_table [] { USB_DEVICE(0x1199, 0x6812) }, /* Sierra Wireless MC8775 */ { USB_DEVICE(0x1199, 0x6820) }, /* Sierra Wireless AirCard 875 */ - { USB_DEVICE(0x1199, 0x0112) }, /* Sierra Wireless AirCard 580 */ - { USB_DEVICE(0x0F3D, 0x0112) }, /* AirPrime/Sierra PC 5220 */ + { USB_DEVICE(0x1199, 0x0112), .driver_info = DEVICE_1_PORT }, /* Sierra Wireless AirCard 580 */ + { USB_DEVICE(0x0F3D, 0x0112), .driver_info = DEVICE_1_PORT }, /* Airprime/Sierra PC 5220 */ + + { USB_DEVICE(0x1199, 0x0FFF), .driver_info = DEVICE_INSTALLER}, { } }; MODULE_DEVICE_TABLE(usb, id_table); @@ -56,6 +121,7 @@ static struct usb_devic
[PATCH 02/02] Sierra Wireless - Add new devices
From: Kevin Lloyd <[EMAIL PROTECTED]> This patch adds new devices to the sierra wireless driver. This patch was tested on the 2.6.21.1 kernel source patched with the following patches (found at http://www.kernel.org/pub/linux/kernel/people/gregkh/gregkh-2.6/patches/usb/): usb-sierra-cleanup-urb-startup.patch usb-sierra-fix-status-usage.patch usb-sierra-status.patch This patch also depends on the recently submitted TRU-Install Patch (patch 01/02). Signed-off-by: Kevin Lloyd <[EMAIL PROTECTED]> --- diff -uprN -X dontdiff b/drivers/usb/serial/sierra.c c/drivers/usb/serial/sierra.c --- b/drivers/usb/serial/sierra.c 2007-07-10 16:35:48.0 -0700 +++ c/drivers/usb/serial/sierra.c 2007-07-10 16:51:20.0 -0700 @@ -14,7 +14,7 @@ Whom based his on the Keyspan driver by Hugh Blemings <[EMAIL PROTECTED]> */ -#define DRIVER_VERSION "v.1.2.4" +#define DRIVER_VERSION "v.1.2.5" #define DRIVER_AUTHOR "Kevin Lloyd <[EMAIL PROTECTED]>" #define DRIVER_DESC "USB Driver for Sierra Wireless USB modems" @@ -48,7 +48,7 @@ enum devicetype { int sierra_set_power_state(struct usb_device *udev, __u16 swiState) { int result; - dev_dbg("SET POWER STATE"); + dev_dbg(udev, "%s", "SET POWER STATE"); result = usb_control_msg(udev, usb_sndctrlpipe(udev, 0), 0x00, /* __u8 request */ 0x40, /* __u8 request type */ @@ -63,7 +63,7 @@ int sierra_set_power_state(struct usb_de int sierra_set_ms_mode(struct usb_device *udev, __u16 eSocMode) { int result; - dev_dbg("DEVICE MODE SWITCH"); + dev_dbg(udev, "%s", "DEVICE MODE SWITCH"); result = usb_control_msg(udev, usb_sndctrlpipe(udev, 0), SWIMS_USB_REQUEST_SetMode, /* __u8 request */ SWIMS_USB_REQUEST_TYPE_SetMode, /* __u8 request type */ @@ -84,7 +84,7 @@ int sierra_probe(struct usb_interface *i /* Check if in installer mode */ if (id->driver_info == DEVICE_INSTALLER){ - dev_dbg("FOUND DEVICE(SW)\n"); + dev_dbg(udev, "%s", "FOUND DEVICE(SW)\n"); result = sierra_set_ms_mode(udev, SWIMS_SET_MODE_Modem); return 0; } @@ -95,20 +95,29 @@ int sierra_probe(struct usb_interface *i static struct usb_device_id id_table [] = { { USB_DEVICE(0x1199, 0x0017) }, /* Sierra Wireless EM5625 */ { USB_DEVICE(0x1199, 0x0018) }, /* Sierra Wireless MC5720 */ + { USB_DEVICE(0x0f30, 0x1b1d) }, /* Sierra Wireless MC5720 */ { USB_DEVICE(0x1199, 0x0218) }, /* Sierra Wireless MC5720 */ { USB_DEVICE(0x1199, 0x0020) }, /* Sierra Wireless MC5725 */ { USB_DEVICE(0x1199, 0x0019) }, /* Sierra Wireless AirCard 595 */ - { USB_DEVICE(0x1199, 0x0120) }, /* Sierra Wireless AirCard 595U */ { USB_DEVICE(0x1199, 0x0021) }, /* Sierra Wireless AirCard 597E */ + { USB_DEVICE(0x1199, 0x0120) }, /* Sierra Wireless USB Dongle 595U*/ + { USB_DEVICE(0x1199, 0x6802) }, /* Sierra Wireless MC8755 */ { USB_DEVICE(0x1199, 0x6804) }, /* Sierra Wireless MC8755 */ { USB_DEVICE(0x1199, 0x6803) }, /* Sierra Wireless MC8765 */ - { USB_DEVICE(0x1199, 0x6812) }, /* Sierra Wireless MC8775 */ + { USB_DEVICE(0x1199, 0x6812) }, /* Sierra Wireless MC8775 & AC 875U */ { USB_DEVICE(0x1199, 0x6820) }, /* Sierra Wireless AirCard 875 */ + { USB_DEVICE(0x1199, 0x6832) }, /* Sierra Wireless MC8780*/ + { USB_DEVICE(0x1199, 0x6833) }, /* Sierra Wireless MC8781*/ + { USB_DEVICE(0x1199, 0x6850) }, /* Sierra Wireless AirCard 880 */ + { USB_DEVICE(0x1199, 0x6851) }, /* Sierra Wireless AirCard 881 */ + { USB_DEVICE(0x1199, 0x6852) }, /* Sierra Wireless AirCard 880 E */ + { USB_DEVICE(0x1199, 0x6853) }, /* Sierra Wireless AirCard 881 E */ { USB_DEVICE(0x1199, 0x0112), .driver_info = DEVICE_1_PORT }, /* Sierra Wireless AirCard 580 */ { USB_DEVICE(0x0F3D, 0x0112), .driver_info = DEVICE_1_PORT }, /* Airprime/Sierra PC 5220 */ - + + { USB_DEVICE(0x1199, 0x0FFF), .driver_info = DEVICE_INSTALLER}, { } }; @@ -121,21 +130,26 @@ static struct usb_device_id id_table_1po }; static struct usb_device_id id_table_3port [] = { - /* CDMA Devices */ { USB_DEVICE(0x1199, 0x0017) }, /* Sierra Wireless EM5625 */ { USB_DEVICE(0x1199, 0x0018) }, /* Sierra Wireless MC5720 */ + { USB_DEVICE(0x0f30, 0x1b1d) }, /* Sierra Wireless MC5720 */ { USB_DEVICE(0x1199, 0x0218) }, /* Sierra Wireless MC5720 */ { USB_DEVICE(0x1199, 0x0020) }, /* Sierra Wireless MC5725 */ { USB_DEVICE(0x1199, 0x0019) }, /* Sierra Wireless AirCard 595 */ - { USB_DEVICE(0x1199, 0x0120) }, /* Sierra
[PATCH 01/02] Sierra Wireless - Add TRU-Install (c) Support
From: Kevin Lloyd [EMAIL PROTECTED] This patch adds compatibility with Sierra Wireless' new TRU-Install feature. Future devices that use this feature will not work unless this patch has been applied. This patch was tested on the 2.6.21.1 kernel source patched with the following patches (found at http://www.kernel.org/pub/linux/kernel/people/gregkh/gregkh-2.6/patches/usb/): usb-sierra-cleanup-urb-startup.patch usb-sierra-fix-status-usage.patch usb-sierra-status.patch There were two previous submissions for similar support (6/6/2007 6/5/2007) they were however rejected so please disregard those. Signed-off-by: Kevin Lloyd [EMAIL PROTECTED] --- diff -uprN a/drivers/usb/serial/sierra.c b/drivers/usb/serial/sierra.c --- a/drivers/usb/serial/sierra.c 2007-07-10 16:53:07.0 -0700 +++ b/drivers/usb/serial/sierra.c 2007-07-10 16:35:48.0 -0700 @@ -1,7 +1,7 @@ /* USB Driver for Sierra Wireless - Copyright (C) 2006 Kevin Lloyd [EMAIL PROTECTED] + Copyright (C) 2007 Kevin Lloyd [EMAIL PROTECTED] IMPORTANT DISCLAIMER: This driver is not commercially supported by Sierra Wireless. Use at your own risk. @@ -12,10 +12,9 @@ Portions based on the option driver by Matthias Urlichs [EMAIL PROTECTED] Whom based his on the Keyspan driver by Hugh Blemings [EMAIL PROTECTED] - */ -#define DRIVER_VERSION v.1.0.6 +#define DRIVER_VERSION v.1.2.4 #define DRIVER_AUTHOR Kevin Lloyd [EMAIL PROTECTED] #define DRIVER_DESC USB Driver for Sierra Wireless USB modems @@ -28,6 +27,70 @@ #include linux/usb.h #include linux/usb/serial.h +#define SWIMS_USB_REQUEST_SetMode 0x0B +#define SWIMS_USB_REQUEST_TYPE_SetMode 0x40 +#define SWIMS_USB_INDEX_SetMode0x +#define SWIMS_SET_MODE_Modem 0x0001 + +/* per port private data */ +#define N_IN_URB 4 +#define N_OUT_URB 4 +#define IN_BUFLEN 4096 + +static int debug; + +enum devicetype { + DEVICE_3_PORT = 0, + DEVICE_1_PORT = 1, + DEVICE_INSTALLER = 2, +}; + +int sierra_set_power_state(struct usb_device *udev, __u16 swiState) +{ + int result; + dev_dbg(SET POWER STATE); + result = usb_control_msg(udev, usb_sndctrlpipe(udev, 0), + 0x00, /* __u8 request */ + 0x40, /* __u8 request type */ + swiState, /* __u16 value */ + 0, /* __u16 index */ + NULL, /* void *data*/ + 0, /* __u16 size*/ + USB_CTRL_SET_TIMEOUT); /* int timeout */ + return result; +} + +int sierra_set_ms_mode(struct usb_device *udev, __u16 eSocMode) +{ + int result; + dev_dbg(DEVICE MODE SWITCH); + result = usb_control_msg(udev, usb_sndctrlpipe(udev, 0), + SWIMS_USB_REQUEST_SetMode, /* __u8 request */ + SWIMS_USB_REQUEST_TYPE_SetMode, /* __u8 request type */ + eSocMode, /* __u16 value */ + SWIMS_USB_INDEX_SetMode,/* __u16 index */ + NULL, /* void *data*/ + 0, /* __u16 size*/ + USB_CTRL_SET_TIMEOUT); /* int timeout */ + return result; +} + +int sierra_probe(struct usb_interface *iface, const struct usb_device_id *id) +{ + int result; + struct usb_device *udev; + + udev = usb_get_dev(interface_to_usbdev(iface)); + + /* Check if in installer mode */ + if (id-driver_info == DEVICE_INSTALLER){ + dev_dbg(FOUND DEVICE(SW)\n); + result = sierra_set_ms_mode(udev, SWIMS_SET_MODE_Modem); + return 0; + } + + return usb_serial_probe(iface, id); +} static struct usb_device_id id_table [] = { { USB_DEVICE(0x1199, 0x0017) }, /* Sierra Wireless EM5625 */ @@ -43,8 +106,10 @@ static struct usb_device_id id_table [] { USB_DEVICE(0x1199, 0x6812) }, /* Sierra Wireless MC8775 */ { USB_DEVICE(0x1199, 0x6820) }, /* Sierra Wireless AirCard 875 */ - { USB_DEVICE(0x1199, 0x0112) }, /* Sierra Wireless AirCard 580 */ - { USB_DEVICE(0x0F3D, 0x0112) }, /* AirPrime/Sierra PC 5220 */ + { USB_DEVICE(0x1199, 0x0112), .driver_info = DEVICE_1_PORT }, /* Sierra Wireless AirCard 580 */ + { USB_DEVICE(0x0F3D, 0x0112), .driver_info = DEVICE_1_PORT }, /* Airprime/Sierra PC 5220 */ + + { USB_DEVICE(0x1199, 0x0FFF), .driver_info = DEVICE_INSTALLER}, { } }; MODULE_DEVICE_TABLE(usb, id_table); @@ -56,6 +121,7 @@ static struct usb_device_id id_table_1po }; static struct usb_device_id id_table_3port [] = { + /* CDMA Devices */ { USB_DEVICE
[PATCH 02/02] Sierra Wireless - Add new devices
From: Kevin Lloyd [EMAIL PROTECTED] This patch adds new devices to the sierra wireless driver. This patch was tested on the 2.6.21.1 kernel source patched with the following patches (found at http://www.kernel.org/pub/linux/kernel/people/gregkh/gregkh-2.6/patches/usb/): usb-sierra-cleanup-urb-startup.patch usb-sierra-fix-status-usage.patch usb-sierra-status.patch This patch also depends on the recently submitted TRU-Install Patch (patch 01/02). Signed-off-by: Kevin Lloyd [EMAIL PROTECTED] --- diff -uprN -X dontdiff b/drivers/usb/serial/sierra.c c/drivers/usb/serial/sierra.c --- b/drivers/usb/serial/sierra.c 2007-07-10 16:35:48.0 -0700 +++ c/drivers/usb/serial/sierra.c 2007-07-10 16:51:20.0 -0700 @@ -14,7 +14,7 @@ Whom based his on the Keyspan driver by Hugh Blemings [EMAIL PROTECTED] */ -#define DRIVER_VERSION v.1.2.4 +#define DRIVER_VERSION v.1.2.5 #define DRIVER_AUTHOR Kevin Lloyd [EMAIL PROTECTED] #define DRIVER_DESC USB Driver for Sierra Wireless USB modems @@ -48,7 +48,7 @@ enum devicetype { int sierra_set_power_state(struct usb_device *udev, __u16 swiState) { int result; - dev_dbg(SET POWER STATE); + dev_dbg(udev, %s, SET POWER STATE); result = usb_control_msg(udev, usb_sndctrlpipe(udev, 0), 0x00, /* __u8 request */ 0x40, /* __u8 request type */ @@ -63,7 +63,7 @@ int sierra_set_power_state(struct usb_de int sierra_set_ms_mode(struct usb_device *udev, __u16 eSocMode) { int result; - dev_dbg(DEVICE MODE SWITCH); + dev_dbg(udev, %s, DEVICE MODE SWITCH); result = usb_control_msg(udev, usb_sndctrlpipe(udev, 0), SWIMS_USB_REQUEST_SetMode, /* __u8 request */ SWIMS_USB_REQUEST_TYPE_SetMode, /* __u8 request type */ @@ -84,7 +84,7 @@ int sierra_probe(struct usb_interface *i /* Check if in installer mode */ if (id-driver_info == DEVICE_INSTALLER){ - dev_dbg(FOUND DEVICE(SW)\n); + dev_dbg(udev, %s, FOUND DEVICE(SW)\n); result = sierra_set_ms_mode(udev, SWIMS_SET_MODE_Modem); return 0; } @@ -95,20 +95,29 @@ int sierra_probe(struct usb_interface *i static struct usb_device_id id_table [] = { { USB_DEVICE(0x1199, 0x0017) }, /* Sierra Wireless EM5625 */ { USB_DEVICE(0x1199, 0x0018) }, /* Sierra Wireless MC5720 */ + { USB_DEVICE(0x0f30, 0x1b1d) }, /* Sierra Wireless MC5720 */ { USB_DEVICE(0x1199, 0x0218) }, /* Sierra Wireless MC5720 */ { USB_DEVICE(0x1199, 0x0020) }, /* Sierra Wireless MC5725 */ { USB_DEVICE(0x1199, 0x0019) }, /* Sierra Wireless AirCard 595 */ - { USB_DEVICE(0x1199, 0x0120) }, /* Sierra Wireless AirCard 595U */ { USB_DEVICE(0x1199, 0x0021) }, /* Sierra Wireless AirCard 597E */ + { USB_DEVICE(0x1199, 0x0120) }, /* Sierra Wireless USB Dongle 595U*/ + { USB_DEVICE(0x1199, 0x6802) }, /* Sierra Wireless MC8755 */ { USB_DEVICE(0x1199, 0x6804) }, /* Sierra Wireless MC8755 */ { USB_DEVICE(0x1199, 0x6803) }, /* Sierra Wireless MC8765 */ - { USB_DEVICE(0x1199, 0x6812) }, /* Sierra Wireless MC8775 */ + { USB_DEVICE(0x1199, 0x6812) }, /* Sierra Wireless MC8775 AC 875U */ { USB_DEVICE(0x1199, 0x6820) }, /* Sierra Wireless AirCard 875 */ + { USB_DEVICE(0x1199, 0x6832) }, /* Sierra Wireless MC8780*/ + { USB_DEVICE(0x1199, 0x6833) }, /* Sierra Wireless MC8781*/ + { USB_DEVICE(0x1199, 0x6850) }, /* Sierra Wireless AirCard 880 */ + { USB_DEVICE(0x1199, 0x6851) }, /* Sierra Wireless AirCard 881 */ + { USB_DEVICE(0x1199, 0x6852) }, /* Sierra Wireless AirCard 880 E */ + { USB_DEVICE(0x1199, 0x6853) }, /* Sierra Wireless AirCard 881 E */ { USB_DEVICE(0x1199, 0x0112), .driver_info = DEVICE_1_PORT }, /* Sierra Wireless AirCard 580 */ { USB_DEVICE(0x0F3D, 0x0112), .driver_info = DEVICE_1_PORT }, /* Airprime/Sierra PC 5220 */ - + + { USB_DEVICE(0x1199, 0x0FFF), .driver_info = DEVICE_INSTALLER}, { } }; @@ -121,21 +130,26 @@ static struct usb_device_id id_table_1po }; static struct usb_device_id id_table_3port [] = { - /* CDMA Devices */ { USB_DEVICE(0x1199, 0x0017) }, /* Sierra Wireless EM5625 */ { USB_DEVICE(0x1199, 0x0018) }, /* Sierra Wireless MC5720 */ + { USB_DEVICE(0x0f30, 0x1b1d) }, /* Sierra Wireless MC5720 */ { USB_DEVICE(0x1199, 0x0218) }, /* Sierra Wireless MC5720 */ { USB_DEVICE(0x1199, 0x0020) }, /* Sierra Wireless MC5725 */ { USB_DEVICE(0x1199, 0x0019) }, /* Sierra Wireless AirCard 595 */ - { USB_DEVICE(0x1199, 0x0120) }, /* Sierra Wireless AirCard 595U */ { USB_DEVICE(0x1199, 0x0021) }, /* Sierra Wireless AirCard 597E */ - - /* GSM/UMTS Devices */ + { USB_DEVICE(0x1199, 0x0120) }, /* Sierra Wireless USB Dongle
RE: [linux-usb-devel] [PATCH 01/02] Sierra Wireless - Add TRU-Install (c) Support
Unfortunately I can not myself comment on the feature at this point, however the code is pretty obvious :). I'll go ahead and change it so that it returns the result of sierra_set_ms_mode. Also, I realized that the second patch (02/02) fixes a bug in the first patch (01/02), particularly the dev_dbg messages are implemented incorrectly in the first patch. I'll move that fix up to the first patch. I'll wait another day for other comments and then resubmit with those changes. - Kevin -Original Message- From: Oliver Neukum [mailto:[EMAIL PROTECTED] Sent: Wednesday, July 11, 2007 3:37 PM To: [EMAIL PROTECTED] Cc: Kevin Lloyd; [EMAIL PROTECTED]; Linux Development Group; [EMAIL PROTECTED]; linux-kernel@vger.kernel.org Subject: Re: [linux-usb-devel] [PATCH 01/02] Sierra Wireless - Add TRU-Install (c) Support Am Donnerstag, 12. Juli 2007 schrieb Kevin Lloyd: From: Kevin Lloyd [EMAIL PROTECTED] This patch adds compatibility with Sierra Wireless' new TRU-Install feature. Future devices that use this feature will not work unless this patch has been applied. Is this some type of CD-ROM simulation to provide drivers? +int sierra_probe(struct usb_interface *iface, const struct +usb_device_id *id) { + int result; + struct usb_device *udev; + + udev = usb_get_dev(interface_to_usbdev(iface)); + + /* Check if in installer mode */ + if (id-driver_info == DEVICE_INSTALLER){ + dev_dbg(FOUND DEVICE(SW)\n); + result = sierra_set_ms_mode(udev, SWIMS_SET_MODE_Modem); + return 0; This is not a good idea in the long run. If you don't return an error here, disconnect() will be called for your driver and will have to deal with a semiinitialized device. Regards Oliver - To unsubscribe from this list: send the line unsubscribe linux-kernel in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
RE: [PATCH 2.6.22-rc4] USB: add support for TRU-install (C) andnew VID/PIDs to Sierra Wireless driver (ATTEMPT 2)
Thanks for the comments, I'll try and re-submit ASAP. WRT to changing the number of ports, I was worried about the multi devices on one system issue as well, however I tested it out with multiple 1-port and 3-port devices and it worked perfectly fine and was able to communicate with all of them. Nonetheless I'll give the calc_num_ports() attempt a try. - Kevin -Original Message- From: Greg KH [mailto:[EMAIL PROTECTED] Sent: Thursday, June 07, 2007 4:02 PM To: Kevin Lloyd Cc: [EMAIL PROTECTED]; [EMAIL PROTECTED]; linux-kernel@vger.kernel.org; [EMAIL PROTECTED]; Linux Development Group Subject: Re: [PATCH 2.6.22-rc4] USB: add support for TRU-install (C) andnew VID/PIDs to Sierra Wireless driver (ATTEMPT 2) On Wed, Jun 06, 2007 at 05:31:22PM -0700, Kevin Lloyd wrote: > From: Kevin Lloyd <[EMAIL PROTECTED]> > > This patch is derived from the 2.6.22-rc4 kernel source and adds > support for the new TRU-install (C) feature (without this support > new devices will not work), and add new UMTS device VID/PIDs. > > There was a previous submission on Tuesday June 5th, it was pointed > out that it was targeted for an outdated kernel, please use this one > instead. Hm, I tried fixing this up by hand, but there is one major thing that I think you need to change so I'll ask you to do it: > @@ -1,6 +1,8 @@ > /* >USB Driver for Sierra Wireless > + Targeted for 2.6.22 kernel This is not needed. > + >Copyright (C) 2006 Kevin Lloyd <[EMAIL PROTECTED]> >IMPORTANT DISCLAIMER: This driver is not commercially supported by > @@ -15,9 +17,9 @@ */ -#define DRIVER_VERSION "v.1.0.6" > +#define DRIVER_VERSION "v.1.2.3" > #define DRIVER_AUTHOR "Kevin Lloyd <[EMAIL PROTECTED]>" > -#define DRIVER_DESC "USB Driver for Sierra Wireless USB modems" > +#define DRIVER_DESC "USB Driver for Sierra Wireless modems" > #include > #include > @@ -28,66 +30,53 @@ > #include > #include > +#include "sierra.h" Just put the .h stuff into the file, you don't need a separate file. > +int sierra_probe(struct usb_interface *iface, const struct > usb_device_id *id); +int sierra_set_power_state(struct usb_device > *udev, unsigned long swiState); +int sierra_set_ms_mode(struct > usb_device *udev, SWIMS_SET_MODE_VALUE eSocMode); All of these need to be static, and you can just reorganize where you put them in the file to prevent the need for forward declarations. > static struct usb_driver sierra_driver = { > .name = "sierra", > -.probe = usb_serial_probe, > +.probe = sierra_probe, This is scary, more below about this... > .disconnect = usb_serial_disconnect, > .id_table = id_table, > .no_dynamic_id =1, > }; > +/* Check if in installer mode */ > +if (id->driver_info == DEVICE_INSTALLER) > +{ Wrong codeing style for this whole if/else chain. > +dbg("SWIMS: FOUND DEVICE(SW)\n"); > +result = sierra_set_ms_mode(udev, SWIMS_SET_MODE_Modem); > +dbg("SWIMS: swich result: %d\n",result); > +return result; > +} > +/* Check if composite deviec */ > +else if (id->driver_info == DEVICE_1_PORT) > +{ > +dbg("SWI: MODEM (Comp) FOUND"); > +sierra_device.num_ports = 1; > +sierra_device.num_bulk_in = 1; > +sierra_device.num_bulk_out = 1; this is the big problem. You are modifying a structure that is static and should be read-only. What happens if you have a system with more than one type of these devices in it? What happens then? The proper way to do this is just use the calc_num_ports() callback function in the usb_serial_driver structure. That's where you can calculate the proper number of ports for this device if you need to. Or you might need to do it in the probe() function of the usb_serial_driver structure instead, depending on what you really need to do here. So, can you fix this up and resend it? > +typedef __u16 SWIMS_SET_MODE_VALUE; Heh, no typedefs please, just use __u16 here for where you used this type (it's only 2 functions.) > + > +enum devicetype { > + DEVICE_3_PORT = 0, > + DEVICE_1_PORT = 1, > + DEVICE_INSTALLER = 2, > +}; tabs instead of leading spaces? > + > +/* per port private data */ > +#define N_IN_URB4 > +#define N_OUT_URB 4 > +#define IN_BUFLEN 4096 > +#define OUT_BUFLEN 1024 > + > +#define DEF_NUM_PORTS 3 Tab before the 3? thanks, greg k-h - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
RE: [PATCH 2.6.22-rc4] USB: add support for TRU-install (C) andnew VID/PIDs to Sierra Wireless driver (ATTEMPT 2)
Thanks for the comments, I'll try and re-submit ASAP. WRT to changing the number of ports, I was worried about the multi devices on one system issue as well, however I tested it out with multiple 1-port and 3-port devices and it worked perfectly fine and was able to communicate with all of them. Nonetheless I'll give the calc_num_ports() attempt a try. - Kevin -Original Message- From: Greg KH [mailto:[EMAIL PROTECTED] Sent: Thursday, June 07, 2007 4:02 PM To: Kevin Lloyd Cc: [EMAIL PROTECTED]; [EMAIL PROTECTED]; linux-kernel@vger.kernel.org; [EMAIL PROTECTED]; Linux Development Group Subject: Re: [PATCH 2.6.22-rc4] USB: add support for TRU-install (C) andnew VID/PIDs to Sierra Wireless driver (ATTEMPT 2) On Wed, Jun 06, 2007 at 05:31:22PM -0700, Kevin Lloyd wrote: From: Kevin Lloyd [EMAIL PROTECTED] This patch is derived from the 2.6.22-rc4 kernel source and adds support for the new TRU-install (C) feature (without this support new devices will not work), and add new UMTS device VID/PIDs. There was a previous submission on Tuesday June 5th, it was pointed out that it was targeted for an outdated kernel, please use this one instead. Hm, I tried fixing this up by hand, but there is one major thing that I think you need to change so I'll ask you to do it: @@ -1,6 +1,8 @@ /* USB Driver for Sierra Wireless + Targeted for 2.6.22 kernel This is not needed. + Copyright (C) 2006 Kevin Lloyd [EMAIL PROTECTED] IMPORTANT DISCLAIMER: This driver is not commercially supported by @@ -15,9 +17,9 @@ */ -#define DRIVER_VERSION v.1.0.6 +#define DRIVER_VERSION v.1.2.3 #define DRIVER_AUTHOR Kevin Lloyd [EMAIL PROTECTED] -#define DRIVER_DESC USB Driver for Sierra Wireless USB modems +#define DRIVER_DESC USB Driver for Sierra Wireless modems #include linux/kernel.h #include linux/jiffies.h @@ -28,66 +30,53 @@ #include linux/usb.h #include linux/usb/serial.h +#include sierra.h Just put the .h stuff into the file, you don't need a separate file. +int sierra_probe(struct usb_interface *iface, const struct usb_device_id *id); +int sierra_set_power_state(struct usb_device *udev, unsigned long swiState); +int sierra_set_ms_mode(struct usb_device *udev, SWIMS_SET_MODE_VALUE eSocMode); All of these need to be static, and you can just reorganize where you put them in the file to prevent the need for forward declarations. static struct usb_driver sierra_driver = { .name = sierra, -.probe = usb_serial_probe, +.probe = sierra_probe, This is scary, more below about this... .disconnect = usb_serial_disconnect, .id_table = id_table, .no_dynamic_id =1, }; +/* Check if in installer mode */ +if (id-driver_info == DEVICE_INSTALLER) +{ Wrong codeing style for this whole if/else chain. +dbg(SWIMS: FOUND DEVICE(SW)\n); +result = sierra_set_ms_mode(udev, SWIMS_SET_MODE_Modem); +dbg(SWIMS: swich result: %d\n,result); +return result; +} +/* Check if composite deviec */ +else if (id-driver_info == DEVICE_1_PORT) +{ +dbg(SWI: MODEM (Comp) FOUND); +sierra_device.num_ports = 1; +sierra_device.num_bulk_in = 1; +sierra_device.num_bulk_out = 1; this is the big problem. You are modifying a structure that is static and should be read-only. What happens if you have a system with more than one type of these devices in it? What happens then? The proper way to do this is just use the calc_num_ports() callback function in the usb_serial_driver structure. That's where you can calculate the proper number of ports for this device if you need to. Or you might need to do it in the probe() function of the usb_serial_driver structure instead, depending on what you really need to do here. So, can you fix this up and resend it? +typedef __u16 SWIMS_SET_MODE_VALUE; Heh, no typedefs please, just use __u16 here for where you used this type (it's only 2 functions.) + +enum devicetype { + DEVICE_3_PORT = 0, + DEVICE_1_PORT = 1, + DEVICE_INSTALLER = 2, +}; tabs instead of leading spaces? + +/* per port private data */ +#define N_IN_URB4 +#define N_OUT_URB 4 +#define IN_BUFLEN 4096 +#define OUT_BUFLEN 1024 + +#define DEF_NUM_PORTS 3 Tab before the 3? thanks, greg k-h - To unsubscribe from this list: send the line unsubscribe linux-kernel in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
[PATCH 2.6.22-rc4] USB: add support for TRU-install (C) and new VID/PIDs to Sierra Wireless driver (ATTEMPT 2)
From: Kevin Lloyd <[EMAIL PROTECTED]> This patch is derived from the 2.6.22-rc4 kernel source and adds support for the new TRU-install (C) feature (without this support new devices will not work), and add new UMTS device VID/PIDs. There was a previous submission on Tuesday June 5th, it was pointed out that it was targeted for an outdated kernel, please use this one instead. Thanks Signed-off-by: Kevin Lloyd <[EMAIL PROTECTED]> --- diff -uprN linux-2.6.22-rc4/drivers/usb/serial/sierra.c linux-2.6.22-rc4-swoc/drivers/usb/serial/sierra.c --- linux-2.6.22-rc4/drivers/usb/serial/sierra.c2007-06-06 10:53:20.0 -0700 +++ linux-2.6.22-rc4-swoc/drivers/usb/serial/sierra.c 2007-06-06 11:14:26.0 -0700 @@ -1,6 +1,8 @@ /* USB Driver for Sierra Wireless + Targeted for 2.6.22 kernel + Copyright (C) 2006 Kevin Lloyd <[EMAIL PROTECTED]> IMPORTANT DISCLAIMER: This driver is not commercially supported by @@ -15,9 +17,9 @@ */ -#define DRIVER_VERSION "v.1.0.6" +#define DRIVER_VERSION "v.1.2.3" #define DRIVER_AUTHOR "Kevin Lloyd <[EMAIL PROTECTED]>" -#define DRIVER_DESC "USB Driver for Sierra Wireless USB modems" +#define DRIVER_DESC "USB Driver for Sierra Wireless modems" #include #include @@ -28,66 +30,53 @@ #include #include +#include "sierra.h" + +static int debug; static struct usb_device_id id_table [] = { { USB_DEVICE(0x1199, 0x0017) }, /* Sierra Wireless EM5625 */ { USB_DEVICE(0x1199, 0x0018) }, /* Sierra Wireless MC5720 */ + { USB_DEVICE(0x0f30, 0x1b1d) }, /* Sierra Wireless MC5720 */ { USB_DEVICE(0x1199, 0x0218) }, /* Sierra Wireless MC5720 */ { USB_DEVICE(0x1199, 0x0020) }, /* Sierra Wireless MC5725 */ { USB_DEVICE(0x1199, 0x0019) }, /* Sierra Wireless AirCard 595 */ - { USB_DEVICE(0x1199, 0x0120) }, /* Sierra Wireless AirCard 595U */ { USB_DEVICE(0x1199, 0x0021) }, /* Sierra Wireless AirCard 597E */ + { USB_DEVICE(0x1199, 0x0120) }, /* Sierra Wireless USB Dongle 595U*/ + { USB_DEVICE(0x1199, 0x6802) }, /* Sierra Wireless MC8755 */ { USB_DEVICE(0x1199, 0x6804) }, /* Sierra Wireless MC8755 */ { USB_DEVICE(0x1199, 0x6803) }, /* Sierra Wireless MC8765 */ - { USB_DEVICE(0x1199, 0x6812) }, /* Sierra Wireless MC8775 */ + { USB_DEVICE(0x1199, 0x6812) }, /* Sierra Wireless MC8775 & AC 875U */ { USB_DEVICE(0x1199, 0x6820) }, /* Sierra Wireless AirCard 875 */ - - { USB_DEVICE(0x1199, 0x0112) }, /* Sierra Wireless AirCard 580 */ - { USB_DEVICE(0x0F3D, 0x0112) }, /* AirPrime/Sierra PC 5220 */ + { USB_DEVICE(0x1199, 0x6832) }, /* Sierra Wireless MC8780*/ + { USB_DEVICE(0x1199, 0x6833) }, /* Sierra Wireless MC8781*/ + { USB_DEVICE(0x1199, 0x6850) }, /* Sierra Wireless AirCard 880 */ + { USB_DEVICE(0x1199, 0x6851) }, /* Sierra Wireless AirCard 881 */ + { USB_DEVICE(0x1199, 0x6852) }, /* Sierra Wireless AirCard 880 E */ + { USB_DEVICE(0x1199, 0x6853) }, /* Sierra Wireless AirCard 881 E */ + + { USB_DEVICE(0x1199, 0x0112), .driver_info = DEVICE_1_PORT }, /* Sierra Wireless AirCard 580 */ + { USB_DEVICE(0x0F3D, 0x0112), .driver_info = DEVICE_1_PORT }, /* Airprime/Sierra PC 5220 */ + + + { USB_DEVICE(0x1199, 0x0FFF), .driver_info = DEVICE_INSTALLER}, { } }; MODULE_DEVICE_TABLE(usb, id_table); -static struct usb_device_id id_table_1port [] = { - { USB_DEVICE(0x1199, 0x0112) }, /* Sierra Wireless AirCard 580 */ - { USB_DEVICE(0x0F3D, 0x0112) }, /* AirPrime/Sierra PC 5220 */ - { } -}; - -static struct usb_device_id id_table_3port [] = { - { USB_DEVICE(0x1199, 0x0017) }, /* Sierra Wireless EM5625 */ - { USB_DEVICE(0x1199, 0x0018) }, /* Sierra Wireless MC5720 */ - { USB_DEVICE(0x1199, 0x0218) }, /* Sierra Wireless MC5720 */ - { USB_DEVICE(0x1199, 0x0020) }, /* Sierra Wireless MC5725 */ - { USB_DEVICE(0x1199, 0x0019) }, /* Sierra Wireless AirCard 595 */ - { USB_DEVICE(0x1199, 0x0120) }, /* Sierra Wireless AirCard 595U */ - { USB_DEVICE(0x1199, 0x0021) }, /* Sierra Wireless AirCard 597E */ - { USB_DEVICE(0x1199, 0x6802) }, /* Sierra Wireless MC8755 */ - { USB_DEVICE(0x1199, 0x6804) }, /* Sierra Wireless MC8755 */ - { USB_DEVICE(0x1199, 0x6803) }, /* Sierra Wireless MC8765 */ - { USB_DEVICE(0x1199, 0x6812) }, /* Sierra Wireless MC8775 */ - { USB_DEVICE(0x1199, 0x6820) }, /* Sierra Wireless AirCard 875 */ - { } -}; +int sierra_probe(struct usb_interface *iface, const struct usb_device_id *id); +int sierra_set_power_state(struct usb_device *udev, unsigned long swiState); +int sierra_set_ms_mode(struct usb_device *udev, SWIMS_SET_MODE_VALUE eSocMode); static struct usb_driver sierra_driver = { .name = "sierra", - .probe = usb_serial_probe, + .probe = sierra_probe,
[PATCH 2.6.22-rc4] USB: add support for TRU-install (C) and new VID/PIDs to Sierra Wireless driver (ATTEMPT 2)
From: Kevin Lloyd [EMAIL PROTECTED] This patch is derived from the 2.6.22-rc4 kernel source and adds support for the new TRU-install (C) feature (without this support new devices will not work), and add new UMTS device VID/PIDs. There was a previous submission on Tuesday June 5th, it was pointed out that it was targeted for an outdated kernel, please use this one instead. Thanks Signed-off-by: Kevin Lloyd [EMAIL PROTECTED] --- diff -uprN linux-2.6.22-rc4/drivers/usb/serial/sierra.c linux-2.6.22-rc4-swoc/drivers/usb/serial/sierra.c --- linux-2.6.22-rc4/drivers/usb/serial/sierra.c2007-06-06 10:53:20.0 -0700 +++ linux-2.6.22-rc4-swoc/drivers/usb/serial/sierra.c 2007-06-06 11:14:26.0 -0700 @@ -1,6 +1,8 @@ /* USB Driver for Sierra Wireless + Targeted for 2.6.22 kernel + Copyright (C) 2006 Kevin Lloyd [EMAIL PROTECTED] IMPORTANT DISCLAIMER: This driver is not commercially supported by @@ -15,9 +17,9 @@ */ -#define DRIVER_VERSION v.1.0.6 +#define DRIVER_VERSION v.1.2.3 #define DRIVER_AUTHOR Kevin Lloyd [EMAIL PROTECTED] -#define DRIVER_DESC USB Driver for Sierra Wireless USB modems +#define DRIVER_DESC USB Driver for Sierra Wireless modems #include linux/kernel.h #include linux/jiffies.h @@ -28,66 +30,53 @@ #include linux/usb.h #include linux/usb/serial.h +#include sierra.h + +static int debug; static struct usb_device_id id_table [] = { { USB_DEVICE(0x1199, 0x0017) }, /* Sierra Wireless EM5625 */ { USB_DEVICE(0x1199, 0x0018) }, /* Sierra Wireless MC5720 */ + { USB_DEVICE(0x0f30, 0x1b1d) }, /* Sierra Wireless MC5720 */ { USB_DEVICE(0x1199, 0x0218) }, /* Sierra Wireless MC5720 */ { USB_DEVICE(0x1199, 0x0020) }, /* Sierra Wireless MC5725 */ { USB_DEVICE(0x1199, 0x0019) }, /* Sierra Wireless AirCard 595 */ - { USB_DEVICE(0x1199, 0x0120) }, /* Sierra Wireless AirCard 595U */ { USB_DEVICE(0x1199, 0x0021) }, /* Sierra Wireless AirCard 597E */ + { USB_DEVICE(0x1199, 0x0120) }, /* Sierra Wireless USB Dongle 595U*/ + { USB_DEVICE(0x1199, 0x6802) }, /* Sierra Wireless MC8755 */ { USB_DEVICE(0x1199, 0x6804) }, /* Sierra Wireless MC8755 */ { USB_DEVICE(0x1199, 0x6803) }, /* Sierra Wireless MC8765 */ - { USB_DEVICE(0x1199, 0x6812) }, /* Sierra Wireless MC8775 */ + { USB_DEVICE(0x1199, 0x6812) }, /* Sierra Wireless MC8775 AC 875U */ { USB_DEVICE(0x1199, 0x6820) }, /* Sierra Wireless AirCard 875 */ - - { USB_DEVICE(0x1199, 0x0112) }, /* Sierra Wireless AirCard 580 */ - { USB_DEVICE(0x0F3D, 0x0112) }, /* AirPrime/Sierra PC 5220 */ + { USB_DEVICE(0x1199, 0x6832) }, /* Sierra Wireless MC8780*/ + { USB_DEVICE(0x1199, 0x6833) }, /* Sierra Wireless MC8781*/ + { USB_DEVICE(0x1199, 0x6850) }, /* Sierra Wireless AirCard 880 */ + { USB_DEVICE(0x1199, 0x6851) }, /* Sierra Wireless AirCard 881 */ + { USB_DEVICE(0x1199, 0x6852) }, /* Sierra Wireless AirCard 880 E */ + { USB_DEVICE(0x1199, 0x6853) }, /* Sierra Wireless AirCard 881 E */ + + { USB_DEVICE(0x1199, 0x0112), .driver_info = DEVICE_1_PORT }, /* Sierra Wireless AirCard 580 */ + { USB_DEVICE(0x0F3D, 0x0112), .driver_info = DEVICE_1_PORT }, /* Airprime/Sierra PC 5220 */ + + + { USB_DEVICE(0x1199, 0x0FFF), .driver_info = DEVICE_INSTALLER}, { } }; MODULE_DEVICE_TABLE(usb, id_table); -static struct usb_device_id id_table_1port [] = { - { USB_DEVICE(0x1199, 0x0112) }, /* Sierra Wireless AirCard 580 */ - { USB_DEVICE(0x0F3D, 0x0112) }, /* AirPrime/Sierra PC 5220 */ - { } -}; - -static struct usb_device_id id_table_3port [] = { - { USB_DEVICE(0x1199, 0x0017) }, /* Sierra Wireless EM5625 */ - { USB_DEVICE(0x1199, 0x0018) }, /* Sierra Wireless MC5720 */ - { USB_DEVICE(0x1199, 0x0218) }, /* Sierra Wireless MC5720 */ - { USB_DEVICE(0x1199, 0x0020) }, /* Sierra Wireless MC5725 */ - { USB_DEVICE(0x1199, 0x0019) }, /* Sierra Wireless AirCard 595 */ - { USB_DEVICE(0x1199, 0x0120) }, /* Sierra Wireless AirCard 595U */ - { USB_DEVICE(0x1199, 0x0021) }, /* Sierra Wireless AirCard 597E */ - { USB_DEVICE(0x1199, 0x6802) }, /* Sierra Wireless MC8755 */ - { USB_DEVICE(0x1199, 0x6804) }, /* Sierra Wireless MC8755 */ - { USB_DEVICE(0x1199, 0x6803) }, /* Sierra Wireless MC8765 */ - { USB_DEVICE(0x1199, 0x6812) }, /* Sierra Wireless MC8775 */ - { USB_DEVICE(0x1199, 0x6820) }, /* Sierra Wireless AirCard 875 */ - { } -}; +int sierra_probe(struct usb_interface *iface, const struct usb_device_id *id); +int sierra_set_power_state(struct usb_device *udev, unsigned long swiState); +int sierra_set_ms_mode(struct usb_device *udev, SWIMS_SET_MODE_VALUE eSocMode); static struct usb_driver sierra_driver = { .name = sierra, - .probe = usb_serial_probe, + .probe = sierra_probe, .disconnect = usb_serial_disconnect, .id_table
[PATCH 2.6.21.3] USB: add support for TRU-install and new VID/PIDs to Sierra Wireless driver
From: Kevin Lloyd <[EMAIL PROTECTED]> This patch is derived from the 2.6.21.3 kernel source and adds support for the new TRU-install feature (without this support new devices will not work), and add new UMTS device VID/PIDs. Signed-off-by: Kevin Lloyd <[EMAIL PROTECTED]> --- diff -uprN linux-2.6.21.3.orig/drivers/usb/serial/sierra.c linux-2.6.21.3.swoc/drivers/usb/serial/sierra.c --- linux-2.6.21.3.orig/drivers/usb/serial/sierra.c 2007-05-24 14:22:47.0 -0700 +++ linux-2.6.21.3.swoc/drivers/usb/serial/sierra.c 2007-06-05 13:29:49.0 -0700 @@ -15,9 +15,9 @@ */ -#define DRIVER_VERSION "v.1.0.6" +#define DRIVER_VERSION "v.1.2.2" #define DRIVER_AUTHOR "Kevin Lloyd <[EMAIL PROTECTED]>" -#define DRIVER_DESC "USB Driver for Sierra Wireless USB modems" +#define DRIVER_DESC "USB Driver for Sierra Wireless modems" #include #include @@ -28,64 +28,53 @@ #include #include +#include "sierra.h" + +static int debug; static struct usb_device_id id_table [] = { { USB_DEVICE(0x1199, 0x0017) }, /* Sierra Wireless EM5625 */ { USB_DEVICE(0x1199, 0x0018) }, /* Sierra Wireless MC5720 */ + { USB_DEVICE(0x0f30, 0x1b1d) }, /* Sierra Wireless MC5720 */ { USB_DEVICE(0x1199, 0x0218) }, /* Sierra Wireless MC5720 */ { USB_DEVICE(0x1199, 0x0020) }, /* Sierra Wireless MC5725 */ { USB_DEVICE(0x1199, 0x0019) }, /* Sierra Wireless AirCard 595 */ { USB_DEVICE(0x1199, 0x0021) }, /* Sierra Wireless AirCard 597E */ + { USB_DEVICE(0x1199, 0x0120) }, /* Sierra Wireless USB Dongle 595U*/ + { USB_DEVICE(0x1199, 0x6802) }, /* Sierra Wireless MC8755 */ { USB_DEVICE(0x1199, 0x6804) }, /* Sierra Wireless MC8755 */ { USB_DEVICE(0x1199, 0x6803) }, /* Sierra Wireless MC8765 */ - { USB_DEVICE(0x1199, 0x6812) }, /* Sierra Wireless MC8775 */ + { USB_DEVICE(0x1199, 0x6812) }, /* Sierra Wireless MC8775 & AC 875U */ { USB_DEVICE(0x1199, 0x6820) }, /* Sierra Wireless AirCard 875 */ - - { USB_DEVICE(0x1199, 0x0112) }, /* Sierra Wireless AirCard 580 */ - { USB_DEVICE(0x0F3D, 0x0112) }, /* AirPrime/Sierra PC 5220 */ + { USB_DEVICE(0x1199, 0x6832) }, /* Sierra Wireless MC8780*/ + { USB_DEVICE(0x1199, 0x6833) }, /* Sierra Wireless MC8781*/ + { USB_DEVICE(0x1199, 0x6850) }, /* Sierra Wireless AirCard 880 */ + { USB_DEVICE(0x1199, 0x6851) }, /* Sierra Wireless AirCard 881 */ + { USB_DEVICE(0x1199, 0x6852) }, /* Sierra Wireless AirCard 880 E */ + { USB_DEVICE(0x1199, 0x6853) }, /* Sierra Wireless AirCard 881 E */ + + { USB_DEVICE(0x1199, 0x0112), .driver_info = DEVICE_1_PORT }, /* Sierra Wireless AirCard 580 */ + { USB_DEVICE(0x0F3D, 0x0112), .driver_info = DEVICE_1_PORT }, /* Airprime/Sierra PC 5220 */ + + + { USB_DEVICE(0x1199, 0x0FFF), .driver_info = DEVICE_INSTALLER}, { } }; MODULE_DEVICE_TABLE(usb, id_table); -static struct usb_device_id id_table_1port [] = { - { USB_DEVICE(0x1199, 0x0112) }, /* Sierra Wireless AirCard 580 */ - { USB_DEVICE(0x0F3D, 0x0112) }, /* AirPrime/Sierra PC 5220 */ - { } -}; - -static struct usb_device_id id_table_3port [] = { - { USB_DEVICE(0x1199, 0x0017) }, /* Sierra Wireless EM5625 */ - { USB_DEVICE(0x1199, 0x0018) }, /* Sierra Wireless MC5720 */ - { USB_DEVICE(0x1199, 0x0218) }, /* Sierra Wireless MC5720 */ - { USB_DEVICE(0x1199, 0x0020) }, /* Sierra Wireless MC5725 */ - { USB_DEVICE(0x1199, 0x0019) }, /* Sierra Wireless AirCard 595 */ - { USB_DEVICE(0x1199, 0x0021) }, /* Sierra Wireless AirCard 597E */ - { USB_DEVICE(0x1199, 0x6802) }, /* Sierra Wireless MC8755 */ - { USB_DEVICE(0x1199, 0x6804) }, /* Sierra Wireless MC8755 */ - { USB_DEVICE(0x1199, 0x6803) }, /* Sierra Wireless MC8765 */ - { USB_DEVICE(0x1199, 0x6812) }, /* Sierra Wireless MC8775 */ - { USB_DEVICE(0x1199, 0x6820) }, /* Sierra Wireless AirCard 875 */ - { } -}; +int sierra_probe(struct usb_interface *iface, const struct usb_device_id *id); +int sierra_set_power_state(struct usb_device *udev, unsigned long swiState); +int sierra_set_ms_mode(struct usb_device *udev, SWIMS_SET_MODE_VALUE eSocMode); static struct usb_driver sierra_driver = { .name = "sierra", - .probe = usb_serial_probe, + .probe = sierra_probe, .disconnect = usb_serial_disconnect, .id_table = id_table, .no_dynamic_id =1, }; - -static int debug; - -/* per port private data */ -#define N_IN_URB 4 -#define N_OUT_URB 4 -#define IN_BUFLEN 4096 -#define OUT_BUFLEN 128 - struct sierra_port_private { /* Input endpoints and buffer for this port */ struct urb *in_urbs[N_IN_URB]; @@ -116,6 +105,7 @@ static int sierra_send_setup(struct usb_ if (port->tty) {
[PATCH 2.6.21.3] USB: add support for TRU-install and new VID/PIDs to Sierra Wireless driver
From: Kevin Lloyd [EMAIL PROTECTED] This patch is derived from the 2.6.21.3 kernel source and adds support for the new TRU-install feature (without this support new devices will not work), and add new UMTS device VID/PIDs. Signed-off-by: Kevin Lloyd [EMAIL PROTECTED] --- diff -uprN linux-2.6.21.3.orig/drivers/usb/serial/sierra.c linux-2.6.21.3.swoc/drivers/usb/serial/sierra.c --- linux-2.6.21.3.orig/drivers/usb/serial/sierra.c 2007-05-24 14:22:47.0 -0700 +++ linux-2.6.21.3.swoc/drivers/usb/serial/sierra.c 2007-06-05 13:29:49.0 -0700 @@ -15,9 +15,9 @@ */ -#define DRIVER_VERSION v.1.0.6 +#define DRIVER_VERSION v.1.2.2 #define DRIVER_AUTHOR Kevin Lloyd [EMAIL PROTECTED] -#define DRIVER_DESC USB Driver for Sierra Wireless USB modems +#define DRIVER_DESC USB Driver for Sierra Wireless modems #include linux/kernel.h #include linux/jiffies.h @@ -28,64 +28,53 @@ #include linux/usb.h #include linux/usb/serial.h +#include sierra.h + +static int debug; static struct usb_device_id id_table [] = { { USB_DEVICE(0x1199, 0x0017) }, /* Sierra Wireless EM5625 */ { USB_DEVICE(0x1199, 0x0018) }, /* Sierra Wireless MC5720 */ + { USB_DEVICE(0x0f30, 0x1b1d) }, /* Sierra Wireless MC5720 */ { USB_DEVICE(0x1199, 0x0218) }, /* Sierra Wireless MC5720 */ { USB_DEVICE(0x1199, 0x0020) }, /* Sierra Wireless MC5725 */ { USB_DEVICE(0x1199, 0x0019) }, /* Sierra Wireless AirCard 595 */ { USB_DEVICE(0x1199, 0x0021) }, /* Sierra Wireless AirCard 597E */ + { USB_DEVICE(0x1199, 0x0120) }, /* Sierra Wireless USB Dongle 595U*/ + { USB_DEVICE(0x1199, 0x6802) }, /* Sierra Wireless MC8755 */ { USB_DEVICE(0x1199, 0x6804) }, /* Sierra Wireless MC8755 */ { USB_DEVICE(0x1199, 0x6803) }, /* Sierra Wireless MC8765 */ - { USB_DEVICE(0x1199, 0x6812) }, /* Sierra Wireless MC8775 */ + { USB_DEVICE(0x1199, 0x6812) }, /* Sierra Wireless MC8775 AC 875U */ { USB_DEVICE(0x1199, 0x6820) }, /* Sierra Wireless AirCard 875 */ - - { USB_DEVICE(0x1199, 0x0112) }, /* Sierra Wireless AirCard 580 */ - { USB_DEVICE(0x0F3D, 0x0112) }, /* AirPrime/Sierra PC 5220 */ + { USB_DEVICE(0x1199, 0x6832) }, /* Sierra Wireless MC8780*/ + { USB_DEVICE(0x1199, 0x6833) }, /* Sierra Wireless MC8781*/ + { USB_DEVICE(0x1199, 0x6850) }, /* Sierra Wireless AirCard 880 */ + { USB_DEVICE(0x1199, 0x6851) }, /* Sierra Wireless AirCard 881 */ + { USB_DEVICE(0x1199, 0x6852) }, /* Sierra Wireless AirCard 880 E */ + { USB_DEVICE(0x1199, 0x6853) }, /* Sierra Wireless AirCard 881 E */ + + { USB_DEVICE(0x1199, 0x0112), .driver_info = DEVICE_1_PORT }, /* Sierra Wireless AirCard 580 */ + { USB_DEVICE(0x0F3D, 0x0112), .driver_info = DEVICE_1_PORT }, /* Airprime/Sierra PC 5220 */ + + + { USB_DEVICE(0x1199, 0x0FFF), .driver_info = DEVICE_INSTALLER}, { } }; MODULE_DEVICE_TABLE(usb, id_table); -static struct usb_device_id id_table_1port [] = { - { USB_DEVICE(0x1199, 0x0112) }, /* Sierra Wireless AirCard 580 */ - { USB_DEVICE(0x0F3D, 0x0112) }, /* AirPrime/Sierra PC 5220 */ - { } -}; - -static struct usb_device_id id_table_3port [] = { - { USB_DEVICE(0x1199, 0x0017) }, /* Sierra Wireless EM5625 */ - { USB_DEVICE(0x1199, 0x0018) }, /* Sierra Wireless MC5720 */ - { USB_DEVICE(0x1199, 0x0218) }, /* Sierra Wireless MC5720 */ - { USB_DEVICE(0x1199, 0x0020) }, /* Sierra Wireless MC5725 */ - { USB_DEVICE(0x1199, 0x0019) }, /* Sierra Wireless AirCard 595 */ - { USB_DEVICE(0x1199, 0x0021) }, /* Sierra Wireless AirCard 597E */ - { USB_DEVICE(0x1199, 0x6802) }, /* Sierra Wireless MC8755 */ - { USB_DEVICE(0x1199, 0x6804) }, /* Sierra Wireless MC8755 */ - { USB_DEVICE(0x1199, 0x6803) }, /* Sierra Wireless MC8765 */ - { USB_DEVICE(0x1199, 0x6812) }, /* Sierra Wireless MC8775 */ - { USB_DEVICE(0x1199, 0x6820) }, /* Sierra Wireless AirCard 875 */ - { } -}; +int sierra_probe(struct usb_interface *iface, const struct usb_device_id *id); +int sierra_set_power_state(struct usb_device *udev, unsigned long swiState); +int sierra_set_ms_mode(struct usb_device *udev, SWIMS_SET_MODE_VALUE eSocMode); static struct usb_driver sierra_driver = { .name = sierra, - .probe = usb_serial_probe, + .probe = sierra_probe, .disconnect = usb_serial_disconnect, .id_table = id_table, .no_dynamic_id =1, }; - -static int debug; - -/* per port private data */ -#define N_IN_URB 4 -#define N_OUT_URB 4 -#define IN_BUFLEN 4096 -#define OUT_BUFLEN 128 - struct sierra_port_private { /* Input endpoints and buffer for this port */ struct urb *in_urbs[N_IN_URB]; @@ -116,6 +105,7 @@ static int sierra_send_setup(struct usb_ if (port-tty) { int val = 0; + if (portdata-dtr_state
RE: [PATCH] usb-storage: Add support for unusual device by Sierra Wireless
Not a bad idea. When using the US_FL_IGNORE_DEVICE flag, that causes the usb-storage driver to no load the device and allow another driver properly load it? The reason I ask is because I previously had a separate driver for the device, however there were priority issues regarding which loaded first usb-storage or the separate driver. Thanks, - Kevin -Original Message- From: Daniel Drake [mailto:[EMAIL PROTECTED] Sent: Monday, May 14, 2007 3:59 PM To: Kevin Lloyd Cc: [EMAIL PROTECTED]; [EMAIL PROTECTED]; [EMAIL PROTECTED]; [EMAIL PROTECTED]; linux-kernel@vger.kernel.org Subject: Re: [PATCH] usb-storage: Add support for unusual device by Sierra Wireless Kevin Lloyd wrote: > From: Kevin Lloyd <[EMAIL PROTECTED]> > > This patch is targeted for the 2.6.21.1 kernel source. It adds support > for Sierra Wireless devices with auto-install support to the > unusual_devices list of the usb-mass storage driver. This requires > changes to Kconfig, Makefile, usb.c, unusual_devs.h, and the addition > of sierra_ms.h & sierra_ms.c. We have to do a similar thing for some zd1211rw USB-wireless devices, which appear as a virtual CDROM drive on plugin. To convert them to a proper wireless device, the cdrom has to be ejected, then the device disconnects and reconnects with different ID's (and the wireless endpoints). Originally I wrote a usb-storage subdriver to handle the auto-eject, but this was rejected. It was decided to make usb-storage simply ignore the devices, and have the zd1211rw driver do the eject operation. The same may also apply in your case. See the US_FL_IGNORE_DEVICE flag, and the DEVICE_INSTALLER handling in drivers/net/wireless/zd1211rw/zd_usb.c Daniel - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
[PATCH] usb-storage: Add support for unusual device by Sierra Wireless
From: Kevin Lloyd <[EMAIL PROTECTED]> This patch is targeted for the 2.6.21.1 kernel source. It adds support for Sierra Wireless devices with auto-install support to the unusual_devices list of the usb-mass storage driver. This requires changes to Kconfig, Makefile, usb.c, unusual_devs.h, and the addition of sierra_ms.h & sierra_ms.c. Signed-off-by: Kevin Lloyd <[EMAIL PROTECTED]> --- diff -uprN linux-2.6.21.1/drivers/usb/storage/Kconfig linux-2.6.21.1.swoc/drivers/usb/storage/Kconfig --- linux-2.6.21.1/drivers/usb/storage/Kconfig 2007-04-27 14:49:26.0 -0700 +++ linux-2.6.21.1.swoc/drivers/usb/storage/Kconfig 2007-05-14 13:56:41.0 -0700 @@ -105,6 +105,13 @@ config USB_STORAGE_SDDR55 Say Y here to include additional code to support the Sandisk SDDR-55 SmartMedia reader in the USB Mass Storage driver. +config USB_STORAGE_SIERRA + bool "Sierra Wireless Modem Support" + depends on USB_STORAGE + help + Say Y here in order to support new Sierra Wireless devices with the + auto install feature. + config USB_STORAGE_JUMPSHOT bool "Lexar Jumpshot Compact Flash Reader (EXPERIMENTAL)" depends on USB_STORAGE && EXPERIMENTAL diff -uprN linux-2.6.21.1/drivers/usb/storage/Makefile linux-2.6.21.1.swoc/drivers/usb/storage/Makefile --- linux-2.6.21.1/drivers/usb/storage/Makefile 2007-04-27 14:49:26.0 -0700 +++ linux-2.6.21.1.swoc/drivers/usb/storage/Makefile2007-05-11 15:56:44.0 -0700 @@ -21,6 +21,7 @@ usb-storage-obj-$(CONFIG_USB_STORAGE_JUM usb-storage-obj-$(CONFIG_USB_STORAGE_ALAUDA)+= alauda.o usb-storage-obj-$(CONFIG_USB_STORAGE_ONETOUCH) += onetouch.o usb-storage-obj-$(CONFIG_USB_STORAGE_KARMA) += karma.o +usb-storage-obj-$(CONFIG_USB_STORAGE_SIERRA) += sierra_ms.o usb-storage-objs := scsiglue.o protocol.o transport.o usb.o \ initializers.o $(usb-storage-obj-y) diff -uprN linux-2.6.21.1/drivers/usb/storage/sierra_ms.c linux-2.6.21.1.swoc/drivers/usb/storage/sierra_ms.c --- linux-2.6.21.1/drivers/usb/storage/sierra_ms.c 1969-12-31 16:00:00.0 -0800 +++ linux-2.6.21.1.swoc/drivers/usb/storage/sierra_ms.c 2007-05-14 13:55:38.0 -0700 @@ -0,0 +1,82 @@ +/* Driver for Sierra Wireless devices with auto-install support + * + * First release + * + * Current development and maintenance by: + * (C) 2007 Kevin Lloyd <[EMAIL PROTECTED]> + * + * This program is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License as published by the + * Free Software Foundation; either version 2, or (at your option) any + * later version. + * + * This program is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public License along + * with this program; if not, write to the Free Software Foundation, Inc., + * 675 Mass Ave, Cambridge, MA 02139, USA. + */ + +#include +#include +#include + +#include "usb.h" +#include "transport.h" +#include "protocol.h" +#include "scsiglue.h" +#include "debug.h" +#include "sierra_ms.h" + + +int sierra_ms_init(struct us_data *us) +{ + int retval, retries; + signed long delay_t; + US_DEBUGP("sierra_ms: sierra_ms_init called\n"); + + delay_t = 2; + retries = 3; + while (retries) + { + schedule_timeout_uninterruptible(delay_t*HZ); + retval = sierra_ms_change_mode(us, SWIMS_SET_MODE_Modem); + if (retval == -ETIMEDOUT || retval == -ETIME) { + US_DEBUGP("sierra_ms: Command timed out.\n"); + retries--; + } + else if (retval < 0) { + /* something prevented us from registering this driver */ + err("sierra_ms: Error sending change mode command (%d).\n", retval); + retries--; + } + else + retries=0; + } + return retval; +} + +int sierra_ms_change_mode(struct us_data *us, SWIMS_SET_MODE_VALUE + eSocMode) +{ + int result; + unsigned char *blankArray; + blankArray = kmalloc(0, GFP_KERNEL); + + US_DEBUGP("sierra_ms: attempting to change modes.\n"); + + result = usb_stor_control_msg(us, us->send_ctrl_pipe, + SWIMS_USB_REQUEST_SetMode, + SWIMS_USB_REQUEST_TYPE_SetMode, + eSocMode, + SWIMS_USB_INDEX_SetMode, + blank
[PATCH] usb-storage: Add support for unusual device by Sierra Wireless
From: Kevin Lloyd [EMAIL PROTECTED] This patch is targeted for the 2.6.21.1 kernel source. It adds support for Sierra Wireless devices with auto-install support to the unusual_devices list of the usb-mass storage driver. This requires changes to Kconfig, Makefile, usb.c, unusual_devs.h, and the addition of sierra_ms.h sierra_ms.c. Signed-off-by: Kevin Lloyd [EMAIL PROTECTED] --- diff -uprN linux-2.6.21.1/drivers/usb/storage/Kconfig linux-2.6.21.1.swoc/drivers/usb/storage/Kconfig --- linux-2.6.21.1/drivers/usb/storage/Kconfig 2007-04-27 14:49:26.0 -0700 +++ linux-2.6.21.1.swoc/drivers/usb/storage/Kconfig 2007-05-14 13:56:41.0 -0700 @@ -105,6 +105,13 @@ config USB_STORAGE_SDDR55 Say Y here to include additional code to support the Sandisk SDDR-55 SmartMedia reader in the USB Mass Storage driver. +config USB_STORAGE_SIERRA + bool Sierra Wireless Modem Support + depends on USB_STORAGE + help + Say Y here in order to support new Sierra Wireless devices with the + auto install feature. + config USB_STORAGE_JUMPSHOT bool Lexar Jumpshot Compact Flash Reader (EXPERIMENTAL) depends on USB_STORAGE EXPERIMENTAL diff -uprN linux-2.6.21.1/drivers/usb/storage/Makefile linux-2.6.21.1.swoc/drivers/usb/storage/Makefile --- linux-2.6.21.1/drivers/usb/storage/Makefile 2007-04-27 14:49:26.0 -0700 +++ linux-2.6.21.1.swoc/drivers/usb/storage/Makefile2007-05-11 15:56:44.0 -0700 @@ -21,6 +21,7 @@ usb-storage-obj-$(CONFIG_USB_STORAGE_JUM usb-storage-obj-$(CONFIG_USB_STORAGE_ALAUDA)+= alauda.o usb-storage-obj-$(CONFIG_USB_STORAGE_ONETOUCH) += onetouch.o usb-storage-obj-$(CONFIG_USB_STORAGE_KARMA) += karma.o +usb-storage-obj-$(CONFIG_USB_STORAGE_SIERRA) += sierra_ms.o usb-storage-objs := scsiglue.o protocol.o transport.o usb.o \ initializers.o $(usb-storage-obj-y) diff -uprN linux-2.6.21.1/drivers/usb/storage/sierra_ms.c linux-2.6.21.1.swoc/drivers/usb/storage/sierra_ms.c --- linux-2.6.21.1/drivers/usb/storage/sierra_ms.c 1969-12-31 16:00:00.0 -0800 +++ linux-2.6.21.1.swoc/drivers/usb/storage/sierra_ms.c 2007-05-14 13:55:38.0 -0700 @@ -0,0 +1,82 @@ +/* Driver for Sierra Wireless devices with auto-install support + * + * First release + * + * Current development and maintenance by: + * (C) 2007 Kevin Lloyd [EMAIL PROTECTED] + * + * This program is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License as published by the + * Free Software Foundation; either version 2, or (at your option) any + * later version. + * + * This program is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public License along + * with this program; if not, write to the Free Software Foundation, Inc., + * 675 Mass Ave, Cambridge, MA 02139, USA. + */ + +#include scsi/scsi.h +#include scsi/scsi_cmnd.h +#include scsi/scsi_device.h + +#include usb.h +#include transport.h +#include protocol.h +#include scsiglue.h +#include debug.h +#include sierra_ms.h + + +int sierra_ms_init(struct us_data *us) +{ + int retval, retries; + signed long delay_t; + US_DEBUGP(sierra_ms: sierra_ms_init called\n); + + delay_t = 2; + retries = 3; + while (retries) + { + schedule_timeout_uninterruptible(delay_t*HZ); + retval = sierra_ms_change_mode(us, SWIMS_SET_MODE_Modem); + if (retval == -ETIMEDOUT || retval == -ETIME) { + US_DEBUGP(sierra_ms: Command timed out.\n); + retries--; + } + else if (retval 0) { + /* something prevented us from registering this driver */ + err(sierra_ms: Error sending change mode command (%d).\n, retval); + retries--; + } + else + retries=0; + } + return retval; +} + +int sierra_ms_change_mode(struct us_data *us, SWIMS_SET_MODE_VALUE + eSocMode) +{ + int result; + unsigned char *blankArray; + blankArray = kmalloc(0, GFP_KERNEL); + + US_DEBUGP(sierra_ms: attempting to change modes.\n); + + result = usb_stor_control_msg(us, us-send_ctrl_pipe, + SWIMS_USB_REQUEST_SetMode, + SWIMS_USB_REQUEST_TYPE_SetMode, + eSocMode, + SWIMS_USB_INDEX_SetMode, + blankArray, + 0, + 5*HZ); + + return result; +} + diff -uprN linux-2.6.21.1/drivers/usb
RE: [PATCH] usb-storage: Add support for unusual device by Sierra Wireless
Not a bad idea. When using the US_FL_IGNORE_DEVICE flag, that causes the usb-storage driver to no load the device and allow another driver properly load it? The reason I ask is because I previously had a separate driver for the device, however there were priority issues regarding which loaded first usb-storage or the separate driver. Thanks, - Kevin -Original Message- From: Daniel Drake [mailto:[EMAIL PROTECTED] Sent: Monday, May 14, 2007 3:59 PM To: Kevin Lloyd Cc: [EMAIL PROTECTED]; [EMAIL PROTECTED]; [EMAIL PROTECTED]; [EMAIL PROTECTED]; linux-kernel@vger.kernel.org Subject: Re: [PATCH] usb-storage: Add support for unusual device by Sierra Wireless Kevin Lloyd wrote: From: Kevin Lloyd [EMAIL PROTECTED] This patch is targeted for the 2.6.21.1 kernel source. It adds support for Sierra Wireless devices with auto-install support to the unusual_devices list of the usb-mass storage driver. This requires changes to Kconfig, Makefile, usb.c, unusual_devs.h, and the addition of sierra_ms.h sierra_ms.c. We have to do a similar thing for some zd1211rw USB-wireless devices, which appear as a virtual CDROM drive on plugin. To convert them to a proper wireless device, the cdrom has to be ejected, then the device disconnects and reconnects with different ID's (and the wireless endpoints). Originally I wrote a usb-storage subdriver to handle the auto-eject, but this was rejected. It was decided to make usb-storage simply ignore the devices, and have the zd1211rw driver do the eject operation. The same may also apply in your case. See the US_FL_IGNORE_DEVICE flag, and the DEVICE_INSTALLER handling in drivers/net/wireless/zd1211rw/zd_usb.c Daniel - To unsubscribe from this list: send the line unsubscribe linux-kernel in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
[PATCH 2.6.20-git11 01/01] usb: Remove Airprime device from option.c
from: Kevin Lloyd <[EMAIL PROTECTED]> This patch removes the Airprime 5220 device (branded as Audiovox) from the option.c driver. This device is already supported by the sierra.c driver. This was based off of the option.c driver found in kernel 2.6.20-git11. Signed-off-by: Kevin Lloyd <[EMAIL PROTECTED]> --- --- linux-2.6.20-git11-option-change/drivers/usb/serial/option.c.orig 2007-02-15 10:54:42.0 -0800 +++ linux-2.6.20-git11-option-change/drivers/usb/serial/option.c 2007-02-15 10:55:20.0 -0800 @@ -69,7 +69,6 @@ static int option_send_setup(struct usb /* Vendor and product IDs */ #define OPTION_VENDOR_ID0x0AF0 #define HUAWEI_VENDOR_ID0x12D1 -#define AUDIOVOX_VENDOR_ID 0x0F3D #define NOVATELWIRELESS_VENDOR_ID 0x1410 #define ANYDATA_VENDOR_ID 0x16d5 @@ -81,7 +80,6 @@ static int option_send_setup(struct usb #define OPTION_PRODUCT_GTMAX36 0x6701 #define HUAWEI_PRODUCT_E600 0x1001 #define HUAWEI_PRODUCT_E220 0x1003 -#define AUDIOVOX_PRODUCT_AIRCARD0x0112 #define NOVATELWIRELESS_PRODUCT_U7400x1400 #define ANYDATA_PRODUCT_ID 0x6501 @@ -94,7 +92,6 @@ static struct usb_device_id option_ids[] { USB_DEVICE(OPTION_VENDOR_ID, OPTION_PRODUCT_GTMAX36) }, { USB_DEVICE(HUAWEI_VENDOR_ID, HUAWEI_PRODUCT_E600) }, { USB_DEVICE(HUAWEI_VENDOR_ID, HUAWEI_PRODUCT_E220) }, - { USB_DEVICE(AUDIOVOX_VENDOR_ID, AUDIOVOX_PRODUCT_AIRCARD) }, { USB_DEVICE(NOVATELWIRELESS_VENDOR_ID,NOVATELWIRELESS_PRODUCT_U740) }, { USB_DEVICE(ANYDATA_VENDOR_ID, ANYDATA_PRODUCT_ID) }, { } /* Terminating entry */ @@ -109,7 +106,6 @@ static struct usb_device_id option_ids1[ { USB_DEVICE(OPTION_VENDOR_ID, OPTION_PRODUCT_GTMAX36) }, { USB_DEVICE(HUAWEI_VENDOR_ID, HUAWEI_PRODUCT_E600) }, { USB_DEVICE(HUAWEI_VENDOR_ID, HUAWEI_PRODUCT_E220) }, - { USB_DEVICE(AUDIOVOX_VENDOR_ID, AUDIOVOX_PRODUCT_AIRCARD) }, { USB_DEVICE(NOVATELWIRELESS_VENDOR_ID,NOVATELWIRELESS_PRODUCT_U740) }, { USB_DEVICE(ANYDATA_VENDOR_ID, ANYDATA_PRODUCT_ID) }, { } /* Terminating entry */ - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
[PATCH 2.6.20-git11 01/01] usb: Remove Airprime device from option.c
from: Kevin Lloyd [EMAIL PROTECTED] This patch removes the Airprime 5220 device (branded as Audiovox) from the option.c driver. This device is already supported by the sierra.c driver. This was based off of the option.c driver found in kernel 2.6.20-git11. Signed-off-by: Kevin Lloyd [EMAIL PROTECTED] --- --- linux-2.6.20-git11-option-change/drivers/usb/serial/option.c.orig 2007-02-15 10:54:42.0 -0800 +++ linux-2.6.20-git11-option-change/drivers/usb/serial/option.c 2007-02-15 10:55:20.0 -0800 @@ -69,7 +69,6 @@ static int option_send_setup(struct usb /* Vendor and product IDs */ #define OPTION_VENDOR_ID0x0AF0 #define HUAWEI_VENDOR_ID0x12D1 -#define AUDIOVOX_VENDOR_ID 0x0F3D #define NOVATELWIRELESS_VENDOR_ID 0x1410 #define ANYDATA_VENDOR_ID 0x16d5 @@ -81,7 +80,6 @@ static int option_send_setup(struct usb #define OPTION_PRODUCT_GTMAX36 0x6701 #define HUAWEI_PRODUCT_E600 0x1001 #define HUAWEI_PRODUCT_E220 0x1003 -#define AUDIOVOX_PRODUCT_AIRCARD0x0112 #define NOVATELWIRELESS_PRODUCT_U7400x1400 #define ANYDATA_PRODUCT_ID 0x6501 @@ -94,7 +92,6 @@ static struct usb_device_id option_ids[] { USB_DEVICE(OPTION_VENDOR_ID, OPTION_PRODUCT_GTMAX36) }, { USB_DEVICE(HUAWEI_VENDOR_ID, HUAWEI_PRODUCT_E600) }, { USB_DEVICE(HUAWEI_VENDOR_ID, HUAWEI_PRODUCT_E220) }, - { USB_DEVICE(AUDIOVOX_VENDOR_ID, AUDIOVOX_PRODUCT_AIRCARD) }, { USB_DEVICE(NOVATELWIRELESS_VENDOR_ID,NOVATELWIRELESS_PRODUCT_U740) }, { USB_DEVICE(ANYDATA_VENDOR_ID, ANYDATA_PRODUCT_ID) }, { } /* Terminating entry */ @@ -109,7 +106,6 @@ static struct usb_device_id option_ids1[ { USB_DEVICE(OPTION_VENDOR_ID, OPTION_PRODUCT_GTMAX36) }, { USB_DEVICE(HUAWEI_VENDOR_ID, HUAWEI_PRODUCT_E600) }, { USB_DEVICE(HUAWEI_VENDOR_ID, HUAWEI_PRODUCT_E220) }, - { USB_DEVICE(AUDIOVOX_VENDOR_ID, AUDIOVOX_PRODUCT_AIRCARD) }, { USB_DEVICE(NOVATELWIRELESS_VENDOR_ID,NOVATELWIRELESS_PRODUCT_U740) }, { USB_DEVICE(ANYDATA_VENDOR_ID, ANYDATA_PRODUCT_ID) }, { } /* Terminating entry */ - To unsubscribe from this list: send the line unsubscribe linux-kernel in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
[PATCH 2.6.20-rc5 01/01] usb: Sierra Wireless auto set D0
from: Kevin Lloyd <[EMAIL PROTECTED]> This patch ensures that the device is turned on when inserted into the system. It also adds more VID/PIDs and matches the N_OUT_URB with the airprime driver. Signed-off-by: Kevin Lloyd <[EMAIL PROTECTED]> --- --- linux-2.6.20-rc5/drivers/usb/serial/sierra.c.orig 2007-01-15 15:17:15.0 -0800 +++ linux-2.6.20-rc5/drivers/usb/serial/sierra.c2007-01-17 15:41:59.0 -0800 @@ -13,10 +13,9 @@ Portions based on the option driver by Matthias Urlichs <[EMAIL PROTECTED]> Whom based his on the Keyspan driver by Hugh Blemings <[EMAIL PROTECTED]> - History: */ -#define DRIVER_VERSION "v.1.0.5" +#define DRIVER_VERSION "v.1.0.6" #define DRIVER_AUTHOR "Kevin Lloyd <[EMAIL PROTECTED]>" #define DRIVER_DESC "USB Driver for Sierra Wireless USB modems" @@ -31,14 +30,15 @@ static struct usb_device_id id_table [] = { + { USB_DEVICE(0x1199, 0x0017) }, /* Sierra Wireless EM5625 */ { USB_DEVICE(0x1199, 0x0018) }, /* Sierra Wireless MC5720 */ + { USB_DEVICE(0x1199, 0x0218) }, /* Sierra Wireless MC5720 */ { USB_DEVICE(0x1199, 0x0020) }, /* Sierra Wireless MC5725 */ - { USB_DEVICE(0x1199, 0x0017) }, /* Sierra Wireless EM5625 */ { USB_DEVICE(0x1199, 0x0019) }, /* Sierra Wireless AirCard 595 */ - { USB_DEVICE(0x1199, 0x0218) }, /* Sierra Wireless MC5720 */ + { USB_DEVICE(0x1199, 0x0021) }, /* Sierra Wireless AirCard 597E */ { USB_DEVICE(0x1199, 0x6802) }, /* Sierra Wireless MC8755 */ + { USB_DEVICE(0x1199, 0x6804) }, /* Sierra Wireless MC8755 */ { USB_DEVICE(0x1199, 0x6803) }, /* Sierra Wireless MC8765 */ - { USB_DEVICE(0x1199, 0x6804) }, /* Sierra Wireless MC8755 for Europe */ { USB_DEVICE(0x1199, 0x6812) }, /* Sierra Wireless MC8775 */ { USB_DEVICE(0x1199, 0x6820) }, /* Sierra Wireless AirCard 875 */ @@ -55,14 +55,15 @@ static struct usb_device_id id_table_1po }; static struct usb_device_id id_table_3port [] = { + { USB_DEVICE(0x1199, 0x0017) }, /* Sierra Wireless EM5625 */ { USB_DEVICE(0x1199, 0x0018) }, /* Sierra Wireless MC5720 */ + { USB_DEVICE(0x1199, 0x0218) }, /* Sierra Wireless MC5720 */ { USB_DEVICE(0x1199, 0x0020) }, /* Sierra Wireless MC5725 */ - { USB_DEVICE(0x1199, 0x0017) }, /* Sierra Wireless EM5625 */ { USB_DEVICE(0x1199, 0x0019) }, /* Sierra Wireless AirCard 595 */ - { USB_DEVICE(0x1199, 0x0218) }, /* Sierra Wireless MC5720 */ + { USB_DEVICE(0x1199, 0x0021) }, /* Sierra Wireless AirCard 597E */ { USB_DEVICE(0x1199, 0x6802) }, /* Sierra Wireless MC8755 */ + { USB_DEVICE(0x1199, 0x6804) }, /* Sierra Wireless MC8755 */ { USB_DEVICE(0x1199, 0x6803) }, /* Sierra Wireless MC8765 */ - { USB_DEVICE(0x1199, 0x6804) }, /* Sierra Wireless MC8755 for Europe */ { USB_DEVICE(0x1199, 0x6812) }, /* Sierra Wireless MC8775 */ { USB_DEVICE(0x1199, 0x6820) }, /* Sierra Wireless AirCard 875 */ { } @@ -81,7 +82,7 @@ static int debug; /* per port private data */ #define N_IN_URB4 -#define N_OUT_URB 1 +#define N_OUT_URB 4 #define IN_BUFLEN 4096 #define OUT_BUFLEN 128 @@ -396,6 +397,8 @@ static int sierra_open(struct usb_serial struct usb_serial *serial = port->serial; int i, err; struct urb *urb; + int result; + __u16 set_mode_dzero = 0x; portdata = usb_get_serial_port_data(port); @@ -442,6 +445,11 @@ static int sierra_open(struct usb_serial port->tty->low_latency = 1; + /*set mode to D0 */ + result = usb_control_msg(serial->dev, + usb_rcvctrlpipe(serial->dev, 0), + 0x00,0x40,set_mode_dzero,0,NULL,0,USB_CTRL_SET_TIMEOUT); + sierra_send_setup(port); return (0); - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
[PATCH 2.6.20-rc5 01/01] usb: Sierra Wireless auto set D0
from: Kevin Lloyd [EMAIL PROTECTED] This patch ensures that the device is turned on when inserted into the system. It also adds more VID/PIDs and matches the N_OUT_URB with the airprime driver. Signed-off-by: Kevin Lloyd [EMAIL PROTECTED] --- --- linux-2.6.20-rc5/drivers/usb/serial/sierra.c.orig 2007-01-15 15:17:15.0 -0800 +++ linux-2.6.20-rc5/drivers/usb/serial/sierra.c2007-01-17 15:41:59.0 -0800 @@ -13,10 +13,9 @@ Portions based on the option driver by Matthias Urlichs [EMAIL PROTECTED] Whom based his on the Keyspan driver by Hugh Blemings [EMAIL PROTECTED] - History: */ -#define DRIVER_VERSION v.1.0.5 +#define DRIVER_VERSION v.1.0.6 #define DRIVER_AUTHOR Kevin Lloyd [EMAIL PROTECTED] #define DRIVER_DESC USB Driver for Sierra Wireless USB modems @@ -31,14 +30,15 @@ static struct usb_device_id id_table [] = { + { USB_DEVICE(0x1199, 0x0017) }, /* Sierra Wireless EM5625 */ { USB_DEVICE(0x1199, 0x0018) }, /* Sierra Wireless MC5720 */ + { USB_DEVICE(0x1199, 0x0218) }, /* Sierra Wireless MC5720 */ { USB_DEVICE(0x1199, 0x0020) }, /* Sierra Wireless MC5725 */ - { USB_DEVICE(0x1199, 0x0017) }, /* Sierra Wireless EM5625 */ { USB_DEVICE(0x1199, 0x0019) }, /* Sierra Wireless AirCard 595 */ - { USB_DEVICE(0x1199, 0x0218) }, /* Sierra Wireless MC5720 */ + { USB_DEVICE(0x1199, 0x0021) }, /* Sierra Wireless AirCard 597E */ { USB_DEVICE(0x1199, 0x6802) }, /* Sierra Wireless MC8755 */ + { USB_DEVICE(0x1199, 0x6804) }, /* Sierra Wireless MC8755 */ { USB_DEVICE(0x1199, 0x6803) }, /* Sierra Wireless MC8765 */ - { USB_DEVICE(0x1199, 0x6804) }, /* Sierra Wireless MC8755 for Europe */ { USB_DEVICE(0x1199, 0x6812) }, /* Sierra Wireless MC8775 */ { USB_DEVICE(0x1199, 0x6820) }, /* Sierra Wireless AirCard 875 */ @@ -55,14 +55,15 @@ static struct usb_device_id id_table_1po }; static struct usb_device_id id_table_3port [] = { + { USB_DEVICE(0x1199, 0x0017) }, /* Sierra Wireless EM5625 */ { USB_DEVICE(0x1199, 0x0018) }, /* Sierra Wireless MC5720 */ + { USB_DEVICE(0x1199, 0x0218) }, /* Sierra Wireless MC5720 */ { USB_DEVICE(0x1199, 0x0020) }, /* Sierra Wireless MC5725 */ - { USB_DEVICE(0x1199, 0x0017) }, /* Sierra Wireless EM5625 */ { USB_DEVICE(0x1199, 0x0019) }, /* Sierra Wireless AirCard 595 */ - { USB_DEVICE(0x1199, 0x0218) }, /* Sierra Wireless MC5720 */ + { USB_DEVICE(0x1199, 0x0021) }, /* Sierra Wireless AirCard 597E */ { USB_DEVICE(0x1199, 0x6802) }, /* Sierra Wireless MC8755 */ + { USB_DEVICE(0x1199, 0x6804) }, /* Sierra Wireless MC8755 */ { USB_DEVICE(0x1199, 0x6803) }, /* Sierra Wireless MC8765 */ - { USB_DEVICE(0x1199, 0x6804) }, /* Sierra Wireless MC8755 for Europe */ { USB_DEVICE(0x1199, 0x6812) }, /* Sierra Wireless MC8775 */ { USB_DEVICE(0x1199, 0x6820) }, /* Sierra Wireless AirCard 875 */ { } @@ -81,7 +82,7 @@ static int debug; /* per port private data */ #define N_IN_URB4 -#define N_OUT_URB 1 +#define N_OUT_URB 4 #define IN_BUFLEN 4096 #define OUT_BUFLEN 128 @@ -396,6 +397,8 @@ static int sierra_open(struct usb_serial struct usb_serial *serial = port-serial; int i, err; struct urb *urb; + int result; + __u16 set_mode_dzero = 0x; portdata = usb_get_serial_port_data(port); @@ -442,6 +445,11 @@ static int sierra_open(struct usb_serial port-tty-low_latency = 1; + /*set mode to D0 */ + result = usb_control_msg(serial-dev, + usb_rcvctrlpipe(serial-dev, 0), + 0x00,0x40,set_mode_dzero,0,NULL,0,USB_CTRL_SET_TIMEOUT); + sierra_send_setup(port); return (0); - To unsubscribe from this list: send the line unsubscribe linux-kernel in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
[PATCH 2.6.20-rc3 01/01] usb: Sierra Wireless auto set D0
from: Kevin Lloyd <[EMAIL PROTECTED]> This patch ensures that the device is turned on when inserted into the system (which mostly affects the EM5725 and MC5720. It also adds more VID/PIDs and matches the N_OUT_URB with the airprime driver. Signed-off-by: Kevin Lloyd <[EMAIL PROTECTED]> --- --- linux-2.6.20-rc5/drivers/usb/serial/sierra.c.orig 2007-01-15 15:17:15.0 -0800 +++ linux-2.6.20-rc5/drivers/usb/serial/sierra.c2007-01-15 15:41:56.0 -0800 @@ -14,9 +14,31 @@ Whom based his on the Keyspan driver by Hugh Blemings <[EMAIL PROTECTED]> History: +v.1.0.6: + klloyd + Added more devices and added Vendor Specific USB message to make sure + that devices are in D0 state when they start. This is very important for + MC5720 and EM5625 modules that go between Windows and Non-Windows + machines. +v.1.0.5: + Greg KH + This saves over 30 lines and fixes a warning from sparse and allows + debugging to work dynamically like all other usb-serial drivers. + klloyd + Changed versioning to v.x.y.z +v.1.04: + klloyd + Adds significant throughput increase to the Sierra driver (uses multiple + urgs for download link). This patch also updates the current sierra.c + driver so that it supports both 3-port Sierra devices and 1-port legacy + devices and removes Sierra's references in other related files (Kconfig + and airprime.c). +v.1.03 + klloyd + Adds DTR line control support and impliments urb control. */ -#define DRIVER_VERSION "v.1.0.5" +#define DRIVER_VERSION "v.1.0.6" #define DRIVER_AUTHOR "Kevin Lloyd <[EMAIL PROTECTED]>" #define DRIVER_DESC "USB Driver for Sierra Wireless USB modems" @@ -31,14 +53,14 @@ static struct usb_device_id id_table [] = { + { USB_DEVICE(0x1199, 0x0017) }, /* Sierra Wireless EM5625 */ { USB_DEVICE(0x1199, 0x0018) }, /* Sierra Wireless MC5720 */ { USB_DEVICE(0x1199, 0x0020) }, /* Sierra Wireless MC5725 */ - { USB_DEVICE(0x1199, 0x0017) }, /* Sierra Wireless EM5625 */ { USB_DEVICE(0x1199, 0x0019) }, /* Sierra Wireless AirCard 595 */ - { USB_DEVICE(0x1199, 0x0218) }, /* Sierra Wireless MC5720 */ + { USB_DEVICE(0x1199, 0x0021) }, /* Sierra Wireless AirCard 597E */ { USB_DEVICE(0x1199, 0x6802) }, /* Sierra Wireless MC8755 */ + { USB_DEVICE(0x1199, 0x6804) }, /* Sierra Wireless MC8755 */ { USB_DEVICE(0x1199, 0x6803) }, /* Sierra Wireless MC8765 */ - { USB_DEVICE(0x1199, 0x6804) }, /* Sierra Wireless MC8755 for Europe */ { USB_DEVICE(0x1199, 0x6812) }, /* Sierra Wireless MC8775 */ { USB_DEVICE(0x1199, 0x6820) }, /* Sierra Wireless AirCard 875 */ @@ -55,14 +77,14 @@ static struct usb_device_id id_table_1po }; static struct usb_device_id id_table_3port [] = { + { USB_DEVICE(0x1199, 0x0017) }, /* Sierra Wireless EM5625 */ { USB_DEVICE(0x1199, 0x0018) }, /* Sierra Wireless MC5720 */ { USB_DEVICE(0x1199, 0x0020) }, /* Sierra Wireless MC5725 */ - { USB_DEVICE(0x1199, 0x0017) }, /* Sierra Wireless EM5625 */ { USB_DEVICE(0x1199, 0x0019) }, /* Sierra Wireless AirCard 595 */ - { USB_DEVICE(0x1199, 0x0218) }, /* Sierra Wireless MC5720 */ + { USB_DEVICE(0x1199, 0x0021) }, /* Sierra Wireless AirCard 597E */ { USB_DEVICE(0x1199, 0x6802) }, /* Sierra Wireless MC8755 */ + { USB_DEVICE(0x1199, 0x6804) }, /* Sierra Wireless MC8755 */ { USB_DEVICE(0x1199, 0x6803) }, /* Sierra Wireless MC8765 */ - { USB_DEVICE(0x1199, 0x6804) }, /* Sierra Wireless MC8755 for Europe */ { USB_DEVICE(0x1199, 0x6812) }, /* Sierra Wireless MC8775 */ { USB_DEVICE(0x1199, 0x6820) }, /* Sierra Wireless AirCard 875 */ { } @@ -81,7 +103,7 @@ static int debug; /* per port private data */ #define N_IN_URB4 -#define N_OUT_URB 1 +#define N_OUT_URB 4 #define IN_BUFLEN 4096 #define OUT_BUFLEN 128 @@ -123,6 +145,7 @@ static int sierra_send_setup(struct usb_ return usb_control_msg(serial->dev, usb_rcvctrlpipe(serial->dev, 0), 0x22,0x21,val,0,NULL,0,USB_CTRL_SET_TIMEOUT); + } return 0; @@ -396,6 +419,8 @@ static int sierra_open(struct usb_serial struct usb_serial *serial = port->serial; int i, err; struct urb *urb; + int result; + __u16 set_mode_dzero = 0x; //Set mode to D0 portdata = usb_get_serial_port_data(port); @@ -442,6 +467,11 @@ static int sierra_open(struct usb_serial port->tty->low_latency = 1; + //set mode to D0 + result = usb_control_msg(serial->dev, + usb_rcvctrlpipe(serial->dev, 0), + 0x00,0x40,set_mode_dzero,0,NULL,0,USB_CTRL_SET_TIMEOUT); + sierra_send_setup(port); return (0); - To unsubscribe from this list: send the line "unsubscribe linux-kernel&quo
[PATCH 2.6.20-rc3 01/01] usb: Sierra Wireless auto set D0
from: Kevin Lloyd [EMAIL PROTECTED] This patch ensures that the device is turned on when inserted into the system (which mostly affects the EM5725 and MC5720. It also adds more VID/PIDs and matches the N_OUT_URB with the airprime driver. Signed-off-by: Kevin Lloyd [EMAIL PROTECTED] --- --- linux-2.6.20-rc5/drivers/usb/serial/sierra.c.orig 2007-01-15 15:17:15.0 -0800 +++ linux-2.6.20-rc5/drivers/usb/serial/sierra.c2007-01-15 15:41:56.0 -0800 @@ -14,9 +14,31 @@ Whom based his on the Keyspan driver by Hugh Blemings [EMAIL PROTECTED] History: +v.1.0.6: + klloyd + Added more devices and added Vendor Specific USB message to make sure + that devices are in D0 state when they start. This is very important for + MC5720 and EM5625 modules that go between Windows and Non-Windows + machines. +v.1.0.5: + Greg KH + This saves over 30 lines and fixes a warning from sparse and allows + debugging to work dynamically like all other usb-serial drivers. + klloyd + Changed versioning to v.x.y.z +v.1.04: + klloyd + Adds significant throughput increase to the Sierra driver (uses multiple + urgs for download link). This patch also updates the current sierra.c + driver so that it supports both 3-port Sierra devices and 1-port legacy + devices and removes Sierra's references in other related files (Kconfig + and airprime.c). +v.1.03 + klloyd + Adds DTR line control support and impliments urb control. */ -#define DRIVER_VERSION v.1.0.5 +#define DRIVER_VERSION v.1.0.6 #define DRIVER_AUTHOR Kevin Lloyd [EMAIL PROTECTED] #define DRIVER_DESC USB Driver for Sierra Wireless USB modems @@ -31,14 +53,14 @@ static struct usb_device_id id_table [] = { + { USB_DEVICE(0x1199, 0x0017) }, /* Sierra Wireless EM5625 */ { USB_DEVICE(0x1199, 0x0018) }, /* Sierra Wireless MC5720 */ { USB_DEVICE(0x1199, 0x0020) }, /* Sierra Wireless MC5725 */ - { USB_DEVICE(0x1199, 0x0017) }, /* Sierra Wireless EM5625 */ { USB_DEVICE(0x1199, 0x0019) }, /* Sierra Wireless AirCard 595 */ - { USB_DEVICE(0x1199, 0x0218) }, /* Sierra Wireless MC5720 */ + { USB_DEVICE(0x1199, 0x0021) }, /* Sierra Wireless AirCard 597E */ { USB_DEVICE(0x1199, 0x6802) }, /* Sierra Wireless MC8755 */ + { USB_DEVICE(0x1199, 0x6804) }, /* Sierra Wireless MC8755 */ { USB_DEVICE(0x1199, 0x6803) }, /* Sierra Wireless MC8765 */ - { USB_DEVICE(0x1199, 0x6804) }, /* Sierra Wireless MC8755 for Europe */ { USB_DEVICE(0x1199, 0x6812) }, /* Sierra Wireless MC8775 */ { USB_DEVICE(0x1199, 0x6820) }, /* Sierra Wireless AirCard 875 */ @@ -55,14 +77,14 @@ static struct usb_device_id id_table_1po }; static struct usb_device_id id_table_3port [] = { + { USB_DEVICE(0x1199, 0x0017) }, /* Sierra Wireless EM5625 */ { USB_DEVICE(0x1199, 0x0018) }, /* Sierra Wireless MC5720 */ { USB_DEVICE(0x1199, 0x0020) }, /* Sierra Wireless MC5725 */ - { USB_DEVICE(0x1199, 0x0017) }, /* Sierra Wireless EM5625 */ { USB_DEVICE(0x1199, 0x0019) }, /* Sierra Wireless AirCard 595 */ - { USB_DEVICE(0x1199, 0x0218) }, /* Sierra Wireless MC5720 */ + { USB_DEVICE(0x1199, 0x0021) }, /* Sierra Wireless AirCard 597E */ { USB_DEVICE(0x1199, 0x6802) }, /* Sierra Wireless MC8755 */ + { USB_DEVICE(0x1199, 0x6804) }, /* Sierra Wireless MC8755 */ { USB_DEVICE(0x1199, 0x6803) }, /* Sierra Wireless MC8765 */ - { USB_DEVICE(0x1199, 0x6804) }, /* Sierra Wireless MC8755 for Europe */ { USB_DEVICE(0x1199, 0x6812) }, /* Sierra Wireless MC8775 */ { USB_DEVICE(0x1199, 0x6820) }, /* Sierra Wireless AirCard 875 */ { } @@ -81,7 +103,7 @@ static int debug; /* per port private data */ #define N_IN_URB4 -#define N_OUT_URB 1 +#define N_OUT_URB 4 #define IN_BUFLEN 4096 #define OUT_BUFLEN 128 @@ -123,6 +145,7 @@ static int sierra_send_setup(struct usb_ return usb_control_msg(serial-dev, usb_rcvctrlpipe(serial-dev, 0), 0x22,0x21,val,0,NULL,0,USB_CTRL_SET_TIMEOUT); + } return 0; @@ -396,6 +419,8 @@ static int sierra_open(struct usb_serial struct usb_serial *serial = port-serial; int i, err; struct urb *urb; + int result; + __u16 set_mode_dzero = 0x; //Set mode to D0 portdata = usb_get_serial_port_data(port); @@ -442,6 +467,11 @@ static int sierra_open(struct usb_serial port-tty-low_latency = 1; + //set mode to D0 + result = usb_control_msg(serial-dev, + usb_rcvctrlpipe(serial-dev, 0), + 0x00,0x40,set_mode_dzero,0,NULL,0,USB_CTRL_SET_TIMEOUT); + sierra_send_setup(port); return (0); - To unsubscribe from this list: send the line unsubscribe linux-kernel in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html Please