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=-1.1 required=3.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_PASS autolearn=ham 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 816F1C43381 for ; Sat, 2 Mar 2019 15:00:32 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 1B2AB20857 for ; Sat, 2 Mar 2019 15:00:32 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=mork.no header.i=@mork.no header.b="CrFp/B8h" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726295AbfCBPAb (ORCPT ); Sat, 2 Mar 2019 10:00:31 -0500 Received: from canardo.mork.no ([148.122.252.1]:47571 "EHLO canardo.mork.no" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726065AbfCBPAa (ORCPT ); Sat, 2 Mar 2019 10:00:30 -0500 Received: from miraculix.mork.no (miraculix.mork.no [IPv6:2001:4641:0:2:7627:374e:db74:e353]) (authenticated bits=0) by canardo.mork.no (8.15.2/8.15.2) with ESMTPSA id x22F0OgS025624 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO); Sat, 2 Mar 2019 16:00:24 +0100 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=mork.no; s=b; t=1551538824; bh=2wKVa4s8uDGEFn0lY2/e2gw7J6IZz2TE8CAQnQJDDFQ=; h=From:To:Cc:Subject:References:Date:Message-ID:From; b=CrFp/B8hAb6wBeiYEVXdxH7JlNl3pcTD4ZkGP69M3+5DUK749tWnLgOuR0FfE6Vp8 JSozNL4tCnFM3QWIghbPTnOVH3zwh9DpkpFtsSijXb8uUE+L5WXaPapuiRRY8yp2oB Ify/L2ZOo2XCJM9cNUnjoBywCOBGER9Ws0Ur2K8A= Received: from bjorn by miraculix.mork.no with local (Exim 4.89) (envelope-from ) id 1h067k-0000zK-65; Sat, 02 Mar 2019 16:00:24 +0100 From: =?utf-8?Q?Bj=C3=B8rn_Mork?= To: Kristian Evensen Cc: netdev@vger.kernel.org, davem@davemloft.net Subject: Re: [PATCH net] qmi_wwan: Add support for Quectel EG12/EM12 Organization: m References: <20190302123226.14589-1-kristian.evensen@gmail.com> Date: Sat, 02 Mar 2019 16:00:24 +0100 In-Reply-To: <20190302123226.14589-1-kristian.evensen@gmail.com> (Kristian Evensen's message of "Sat, 2 Mar 2019 13:32:26 +0100") Message-ID: <87o96t9v93.fsf@miraculix.mork.no> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.1 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Virus-Scanned: clamav-milter 0.100.2 at canardo X-Virus-Status: Clean Sender: netdev-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org Kristian Evensen writes: > Quectel EG12 (module)/EM12 (M.2 card) is a Cat. 12 LTE modem. The modem > behaves in the same way as the EP06, so the "set DTR"-quirk must be > applied and the diagnostic-interface check performed. Since the > diagnostic-check now applies to more modems, I have renamed the function > from quectel_ep06_diag_detected() to quectel_diag_detected(). I am not too happy about the double device id matching with extra magic applied. outside the device id table. It does not scale, and it does not play well at all with dynamic IDs. But I guess it's acceptable for two devices when it was ok for one, so Acked-by: Bj=C3=B8rn Mork But I assume this isn't the last device we've seen with this issue. Someone has already mention Quectel EM20. Maybe convert this code to a quirk for the next device and leave all the device specific magic in the device id table? Could even add a macro for the class match + quirk thing. Bj=C3=B8rn