This is a note to let you know that I've just added the patch titled net: cdc_ncm: fix probing of devices with multiple control interface altsettings to the 3.8-stable tree which can be found at: http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary The filename of the patch is: net-cdc_ncm-fix-probing-of-devices-with-multiple-control-interface-altsettings.patch and it can be found in the queue-3.8 subdirectory. If you, or anyone else, feels it should not be added to the stable tree, please let <stable@xxxxxxxxxxxxxxx> know about it. >From c4a3284a9f2e1e305cbdf7336a02d44f32372e0c Mon Sep 17 00:00:00 2001 From: Bjørn Mork <bjorn@xxxxxxx> Date: Wed, 13 Feb 2013 12:09:52 +0000 Subject: net: cdc_ncm: fix probing of devices with multiple control interface altsettings From: Bjørn Mork <bjorn@xxxxxxx> [ Upstream commit f350ca03703133c94fe742f6fa6ff0fd8f5a9a09 ] commit bd329e1 ("net: cdc_ncm: do not bind to NCM compatible MBIM devices") added a test for a CDC MBIM altsetting, implementing the cdc_ncm part of MBIM backward compatibility support. This intentionally made the driver behave differently for CDC NCM devices with 2 alternate settings for the Communication interface, depending on whether or not CONFIG_USB_NET_CDC_MBIM was enabled. This is correct iff alternate setting #1 really *is* a MBIM setting. If not, then NCM probing will use a different altsetting than before, possibly causing probing failures depending on CONFIG_USB_NET_CDC_MBIM. Fix by setting the altsetting back to default after the test, restoring the previous behaviour for non MBIM devices. This bug causes probing of Huawei E3276 devices to fail when the MBIM driver is enabled, because these devices have a second alternate setting with no CDC functional descriptors. Cc: Greg Suarez <gsuarez@xxxxxxxxxxxxxx> Cc: Alexey Orishko <alexey.orishko@xxxxxxxxxxxxxx> Reported-and-tested-by: Jonathan A. <yo.natan@xxxxxxxxxxx> Signed-off-by: Bjørn Mork <bjorn@xxxxxxx> Signed-off-by: David S. Miller <davem@xxxxxxxxxxxxx> Signed-off-by: Greg Kroah-Hartman <gregkh@xxxxxxxxxxxxxxxxxxx> --- drivers/net/usb/cdc_ncm.c | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) --- a/drivers/net/usb/cdc_ncm.c +++ b/drivers/net/usb/cdc_ncm.c @@ -576,9 +576,14 @@ static int cdc_ncm_bind(struct usbnet *d if ((intf->num_altsetting == 2) && !usb_set_interface(dev->udev, intf->cur_altsetting->desc.bInterfaceNumber, - CDC_NCM_COMM_ALTSETTING_MBIM) && - cdc_ncm_comm_intf_is_mbim(intf->cur_altsetting)) - return -ENODEV; + CDC_NCM_COMM_ALTSETTING_MBIM)) { + if (cdc_ncm_comm_intf_is_mbim(intf->cur_altsetting)) + return -ENODEV; + else + usb_set_interface(dev->udev, + intf->cur_altsetting->desc.bInterfaceNumber, + CDC_NCM_COMM_ALTSETTING_NCM); + } #endif /* NCM data altsetting is always 1 */ Patches currently in stable-queue which might be from bjorn@xxxxxxx are queue-3.8/usb-option-add-and-update-alcatel-modems.patch queue-3.8/net-cdc_ncm-fix-probing-of-devices-with-multiple-control-interface-altsettings.patch queue-3.8/usb-option-add-yota-megafon-m100-1-4g-modem.patch queue-3.8/usb-option-add-huawei-acm-devices-using-protocol-vendor.patch -- To unsubscribe from this list: send the line "unsubscribe stable" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html