From patchwork Fri Sep 11 12:46:15 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Greg KH X-Patchwork-Id: 309772 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-12.8 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED, DKIM_VALID, HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_PATCH, MAILING_LIST_MULTI, SIGNED_OFF_BY, SPF_HELO_NONE, SPF_PASS, URIBL_BLOCKED, USER_AGENT_GIT autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 57AF2C43461 for ; Fri, 11 Sep 2020 17:34:15 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 14F97221E7 for ; Fri, 11 Sep 2020 17:34:15 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1599845655; bh=ks8FBRzzE0qli1nkpe2h0FyERehMi7N5X63Tf043nKE=; h=From:To:Cc:Subject:Date:In-Reply-To:References:List-ID:From; b=plV/yQrep1X+HXu2UAYIJ+KbtittELwf19hKLERMSWyVqYO1QDAm/AzawUB2Bmzcg 84ocRGgHq0RF9e5rsgkeNKCJg2KHdByOFjZhwwWUf1TvP1a919EIJSAfuYwdVQW4SI ykFX5juXwbuGmopxPlAkLCzmM/pqg3+aJ6U85RIs= Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726387AbgIKRcq (ORCPT ); Fri, 11 Sep 2020 13:32:46 -0400 Received: from mail.kernel.org ([198.145.29.99]:49240 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726018AbgIKMzK (ORCPT ); Fri, 11 Sep 2020 08:55:10 -0400 Received: from localhost (83-86-74-64.cable.dynamic.v4.ziggo.nl [83.86.74.64]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 0C2962222D; Fri, 11 Sep 2020 12:54:11 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1599828852; bh=ks8FBRzzE0qli1nkpe2h0FyERehMi7N5X63Tf043nKE=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=f9Ry2WnfRW0mrjuEH9qCDadX/JQJuTn3XliQ/iiDtDXuO8UBFjLVJHr/3M6fkd236 Dr0x0+tuoxpVQYfpE36igcAn3+1Ppv7+rwa9LyTOzsaVmi4geXNAqNZ8QP1uShkj7Q 3dF+051x2Igr5IHRg5as1/mgHhoF5zDcd1kHkb6U= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Kanerva Topi , =?utf-8?q?Bj=C3=B8rn_Mork?= , "David S. Miller" , Sasha Levin Subject: [PATCH 4.4 32/62] net: qmi_wwan: ignore bogus CDC Union descriptors Date: Fri, 11 Sep 2020 14:46:15 +0200 Message-Id: <20200911122503.996071501@linuxfoundation.org> X-Mailer: git-send-email 2.28.0 In-Reply-To: <20200911122502.395450276@linuxfoundation.org> References: <20200911122502.395450276@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Sender: stable-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: stable@vger.kernel.org From: Bjørn Mork [ 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 Signed-off-by: Bjørn Mork Signed-off-by: David S. Miller Signed-off-by: Sasha Levin --- drivers/net/usb/qmi_wwan.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/drivers/net/usb/qmi_wwan.c b/drivers/net/usb/qmi_wwan.c index e75e984483bc5..f8d00846b4a59 100644 --- a/drivers/net/usb/qmi_wwan.c +++ b/drivers/net/usb/qmi_wwan.c @@ -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; } }