diff options
author | Kevin Lloyd <klloyd@sierrawireless.com> | 2008-04-02 14:24:56 -0400 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@suse.de> | 2008-04-25 00:16:44 -0400 |
commit | 7106967ecc0a33a7d7e2e04798eb9f45377f448b (patch) | |
tree | 3e875fdc0c1c2c3c2f7f2713df895b32f3e4746d /drivers | |
parent | 69a90f8189960f37cc73f5da6c331b23227e2197 (diff) |
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')
-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) | |||
108 | return result; | 108 | return result; |
109 | } | 109 | } |
110 | 110 | ||
111 | static int sierra_calc_interface(struct usb_serial *serial) | ||
112 | { | ||
113 | int interface; | ||
114 | struct usb_interface *p_interface; | ||
115 | struct usb_host_interface *p_host_interface; | ||
116 | |||
117 | /* Get the interface structure pointer from the serial struct */ | ||
118 | p_interface = serial->interface; | ||
119 | |||
120 | /* Get a pointer to the host interface structure */ | ||
121 | p_host_interface = p_interface->cur_altsetting; | ||
122 | |||
123 | /* read the interface descriptor for this active altsetting | ||
124 | * to find out the interface number we are on | ||
125 | */ | ||
126 | interface = p_host_interface->desc.bInterfaceNumber; | ||
127 | |||
128 | return interface; | ||
129 | } | ||
130 | |||
111 | static int sierra_probe(struct usb_serial *serial, | 131 | static int sierra_probe(struct usb_serial *serial, |
112 | const struct usb_device_id *id) | 132 | const struct usb_device_id *id) |
113 | { | 133 | { |
@@ -123,6 +143,22 @@ static int sierra_probe(struct usb_serial *serial, | |||
123 | ifnum = serial->interface->cur_altsetting->desc.bInterfaceNumber; | 143 | ifnum = serial->interface->cur_altsetting->desc.bInterfaceNumber; |
124 | udev = serial->dev; | 144 | udev = serial->dev; |
125 | 145 | ||
146 | /* Figure out the interface number from the serial structure */ | ||
147 | ifnum = sierra_calc_interface(serial); | ||
148 | |||
149 | /* | ||
150 | * If this interface supports more than 1 alternate | ||
151 | * select the 2nd one | ||
152 | */ | ||
153 | if (serial->interface->num_altsetting == 2) { | ||
154 | dev_dbg(&udev->dev, | ||
155 | "Selecting alt setting for interface %d\n", | ||
156 | ifnum); | ||
157 | |||
158 | /* We know the alternate setting is 1 for the MC8785 */ | ||
159 | usb_set_interface(udev, ifnum, 1); | ||
160 | } | ||
161 | |||
126 | /* Check if in installer mode */ | 162 | /* Check if in installer mode */ |
127 | if (truinstall && id->driver_info == DEVICE_INSTALLER) { | 163 | if (truinstall && id->driver_info == DEVICE_INSTALLER) { |
128 | dev_dbg(&udev->dev, "%s", "FOUND TRU-INSTALL DEVICE(SW)\n"); | 164 | dev_dbg(&udev->dev, "%s", "FOUND TRU-INSTALL DEVICE(SW)\n"); |
@@ -165,14 +201,18 @@ static struct usb_device_id id_table [] = { | |||
165 | { USB_DEVICE(0x1199, 0x6815) }, /* Sierra Wireless MC8775 */ | 201 | { USB_DEVICE(0x1199, 0x6815) }, /* Sierra Wireless MC8775 */ |
166 | { USB_DEVICE(0x03f0, 0x1e1d) }, /* HP hs2300 a.k.a MC8775 */ | 202 | { USB_DEVICE(0x03f0, 0x1e1d) }, /* HP hs2300 a.k.a MC8775 */ |
167 | { USB_DEVICE(0x1199, 0x6820) }, /* Sierra Wireless AirCard 875 */ | 203 | { USB_DEVICE(0x1199, 0x6820) }, /* Sierra Wireless AirCard 875 */ |
204 | { USB_DEVICE(0x1199, 0x6821) }, /* Sierra Wireless AirCard 875U */ | ||
168 | { USB_DEVICE(0x1199, 0x6832) }, /* Sierra Wireless MC8780*/ | 205 | { USB_DEVICE(0x1199, 0x6832) }, /* Sierra Wireless MC8780*/ |
169 | { USB_DEVICE(0x1199, 0x6833) }, /* Sierra Wireless MC8781*/ | 206 | { USB_DEVICE(0x1199, 0x6833) }, /* Sierra Wireless MC8781*/ |
207 | { USB_DEVICE(0x1199, 0x683B), .driver_info = DEVICE_1_PORT }, /* Sierra Wireless MC8785 Composite*/ | ||
170 | { USB_DEVICE(0x1199, 0x6850) }, /* Sierra Wireless AirCard 880 */ | 208 | { USB_DEVICE(0x1199, 0x6850) }, /* Sierra Wireless AirCard 880 */ |
171 | { USB_DEVICE(0x1199, 0x6851) }, /* Sierra Wireless AirCard 881 */ | 209 | { USB_DEVICE(0x1199, 0x6851) }, /* Sierra Wireless AirCard 881 */ |
172 | { USB_DEVICE(0x1199, 0x6852) }, /* Sierra Wireless AirCard 880 E */ | 210 | { USB_DEVICE(0x1199, 0x6852) }, /* Sierra Wireless AirCard 880 E */ |
173 | { USB_DEVICE(0x1199, 0x6853) }, /* Sierra Wireless AirCard 881 E */ | 211 | { USB_DEVICE(0x1199, 0x6853) }, /* Sierra Wireless AirCard 881 E */ |
174 | { USB_DEVICE(0x1199, 0x6855) }, /* Sierra Wireless AirCard 880 U */ | 212 | { USB_DEVICE(0x1199, 0x6855) }, /* Sierra Wireless AirCard 880 U */ |
175 | { USB_DEVICE(0x1199, 0x6856) }, /* Sierra Wireless AirCard 881 U */ | 213 | { USB_DEVICE(0x1199, 0x6856) }, /* Sierra Wireless AirCard 881 U */ |
214 | { USB_DEVICE(0x1199, 0x6859), .driver_info = DEVICE_1_PORT }, /* Sierra Wireless AirCard 885 E */ | ||
215 | { USB_DEVICE(0x1199, 0x685A), .driver_info = DEVICE_1_PORT }, /* Sierra Wireless AirCard 885 E */ | ||
176 | 216 | ||
177 | { USB_DEVICE(0x1199, 0x6468) }, /* Sierra Wireless MP3G - EVDO */ | 217 | { USB_DEVICE(0x1199, 0x6468) }, /* Sierra Wireless MP3G - EVDO */ |
178 | { USB_DEVICE(0x1199, 0x6469) }, /* Sierra Wireless MP3G - UMTS/HSPA */ | 218 | { USB_DEVICE(0x1199, 0x6469) }, /* Sierra Wireless MP3G - UMTS/HSPA */ |