]> git.ipfire.org Git - thirdparty/kernel/stable.git/commitdiff
net: qmi_wwan: ignore bogus CDC Union descriptors
authorBjørn Mork <bjorn@mork.no>
Thu, 17 Dec 2015 11:44:04 +0000 (12:44 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sat, 12 Sep 2020 09:45:30 +0000 (11:45 +0200)
[ Upstream commit 34a55d5e858e81a20d33fd9490149d6a1058be0c ]

The CDC descriptors found on these vendor specific functions should
not be considered authoritative.  They seem to be ignored by drivers
for other systems, and the quality is therefore low.

One device (1e0e:9001) has been reported to have such a bogus union
descriptor on the QMI function, making it fail probing even if the
device id was dynamically added.  The report was not complete enough
to allow adding a device entry for this modem. But this should at
least fix the dynamic id probing problem.

Reported-by: Kanerva Topi <Topi.Kanerva@cinia.fi>
Signed-off-by: Bjørn Mork <bjorn@mork.no>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/net/usb/qmi_wwan.c

index e75e984483bc5179072e95b8e5dbb5ac44b4f84d..f8d00846b4a598fa7f846e7b3d9326076ed61864 100644 (file)
@@ -374,7 +374,10 @@ static int qmi_wwan_bind(struct usbnet *dev, struct usb_interface *intf)
                                "bogus CDC Union: master=%u, slave=%u\n",
                                cdc_union->bMasterInterface0,
                                cdc_union->bSlaveInterface0);
-                       goto err;
+
+                       /* ignore and continue... */
+                       cdc_union = NULL;
+                       info->data = intf;
                }
        }