mirror of
https://github.com/torvalds/linux.git
synced 2024-11-16 09:02:00 +00:00
USB Serial Sierra: TRU-Install feature update
Moves responsbility of TRU-Install (i.e. ZeroCD) to the usb-storage driver. See patch 04/04 of this set. Signed-off-by: Kevin Lloyd <klloyd@sierrawireless.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
This commit is contained in:
parent
e3173b22eb
commit
0585e4dfe5
@ -499,9 +499,10 @@ config USB_SERIAL_SAFE_PADDED
|
|||||||
config USB_SERIAL_SIERRAWIRELESS
|
config USB_SERIAL_SIERRAWIRELESS
|
||||||
tristate "USB Sierra Wireless Driver"
|
tristate "USB Sierra Wireless Driver"
|
||||||
help
|
help
|
||||||
Say M here if you want to use a Sierra Wireless device (if
|
Say M here if you want to use Sierra Wireless devices.
|
||||||
using an PC 5220 or AC580 please use the Airprime driver
|
|
||||||
instead).
|
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
|
To compile this driver as a module, choose M here: the
|
||||||
module will be called sierra.
|
module will be called sierra.
|
||||||
|
@ -14,7 +14,7 @@
|
|||||||
Whom based his on the Keyspan driver by Hugh Blemings <hugh@blemings.org>
|
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_AUTHOR "Kevin Lloyd <klloyd@sierrawireless.com>"
|
||||||
#define DRIVER_DESC "USB Driver for Sierra Wireless USB modems"
|
#define DRIVER_DESC "USB Driver for Sierra Wireless USB modems"
|
||||||
|
|
||||||
@ -31,6 +31,7 @@
|
|||||||
#define SWIMS_USB_REQUEST_SetPower 0x00
|
#define SWIMS_USB_REQUEST_SetPower 0x00
|
||||||
#define SWIMS_USB_REQUEST_SetNmea 0x07
|
#define SWIMS_USB_REQUEST_SetNmea 0x07
|
||||||
#define SWIMS_USB_REQUEST_SetMode 0x0B
|
#define SWIMS_USB_REQUEST_SetMode 0x0B
|
||||||
|
#define SWIMS_USB_REQUEST_GetSwocInfo 0x0A
|
||||||
#define SWIMS_SET_MODE_Modem 0x0001
|
#define SWIMS_SET_MODE_Modem 0x0001
|
||||||
|
|
||||||
/* per port private data */
|
/* per port private data */
|
||||||
@ -40,13 +41,6 @@
|
|||||||
|
|
||||||
static int debug;
|
static int debug;
|
||||||
static int nmea;
|
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)
|
static int sierra_set_power_state(struct usb_device *udev, __u16 swiState)
|
||||||
{
|
{
|
||||||
@ -63,21 +57,6 @@ static int sierra_set_power_state(struct usb_device *udev, __u16 swiState)
|
|||||||
return result;
|
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)
|
static int sierra_vsc_set_nmea(struct usb_device *udev, __u16 enable)
|
||||||
{
|
{
|
||||||
int result;
|
int result;
|
||||||
@ -163,15 +142,8 @@ static int sierra_probe(struct usb_serial *serial,
|
|||||||
usb_set_interface(udev, ifnum, 1);
|
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 */
|
/* Dummy interface present on some SKUs should be ignored */
|
||||||
} else if (ifnum == 0x99)
|
if (ifnum == 0x99)
|
||||||
*num_ports = 0;
|
*num_ports = 0;
|
||||||
else if (numendpoints <= 3)
|
else if (numendpoints <= 3)
|
||||||
*num_ports = 1;
|
*num_ports = 1;
|
||||||
@ -237,7 +209,6 @@ static struct usb_device_id id_table [] = {
|
|||||||
{ USB_DEVICE(0x1199, 0x0112) }, /* Sierra Wireless AirCard 580 */
|
{ USB_DEVICE(0x1199, 0x0112) }, /* Sierra Wireless AirCard 580 */
|
||||||
{ USB_DEVICE(0x0F3D, 0x0112) }, /* Airprime/Sierra PC 5220 */
|
{ USB_DEVICE(0x0F3D, 0x0112) }, /* Airprime/Sierra PC 5220 */
|
||||||
|
|
||||||
{ USB_DEVICE(0x1199, 0x0FFF), .driver_info = DEVICE_INSTALLER},
|
|
||||||
{ }
|
{ }
|
||||||
};
|
};
|
||||||
MODULE_DEVICE_TABLE(usb, id_table);
|
MODULE_DEVICE_TABLE(usb, id_table);
|
||||||
|
Loading…
Reference in New Issue
Block a user