Received: by 2002:a05:6a10:22f:0:0:0:0 with SMTP id 15csp428744pxk; Fri, 11 Sep 2020 10:36:31 -0700 (PDT) X-Google-Smtp-Source: ABdhPJz8Hz64rppfVWhJn8REucoxEapceBZnnYouKCo2BDtOC2jGmSOcxuGGA6wpqKIYMBoqF36M X-Received: by 2002:a05:6402:164d:: with SMTP id s13mr3320160edx.222.1599845791386; Fri, 11 Sep 2020 10:36:31 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1599845791; cv=none; d=google.com; s=arc-20160816; b=MBUcTmA/WhE7UAN92k0sgdiIsGXtFdLibSoM5/VgghhMTLOAHA5bswU8z1SpdIJfUl rB3n7uN4YrmDU6RMYbrirP5UesmagLOFhp5O0L3k1VrUk4RB34rnCUs2EDAFLnHImFZL sE25d6/iA4TYROLcLaveYjSiKVG9LnuUyLwomsGl+LSVjHQAUuFM7kaXqbOtA3wNuja3 5nOkL5hHs+A/nQKB3xKxquSMLpH00CCZK2gYzGktAqVFucpi9QmAa3kbyZNvoCADSwny WiZIO8BtAgp/vM9Do6Z9qK8U90tQkn99QoB8PAkeNQbtnoE8DAh7ttmBnTSH+DYDQO1/ 8fpQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=efExWXt+ft71AiiRt05/F0yJ/flgTGLwfBOiwi5Vfpg=; b=SbrwwQ0GvKX4t7ZI2YfqKaIVolPQoz64sYTHodNWaQ3Aj5kpZC77i1nBVCOF7LnWwA +eDvfK789hZkMAI0qIKGnQ2O2pIw4rBFikGF4ZzSlTewoKNccnaITIQQojCZT4Xh59SF c6iY93/gO/029CygGfnwuRuziPQQeW7c09Jnyvfn8dqdJlcG5Imw+g+2vePAbYXRdDBI wGBQ2Hu4pUts0cgcoSNisyB/6+/MfTbMrj5kehYU5QsSP8uxO14SKb1Vl53GvuEgJAPH w5k2DAmlSWPdE03XGRgOxr250wG8ml4hKKLGyxXkYqZE3GFh/bugLlOSqmnDv794rK6E ZWHA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=f9Ry2Wnf; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id rn4si1799602ejb.143.2020.09.11.10.36.08; Fri, 11 Sep 2020 10:36:31 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=f9Ry2Wnf; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726393AbgIKRc7 (ORCPT + 99 others); Fri, 11 Sep 2020 13:32:59 -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=20Mork?= , "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 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@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; } } -- 2.25.1