diff options
| author | Kevin Lloyd <linux@sierrawireless.com> | 2007-01-17 19:04:18 -0500 |
|---|---|---|
| committer | Greg Kroah-Hartman <gregkh@suse.de> | 2007-02-07 18:44:39 -0500 |
| commit | e43062dd208594caa94536b8ba4b762d4a16330d (patch) | |
| tree | 493faa1c728b1ad670756baa1a6c5aa56cb92ec3 | |
| parent | ef3ff462a31987629c4d0488550fbbb66fbfcc35 (diff) | |
USB: Sierra Wireless auto set D0
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 <linux@sierrawireless.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
| -rw-r--r-- | drivers/usb/serial/sierra.c | 27 |
1 files changed, 18 insertions, 9 deletions
diff --git a/drivers/usb/serial/sierra.c b/drivers/usb/serial/sierra.c index 8aca8a707a3f..ecedd833818d 100644 --- a/drivers/usb/serial/sierra.c +++ b/drivers/usb/serial/sierra.c | |||
| @@ -13,10 +13,9 @@ | |||
| 13 | Portions based on the option driver by Matthias Urlichs <smurf@smurf.noris.de> | 13 | Portions based on the option driver by Matthias Urlichs <smurf@smurf.noris.de> |
| 14 | Whom based his on the Keyspan driver by Hugh Blemings <hugh@blemings.org> | 14 | Whom based his on the Keyspan driver by Hugh Blemings <hugh@blemings.org> |
| 15 | 15 | ||
| 16 | History: | ||
| 17 | */ | 16 | */ |
| 18 | 17 | ||
| 19 | #define DRIVER_VERSION "v.1.0.5" | 18 | #define DRIVER_VERSION "v.1.0.6" |
| 20 | #define DRIVER_AUTHOR "Kevin Lloyd <linux@sierrawireless.com>" | 19 | #define DRIVER_AUTHOR "Kevin Lloyd <linux@sierrawireless.com>" |
| 21 | #define DRIVER_DESC "USB Driver for Sierra Wireless USB modems" | 20 | #define DRIVER_DESC "USB Driver for Sierra Wireless USB modems" |
| 22 | 21 | ||
| @@ -31,14 +30,15 @@ | |||
| 31 | 30 | ||
| 32 | 31 | ||
| 33 | static struct usb_device_id id_table [] = { | 32 | static struct usb_device_id id_table [] = { |
| 33 | { USB_DEVICE(0x1199, 0x0017) }, /* Sierra Wireless EM5625 */ | ||
| 34 | { USB_DEVICE(0x1199, 0x0018) }, /* Sierra Wireless MC5720 */ | 34 | { USB_DEVICE(0x1199, 0x0018) }, /* Sierra Wireless MC5720 */ |
| 35 | { USB_DEVICE(0x1199, 0x0218) }, /* Sierra Wireless MC5720 */ | ||
| 35 | { USB_DEVICE(0x1199, 0x0020) }, /* Sierra Wireless MC5725 */ | 36 | { USB_DEVICE(0x1199, 0x0020) }, /* Sierra Wireless MC5725 */ |
| 36 | { USB_DEVICE(0x1199, 0x0017) }, /* Sierra Wireless EM5625 */ | ||
| 37 | { USB_DEVICE(0x1199, 0x0019) }, /* Sierra Wireless AirCard 595 */ | 37 | { USB_DEVICE(0x1199, 0x0019) }, /* Sierra Wireless AirCard 595 */ |
| 38 | { USB_DEVICE(0x1199, 0x0218) }, /* Sierra Wireless MC5720 */ | 38 | { USB_DEVICE(0x1199, 0x0021) }, /* Sierra Wireless AirCard 597E */ |
| 39 | { USB_DEVICE(0x1199, 0x6802) }, /* Sierra Wireless MC8755 */ | 39 | { USB_DEVICE(0x1199, 0x6802) }, /* Sierra Wireless MC8755 */ |
| 40 | { USB_DEVICE(0x1199, 0x6804) }, /* Sierra Wireless MC8755 */ | ||
| 40 | { USB_DEVICE(0x1199, 0x6803) }, /* Sierra Wireless MC8765 */ | 41 | { USB_DEVICE(0x1199, 0x6803) }, /* Sierra Wireless MC8765 */ |
| 41 | { USB_DEVICE(0x1199, 0x6804) }, /* Sierra Wireless MC8755 for Europe */ | ||
| 42 | { USB_DEVICE(0x1199, 0x6812) }, /* Sierra Wireless MC8775 */ | 42 | { USB_DEVICE(0x1199, 0x6812) }, /* Sierra Wireless MC8775 */ |
| 43 | { USB_DEVICE(0x1199, 0x6820) }, /* Sierra Wireless AirCard 875 */ | 43 | { USB_DEVICE(0x1199, 0x6820) }, /* Sierra Wireless AirCard 875 */ |
| 44 | 44 | ||
| @@ -55,14 +55,15 @@ static struct usb_device_id id_table_1port [] = { | |||
| 55 | }; | 55 | }; |
| 56 | 56 | ||
| 57 | static struct usb_device_id id_table_3port [] = { | 57 | static struct usb_device_id id_table_3port [] = { |
| 58 | { USB_DEVICE(0x1199, 0x0017) }, /* Sierra Wireless EM5625 */ | ||
| 58 | { USB_DEVICE(0x1199, 0x0018) }, /* Sierra Wireless MC5720 */ | 59 | { USB_DEVICE(0x1199, 0x0018) }, /* Sierra Wireless MC5720 */ |
| 60 | { USB_DEVICE(0x1199, 0x0218) }, /* Sierra Wireless MC5720 */ | ||
| 59 | { USB_DEVICE(0x1199, 0x0020) }, /* Sierra Wireless MC5725 */ | 61 | { USB_DEVICE(0x1199, 0x0020) }, /* Sierra Wireless MC5725 */ |
| 60 | { USB_DEVICE(0x1199, 0x0017) }, /* Sierra Wireless EM5625 */ | ||
| 61 | { USB_DEVICE(0x1199, 0x0019) }, /* Sierra Wireless AirCard 595 */ | 62 | { USB_DEVICE(0x1199, 0x0019) }, /* Sierra Wireless AirCard 595 */ |
| 62 | { USB_DEVICE(0x1199, 0x0218) }, /* Sierra Wireless MC5720 */ | 63 | { USB_DEVICE(0x1199, 0x0021) }, /* Sierra Wireless AirCard 597E */ |
| 63 | { USB_DEVICE(0x1199, 0x6802) }, /* Sierra Wireless MC8755 */ | 64 | { USB_DEVICE(0x1199, 0x6802) }, /* Sierra Wireless MC8755 */ |
| 65 | { USB_DEVICE(0x1199, 0x6804) }, /* Sierra Wireless MC8755 */ | ||
| 64 | { USB_DEVICE(0x1199, 0x6803) }, /* Sierra Wireless MC8765 */ | 66 | { USB_DEVICE(0x1199, 0x6803) }, /* Sierra Wireless MC8765 */ |
| 65 | { USB_DEVICE(0x1199, 0x6804) }, /* Sierra Wireless MC8755 for Europe */ | ||
| 66 | { USB_DEVICE(0x1199, 0x6812) }, /* Sierra Wireless MC8775 */ | 67 | { USB_DEVICE(0x1199, 0x6812) }, /* Sierra Wireless MC8775 */ |
| 67 | { USB_DEVICE(0x1199, 0x6820) }, /* Sierra Wireless AirCard 875 */ | 68 | { USB_DEVICE(0x1199, 0x6820) }, /* Sierra Wireless AirCard 875 */ |
| 68 | { } | 69 | { } |
| @@ -81,7 +82,7 @@ static int debug; | |||
| 81 | 82 | ||
| 82 | /* per port private data */ | 83 | /* per port private data */ |
| 83 | #define N_IN_URB 4 | 84 | #define N_IN_URB 4 |
| 84 | #define N_OUT_URB 1 | 85 | #define N_OUT_URB 4 |
| 85 | #define IN_BUFLEN 4096 | 86 | #define IN_BUFLEN 4096 |
| 86 | #define OUT_BUFLEN 128 | 87 | #define OUT_BUFLEN 128 |
| 87 | 88 | ||
| @@ -396,6 +397,8 @@ static int sierra_open(struct usb_serial_port *port, struct file *filp) | |||
| 396 | struct usb_serial *serial = port->serial; | 397 | struct usb_serial *serial = port->serial; |
| 397 | int i, err; | 398 | int i, err; |
| 398 | struct urb *urb; | 399 | struct urb *urb; |
| 400 | int result; | ||
| 401 | __u16 set_mode_dzero = 0x0000; | ||
| 399 | 402 | ||
| 400 | portdata = usb_get_serial_port_data(port); | 403 | portdata = usb_get_serial_port_data(port); |
| 401 | 404 | ||
| @@ -442,6 +445,12 @@ static int sierra_open(struct usb_serial_port *port, struct file *filp) | |||
| 442 | 445 | ||
| 443 | port->tty->low_latency = 1; | 446 | port->tty->low_latency = 1; |
| 444 | 447 | ||
| 448 | /* set mode to D0 */ | ||
| 449 | result = usb_control_msg(serial->dev, | ||
| 450 | usb_rcvctrlpipe(serial->dev, 0), | ||
| 451 | 0x00, 0x40, set_mode_dzero, 0, NULL, | ||
| 452 | 0, USB_CTRL_SET_TIMEOUT); | ||
| 453 | |||
| 445 | sierra_send_setup(port); | 454 | sierra_send_setup(port); |
| 446 | 455 | ||
| 447 | return (0); | 456 | return (0); |
