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=-3.8 required=3.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SIGNED_OFF_BY,SPF_HELO_NONE,SPF_PASS autolearn=no 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 7B575C352A3 for ; Mon, 10 Feb 2020 13:03:53 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 5F4662070A for ; Mon, 10 Feb 2020 13:03:53 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729850AbgBJNDw convert rfc822-to-8bit (ORCPT ); Mon, 10 Feb 2020 08:03:52 -0500 Received: from shards.monkeyblade.net ([23.128.96.9]:39524 "EHLO shards.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729710AbgBJNDv (ORCPT ); Mon, 10 Feb 2020 08:03:51 -0500 Received: from localhost (82-95-191-104.ip.xs4all.nl [82.95.191.104]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (Client did not present a certificate) (Authenticated sender: davem-davemloft) by shards.monkeyblade.net (Postfix) with ESMTPSA id DD09D14DD5523; Mon, 10 Feb 2020 05:03:49 -0800 (PST) Date: Mon, 10 Feb 2020 14:03:48 +0100 (CET) Message-Id: <20200210.140348.1963500382587025261.davem@davemloft.net> To: bjorn@mork.no Cc: netdev@vger.kernel.org, linux-usb@vger.kernel.org, kristian.evensen@gmail.com, aleksander@aleksander.es Subject: Re: [PATCH net-next] qmi_wwan: unconditionally reject 2 ep interfaces From: David Miller In-Reply-To: <20200208155504.30243-1-bjorn@mork.no> References: <20200208155504.30243-1-bjorn@mork.no> X-Mailer: Mew version 6.8 on Emacs 26.3 Mime-Version: 1.0 Content-Type: Text/Plain; charset=iso-8859-1 Content-Transfer-Encoding: 8BIT X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.5.12 (shards.monkeyblade.net [149.20.54.216]); Mon, 10 Feb 2020 05:03:50 -0800 (PST) Sender: netdev-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org From: Bjørn Mork Date: Sat, 8 Feb 2020 16:55:04 +0100 > We have been using the fact that the QMI and DIAG functions > usually are the only ones with class/subclass/protocol being > ff/ff/ff on Quectel modems. This has allowed us to match the > QMI function without knowing the exact interface number, > which can vary depending on firmware configuration. > > The ability to silently reject the DIAG function, which is > usually handled by the option driver, is important for this > method to work. This is done based on the knowledge that it > has exactly 2 bulk endpoints. QMI function control interfaces > will have either 3 or 1 endpoint. This rule is universal so > the quirk condition can be removed. > > The fixed layouts known from the Gobi1k and Gobi2k modems > have been gradually replaced by more dynamic layouts, and > many vendors now use configurable layouts without changing > device IDs. Renaming the class/subclass/protocol matching > macro makes it more obvious that this is now not Quectel > specific anymore. > > Cc: Kristian Evensen > Cc: Aleksander Morgado > Signed-off-by: Bjørn Mork Applied.