diff options
author | Kevin Lloyd <klloyd@sierrawireless.com> | 2008-04-02 11:24:56 -0700 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@suse.de> | 2008-04-24 21:16:44 -0700 |
commit | 7106967ecc0a33a7d7e2e04798eb9f45377f448b (patch) | |
tree | 3e875fdc0c1c2c3c2f7f2713df895b32f3e4746d /drivers/usb | |
parent | 69a90f8189960f37cc73f5da6c331b23227e2197 (diff) | |
download | blackbird-op-linux-7106967ecc0a33a7d7e2e04798eb9f45377f448b.tar.gz blackbird-op-linux-7106967ecc0a33a7d7e2e04798eb9f45377f448b.zip |
usb/usb-serial-sierra-add-new-dev-group
This patch is for the sierra driver and adds support for a new group of
devices that have a new USB configuration.
This targets kernel 2.6.25-rc7
Signed-off-by: Kevin Lloyd <klloyd@sierrawireless.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'drivers/usb')
-rw-r--r-- | drivers/usb/serial/sierra.c | 40 |
1 files changed, 40 insertions, 0 deletions
diff --git a/drivers/usb/serial/sierra.c b/drivers/usb/serial/sierra.c index af667a1828b0..f791eb8887fc 100644 --- a/drivers/usb/serial/sierra.c +++ b/drivers/usb/serial/sierra.c @@ -108,6 +108,26 @@ static int sierra_calc_num_ports(struct usb_serial *serial) return result; } +static int sierra_calc_interface(struct usb_serial *serial) +{ + int interface; + struct usb_interface *p_interface; + struct usb_host_interface *p_host_interface; + + /* Get the interface structure pointer from the serial struct */ + p_interface = serial->interface; + + /* Get a pointer to the host interface structure */ + p_host_interface = p_interface->cur_altsetting; + + /* read the interface descriptor for this active altsetting + * to find out the interface number we are on + */ + interface = p_host_interface->desc.bInterfaceNumber; + + return interface; +} + static int sierra_probe(struct usb_serial *serial, const struct usb_device_id *id) { @@ -123,6 +143,22 @@ static int sierra_probe(struct usb_serial *serial, ifnum = serial->interface->cur_altsetting->desc.bInterfaceNumber; udev = serial->dev; + /* Figure out the interface number from the serial structure */ + ifnum = sierra_calc_interface(serial); + + /* + * If this interface supports more than 1 alternate + * select the 2nd one + */ + if (serial->interface->num_altsetting == 2) { + dev_dbg(&udev->dev, + "Selecting alt setting for interface %d\n", + ifnum); + + /* We know the alternate setting is 1 for the MC8785 */ + 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"); @@ -165,14 +201,18 @@ static struct usb_device_id id_table [] = { { USB_DEVICE(0x1199, 0x6815) }, /* Sierra Wireless MC8775 */ { USB_DEVICE(0x03f0, 0x1e1d) }, /* HP hs2300 a.k.a MC8775 */ { USB_DEVICE(0x1199, 0x6820) }, /* Sierra Wireless AirCard 875 */ + { USB_DEVICE(0x1199, 0x6821) }, /* Sierra Wireless AirCard 875U */ { USB_DEVICE(0x1199, 0x6832) }, /* Sierra Wireless MC8780*/ { USB_DEVICE(0x1199, 0x6833) }, /* Sierra Wireless MC8781*/ + { USB_DEVICE(0x1199, 0x683B), .driver_info = DEVICE_1_PORT }, /* Sierra Wireless MC8785 Composite*/ { 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, 0x6855) }, /* Sierra Wireless AirCard 880 U */ { USB_DEVICE(0x1199, 0x6856) }, /* Sierra Wireless AirCard 881 U */ + { USB_DEVICE(0x1199, 0x6859), .driver_info = DEVICE_1_PORT }, /* Sierra Wireless AirCard 885 E */ + { USB_DEVICE(0x1199, 0x685A), .driver_info = DEVICE_1_PORT }, /* Sierra Wireless AirCard 885 E */ { USB_DEVICE(0x1199, 0x6468) }, /* Sierra Wireless MP3G - EVDO */ { USB_DEVICE(0x1199, 0x6469) }, /* Sierra Wireless MP3G - UMTS/HSPA */ |