android_kernel_motorola_sm6225/drivers/net/usb
Bjørn Mork 03304bcb5e net: qmi_wwan: use fixed interface number matching
This driver support many composite USB devices where the
interface class/subclass/protocol provides no information
about the interface function. Interfaces with different
functions may all use ff/ff/ff, like this example of
a device with three serial interfaces and three QMI/wwan
interfaces:

T:  Bus=02 Lev=01 Prnt=01 Port=03 Cnt=01 Dev#=116 Spd=480  MxCh= 0
D:  Ver= 2.00 Cls=00(>ifc ) Sub=00 Prot=00 MxPS=64 #Cfgs=  1
P:  Vendor=1199 ProdID=68a2 Rev= 0.06
S:  Manufacturer=Sierra Wireless, Incorporated
S:  Product=MC7710
S:  SerialNumber=3581780xxxxxx
C:* #Ifs= 6 Cfg#= 1 Atr=e0 MxPwr=  0mA
I:* If#= 0 Alt= 0 #EPs= 2 Cls=ff(vend.) Sub=ff Prot=ff Driver=qcserial
E:  Ad=81(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms
E:  Ad=01(O) Atr=02(Bulk) MxPS= 512 Ivl=4ms
I:* If#= 2 Alt= 0 #EPs= 2 Cls=ff(vend.) Sub=ff Prot=ff Driver=qcserial
E:  Ad=82(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms
E:  Ad=02(O) Atr=02(Bulk) MxPS= 512 Ivl=4ms
I:* If#= 3 Alt= 0 #EPs= 3 Cls=ff(vend.) Sub=ff Prot=ff Driver=qcserial
E:  Ad=83(I) Atr=03(Int.) MxPS=  64 Ivl=2ms
E:  Ad=84(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms
E:  Ad=03(O) Atr=02(Bulk) MxPS= 512 Ivl=4ms
I:* If#= 8 Alt= 0 #EPs= 3 Cls=ff(vend.) Sub=ff Prot=ff Driver=qmi_wwan
E:  Ad=85(I) Atr=03(Int.) MxPS=  64 Ivl=2ms
E:  Ad=86(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms
E:  Ad=04(O) Atr=02(Bulk) MxPS= 512 Ivl=4ms
I:* If#=19 Alt= 0 #EPs= 3 Cls=ff(vend.) Sub=ff Prot=ff Driver=qmi_wwan
E:  Ad=87(I) Atr=03(Int.) MxPS=  64 Ivl=2ms
E:  Ad=88(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms
E:  Ad=05(O) Atr=02(Bulk) MxPS= 512 Ivl=4ms
I:* If#=20 Alt= 0 #EPs= 3 Cls=ff(vend.) Sub=ff Prot=ff Driver=(none)
E:  Ad=89(I) Atr=03(Int.) MxPS=  64 Ivl=2ms
E:  Ad=8a(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms
E:  Ad=06(O) Atr=02(Bulk) MxPS= 512 Ivl=4ms

Instead of class/subclass/protocol the vendor use fixed
interface numbers for each function, and the Windows
drivers use these numbers to match driver and function.

The driver has had its own interface number whitelisting
code to simulate this functionality.  Replace this with
generic interface number matching now that the USB subsystem
support is there. This
 - removes the need for a driver_info structure per
   interface number,
 - avoids running the probe function for unsupported
   interfaces, and
 - simplifies the code.

Signed-off-by: Bjørn Mork <bjorn@mork.no>
Signed-off-by: David S. Miller <davem@davemloft.net>
2012-08-14 14:45:06 -07:00
..
asix.h asix: Add support for programming the EEPROM 2012-07-19 10:48:07 -07:00
asix_common.c asix: Add support for programming the EEPROM 2012-07-19 10:48:07 -07:00
asix_devices.c asix: Add support for programming the EEPROM 2012-07-19 10:48:07 -07:00
ax88172a.c asix: Add support for programming the EEPROM 2012-07-19 10:48:07 -07:00
catc.c USB: Disable hub-initiated LPM for comms devices. 2012-05-18 15:42:55 -07:00
cdc-phonet.c cdc-phonet: Don't leak in usbpn_open 2012-08-08 16:04:47 -07:00
cdc_eem.c USB: Disable hub-initiated LPM for comms devices. 2012-05-18 15:42:55 -07:00
cdc_ether.c USB 3.5-rc1 pull request 2012-05-22 15:50:46 -07:00
cdc_ncm.c cdc-ncm: tag Ericsson WWAN devices (eg F5521gw) with FLAG_WWAN 2012-08-03 20:32:30 -07:00
cdc_subset.c USB: Disable hub-initiated LPM for comms devices. 2012-05-18 15:42:55 -07:00
cx82310_eth.c USB: Disable hub-initiated LPM for comms devices. 2012-05-18 15:42:55 -07:00
dm9601.c USB: Disable hub-initiated LPM for comms devices. 2012-05-18 15:42:55 -07:00
gl620a.c USB: Disable hub-initiated LPM for comms devices. 2012-05-18 15:42:55 -07:00
hso.c TTY pull request for 3.5-rc1 2012-05-22 16:12:24 -07:00
int51x1.c USB: Disable hub-initiated LPM for comms devices. 2012-05-18 15:42:55 -07:00
ipheth.c ipheth: add support for iPad 2012-06-25 16:20:41 -07:00
kalmia.c USB: Disable hub-initiated LPM for comms devices. 2012-05-18 15:42:55 -07:00
kaweth.c USB: kaweth.c: use GFP_ATOMIC under spin_lock 2012-07-27 13:45:50 -07:00
Kconfig asix: AX88172A driver depends on phylib 2012-07-19 10:48:07 -07:00
lg-vl600.c USB: Disable hub-initiated LPM for comms devices. 2012-05-18 15:42:55 -07:00
Makefile asix: Add a new driver for the AX88172A 2012-07-16 23:26:23 -07:00
mcs7830.c mcs7830: Implement link state detection 2012-06-02 17:09:08 -04:00
net1080.c USB: Disable hub-initiated LPM for comms devices. 2012-05-18 15:42:55 -07:00
pegasus.c usbnet:pegasus: remove usb_get/put_dev in .probe and .disconnect 2012-06-12 18:50:23 -07:00
pegasus.h
plusb.c USB: Disable hub-initiated LPM for comms devices. 2012-05-18 15:42:55 -07:00
qmi_wwan.c net: qmi_wwan: use fixed interface number matching 2012-08-14 14:45:06 -07:00
rndis_host.c USB 3.5-rc1 pull request 2012-05-22 15:50:46 -07:00
rtl8150.c USB: Disable hub-initiated LPM for comms devices. 2012-05-18 15:42:55 -07:00
sierra_net.c net: sierra_net: device IDs for Aircard 320U++ 2012-06-06 10:40:32 -07:00
smsc75xx.c Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jikos/trivial 2012-07-24 13:34:56 -07:00
smsc75xx.h smsc75xx: replace 0xffff with PHY_INT_SRC_CLEAR_ALL 2012-05-07 23:43:56 -04:00
smsc95xx.c Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jikos/trivial 2012-07-24 13:34:56 -07:00
smsc95xx.h
usbnet.c net: usb: Use eth_random_addr 2012-07-16 22:38:28 -07:00
zaurus.c USB: Disable hub-initiated LPM for comms devices. 2012-05-18 15:42:55 -07:00