android_kernel_motorola_sm6225/drivers/net/usb
Bjørn Mork b701f16dd4 net: qmi_wwan: set correct altsetting for Gobi 1K devices
commit bd877e4 ("net: qmi_wwan: use a single bind function for
all device types") made Gobi 1K devices fail probing.

Using the number of endpoints in the default altsetting to decide
whether the function use one or two interfaces is wrong.  Other
altsettings may provide more endpoints.

With Gobi 1K devices, USB interface #3's altsetting is 0 by default, but
altsetting 0 only provides one interrupt endpoint and is not sufficent
for QMI.  Altsetting 1 provides all 3 endpoints required for qmi_wwan
and works with QMI. Gobi 1K layout for intf#3 is:

    Interface Descriptor:  255/255/255
      bInterfaceNumber        3
      bAlternateSetting       0
      Endpoint Descriptor:  Interrupt IN
    Interface Descriptor:  255/255/255
      bInterfaceNumber        3
      bAlternateSetting       1
      Endpoint Descriptor:  Interrupt IN
      Endpoint Descriptor:  Bulk IN
      Endpoint Descriptor:  Bulk OUT

Prior to commit bd877e4, we would call usbnet_get_endpoints
before giving up finding enough endpoints. Removing the early
endpoint number test and the strict functional descriptor
requirement allow qmi_wwan_bind to continue until
usbnet_get_endpoints has made the final attempt to collect
endpoints.  This restores the behaviour from before commit
bd877e4 without losing the added benefit of using a single bind
function.

The driver has always required a CDC Union functional descriptor
for two-interface functions. Using the existence of this
descriptor to detect two-interface functions is the logically
correct method.

Reported-by: Dan Williams <dcbw@redhat.com>
Signed-off-by: Bjørn Mork <bjorn@mork.no>
Tested-by: Dan Williams <dcbw@redhat.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2013-03-13 11:33:42 -04:00
..
asix.h net: asix: handle packets crossing URB boundaries 2013-01-18 14:13:29 -05:00
asix_common.c net: asix: handle packets crossing URB boundaries 2013-01-18 14:13:29 -05:00
asix_devices.c usb/net/asix_devices: Add USBNET HG20F9 ethernet dongle 2013-02-27 13:10:35 -05:00
ax88172a.c drivers: net: usb: Remove unnecessary alloc/OOM messages 2013-02-04 13:22:34 -05:00
ax88179_178a.c ax88179_178a: ASIX AX88179_178A USB 3.0/2.0 to gigabit ethernet adapter driver 2013-03-03 01:43:47 -05:00
catc.c ethtool: fix drvinfo strings set in drivers 2013-01-06 21:06:31 -08:00
cdc-phonet.c cdc-phonet: Don't leak in usbpn_open 2012-08-08 16:04:47 -07:00
cdc_eem.c net: usb: cdc_eem: Fix rx skb allocation for 802.1Q VLANs 2012-11-07 21:12:26 -05:00
cdc_ether.c qmi_wwan, cdc-ether: add ADU960S 2013-02-19 00:51:10 -05:00
cdc_mbim.c net: cdc_mbim: send ZLP only for the specific buggy device 2013-01-23 13:45:49 -05:00
cdc_ncm.c net: cdc_ncm: tag Huawei devices (e.g. E5331) with FLAG_WWAN 2013-02-27 13:10:35 -05:00
cdc_subset.c USB: Disable hub-initiated LPM for comms devices. 2012-05-18 15:42:55 -07:00
cx82310_eth.c net: cx82310_eth: use common match macro 2012-09-03 13:51:02 -04:00
dm9601.c Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net 2013-01-29 15:32:13 -05:00
gl620a.c USB: remove dbg() usage in USB networking drivers 2012-09-20 17:53:14 -04:00
hso.c tty/serial patches for 3.9-rc1 2013-02-21 13:41:04 -08:00
int51x1.c usbnet: int51x1: apply introduced usb command APIs 2012-10-26 03:36:51 -04:00
ipheth.c usb/ipheth: Add iPhone 5 support 2012-10-18 15:34:30 -04:00
kalmia.c remove init of dev->perm_addr in drivers 2013-01-08 18:00:48 -08:00
kaweth.c kaweth: print correct debug ptr 2012-10-11 15:12:33 -04:00
Kconfig ax88179_178a: ASIX AX88179_178A USB 3.0/2.0 to gigabit ethernet adapter driver 2013-03-03 01:43:47 -05:00
lg-vl600.c USB: Disable hub-initiated LPM for comms devices. 2012-05-18 15:42:55 -07:00
Makefile ax88179_178a: ASIX AX88179_178A USB 3.0/2.0 to gigabit ethernet adapter driver 2013-03-03 01:43:47 -05:00
mcs7830.c usbnet: mcs7830: apply introduced usb command APIs 2012-10-26 03:36:51 -04:00
net1080.c usbnet: net1080: apply introduced usb command APIs 2012-10-26 03:36:51 -04:00
pegasus.c drivers: net: Remove remaining alloc/OOM messages 2013-02-08 17:44:39 -05:00
pegasus.h usb: pegasus: fixed coding style issues 2010-06-30 10:26:16 -07:00
plusb.c usbnet: plusb: apply introduced usb command APIs 2012-10-26 03:36:51 -04:00
qmi_wwan.c net: qmi_wwan: set correct altsetting for Gobi 1K devices 2013-03-13 11:33:42 -04:00
rndis_host.c remove init of dev->perm_addr in drivers 2013-01-08 18:00:48 -08:00
rtl8150.c ethtool: fix drvinfo strings set in drivers 2013-01-06 21:06:31 -08:00
sierra_net.c drivers: net: usb: Remove unnecessary alloc/OOM messages 2013-02-04 13:22:34 -05:00
smsc75xx.c drivers: net: usb: Remove unnecessary alloc/OOM messages 2013-02-04 13:22:34 -05:00
smsc75xx.h smsc75xx: replace 0xffff with PHY_INT_SRC_CLEAR_ALL 2012-05-07 23:43:56 -04:00
smsc95xx.c usbnet: smsc95xx: rename FEATURE_AUTOSUSPEND 2013-02-25 15:49:52 -05:00
smsc95xx.h smsc95xx: support PHY wakeup source 2012-11-23 14:15:18 -05:00
usbnet.c Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net 2013-02-05 14:12:20 -05:00
zaurus.c USB: Disable hub-initiated LPM for comms devices. 2012-05-18 15:42:55 -07:00