Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 108433
b: refs/heads/master
c: 0585e4d
h: refs/heads/master
i:
  108431: b96af3a
v: v3
  • Loading branch information
Kevin Lloyd authored and Greg Kroah-Hartman committed Aug 14, 2008
1 parent 5c2161f commit 9d26635
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 36 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: e3173b22eb7b50a23af60e12bab7a29d4b24f284
refs/heads/master: 0585e4dfe5670d3ccb77bf86551a657699e9e52e
7 changes: 4 additions & 3 deletions trunk/drivers/usb/serial/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -499,9 +499,10 @@ config USB_SERIAL_SAFE_PADDED
config USB_SERIAL_SIERRAWIRELESS
tristate "USB Sierra Wireless Driver"
help
Say M here if you want to use a Sierra Wireless device (if
using an PC 5220 or AC580 please use the Airprime driver
instead).
Say M here if you want to use Sierra Wireless devices.

Many deviecs have a feature known as TRU-Install, for those devices
to work properly the USB Storage Sierra feature must be enabled.

To compile this driver as a module, choose M here: the
module will be called sierra.
Expand Down
35 changes: 3 additions & 32 deletions trunk/drivers/usb/serial/sierra.c
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
Whom based his on the Keyspan driver by Hugh Blemings <hugh@blemings.org>
*/

#define DRIVER_VERSION "v.1.2.9c"
#define DRIVER_VERSION "v.1.2.13a"
#define DRIVER_AUTHOR "Kevin Lloyd <klloyd@sierrawireless.com>"
#define DRIVER_DESC "USB Driver for Sierra Wireless USB modems"

Expand All @@ -31,6 +31,7 @@
#define SWIMS_USB_REQUEST_SetPower 0x00
#define SWIMS_USB_REQUEST_SetNmea 0x07
#define SWIMS_USB_REQUEST_SetMode 0x0B
#define SWIMS_USB_REQUEST_GetSwocInfo 0x0A
#define SWIMS_SET_MODE_Modem 0x0001

/* per port private data */
Expand All @@ -40,13 +41,6 @@

static int debug;
static int nmea;
static int truinstall = 1;

enum devicetype {
DEVICE_3_PORT = 0,
DEVICE_1_PORT = 1,
DEVICE_INSTALLER = 2,
};

static int sierra_set_power_state(struct usb_device *udev, __u16 swiState)
{
Expand All @@ -63,21 +57,6 @@ static int sierra_set_power_state(struct usb_device *udev, __u16 swiState)
return result;
}

static int sierra_set_ms_mode(struct usb_device *udev, __u16 eSWocMode)
{
int result;
dev_dbg(&udev->dev, "%s", __func__);
result = usb_control_msg(udev, usb_sndctrlpipe(udev, 0),
SWIMS_USB_REQUEST_SetMode, /* __u8 request */
USB_TYPE_VENDOR, /* __u8 request type */
eSWocMode, /* __u16 value */
0x0000, /* __u16 index */
NULL, /* void *data */
0, /* __u16 size */
USB_CTRL_SET_TIMEOUT); /* int timeout */
return result;
}

static int sierra_vsc_set_nmea(struct usb_device *udev, __u16 enable)
{
int result;
Expand Down Expand Up @@ -163,15 +142,8 @@ static int sierra_probe(struct usb_serial *serial,
usb_set_interface(udev, ifnum, 1);
}

/* Check if in installer mode */
if (truinstall && id->driver_info == DEVICE_INSTALLER) {
dev_dbg(&udev->dev, "%s", "FOUND TRU-INSTALL DEVICE(SW)\n");
result = sierra_set_ms_mode(udev, SWIMS_SET_MODE_Modem);
/* Don't bind to the device when in installer mode */
kfree(num_ports);
return -EIO;
/* Dummy interface present on some SKUs should be ignored */
} else if (ifnum == 0x99)
if (ifnum == 0x99)
*num_ports = 0;
else if (numendpoints <= 3)
*num_ports = 1;
Expand Down Expand Up @@ -237,7 +209,6 @@ static struct usb_device_id id_table [] = {
{ USB_DEVICE(0x1199, 0x0112) }, /* Sierra Wireless AirCard 580 */
{ USB_DEVICE(0x0F3D, 0x0112) }, /* Airprime/Sierra PC 5220 */

{ USB_DEVICE(0x1199, 0x0FFF), .driver_info = DEVICE_INSTALLER},
{ }
};
MODULE_DEVICE_TABLE(usb, id_table);
Expand Down

0 comments on commit 9d26635

Please sign in to comment.