Received: by 2002:a05:6a10:f3d0:0:0:0:0 with SMTP id a16csp1325651pxv; Fri, 2 Jul 2021 00:35:28 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzwTqi/10VZIaDckX9jOd43YnAhXpQpCoPcCrM8aKQoXpzbRf/BpiHABTSIfKL/IMLqChPU X-Received: by 2002:aa7:dd57:: with SMTP id o23mr5034614edw.6.1625211328240; Fri, 02 Jul 2021 00:35:28 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1625211328; cv=none; d=google.com; s=arc-20160816; b=VjF30fj17vc4hgpt8R7gtWJaBeX3bwGifQZ+Rv28fnV7QLW91Q3iuupnVcn8rCSJon rPi5RgPUH5rEpehzhdiG4JY3Y7Lq6EN5PJUncXhoBoevO6lFxtHw8EIVBvH7kmdsbmxV hSidykqdu7uCI2dn2oBV28TU2hgRz2LxFgfzEmuJ2Ub8paSSjJl+N2prO+F7VvTuZ+tk 69ZNJfekZcQ+Gs7EMVRX9aPvTyEiacgYCt2aewYJvqhX5P2Yl2YY5kwphUr3ulEpF87v ag6q6UExONR5WX1ppwdlTVbHIZl2pnXEjP3pZgW9FzPvIi6TPhtUecCrMNjtAqaSE2NN IqzQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :user-agent:message-id:in-reply-to:date:references:organization :subject:cc:to:from:dkim-signature; bh=4IcPPKCPtha5caFpsZbpIXIABLLgrcYiJzOTZgq2fqI=; b=vYxjD/hZUa6SdEYRBiLwnqYw9EzatKxWPkop4uGClIcdz80asU/15ANGM7zPdQbnTW 5Zrb2yWL6mJciIlZC65gm5WdioiH5ydvcBCJQr6dM4iIhwOnX+4RC87ubi/9CemDkp/g TNN2KGaBm7Hv9XQQNvL0gIbTn6XuViGh+dZsE6KiSEHzrYWQ8XUkiqNwa6qTyXl+HX0L DzwB0OLxHdVytGV+odfDl8hm1uIZ/PFMHkRRuV0zmeGizh2n2srAquM6xF7EUsvzof+G SxReKb2cz1wU9Ax4dDArfznQO9NKQjFzKVn7Y665I8gQ2YuYzgNG8MuLW0Qaks0+KEZF /Ydw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@mork.no header.s=b header.b=mbkGlWgP; 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=pass (p=NONE sp=NONE dis=NONE) header.from=mork.no Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id jz3si2633007ejb.9.2021.07.02.00.35.00; Fri, 02 Jul 2021 00:35:28 -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=@mork.no header.s=b header.b=mbkGlWgP; 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=pass (p=NONE sp=NONE dis=NONE) header.from=mork.no Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230109AbhGBHfL (ORCPT + 99 others); Fri, 2 Jul 2021 03:35:11 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:33028 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229847AbhGBHfK (ORCPT ); Fri, 2 Jul 2021 03:35:10 -0400 Received: from canardo.mork.no (canardo.mork.no [IPv6:2001:4641::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 35882C061762; Fri, 2 Jul 2021 00:32:38 -0700 (PDT) Received: from miraculix.mork.no (fwa219.mork.no [192.168.9.219]) (authenticated bits=0) by canardo.mork.no (8.15.2/8.15.2) with ESMTPSA id 1627WTFM008403 (version=TLSv1.3 cipher=TLS_AES_256_GCM_SHA384 bits=256 verify=NO); Fri, 2 Jul 2021 09:32:29 +0200 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=mork.no; s=b; t=1625211149; bh=4IcPPKCPtha5caFpsZbpIXIABLLgrcYiJzOTZgq2fqI=; h=From:To:Cc:Subject:References:Date:Message-ID:From; b=mbkGlWgP+f+Jtzg6EonrswIcr+5x61PhMzBMiQpBdbZB7dz5nJt1cCX3fbToaE6Wu 9tHZjLKHB/uSGsdoC0iqs8AILR2Rp1lqSVjJsBL+VYtzexo1qe9FZR8rmYjpaDqDRl 3US7PtdhvWQssy53NQ83xesqC/ay6G3c+zvWcWdE= Received: from bjorn by miraculix.mork.no with local (Exim 4.94.2) (envelope-from ) id 1lzDf2-000BB9-Rw; Fri, 02 Jul 2021 09:32:28 +0200 From: =?utf-8?Q?Bj=C3=B8rn_Mork?= To: Stefan =?utf-8?Q?Br=C3=BCns?= Cc: Johan Hovold , Greg Kroah-Hartman , , , Daniele Palmas Subject: Re: [PATCH v2] USB: serial: qcserial: Support for SDX55 based Sierra Wireless 5G modules Organization: m References: <20210611134507.8780-1-stefan.bruens@rwth-aachen.de> <87tulnms3o.fsf@miraculix.mork.no> <1727850.UKLhYeRy6v@pebbles> Date: Fri, 02 Jul 2021 09:32:28 +0200 In-Reply-To: <1727850.UKLhYeRy6v@pebbles> ("Stefan =?utf-8?Q?Br=C3=BCns=22?= =?utf-8?Q?'s?= message of "Thu, 1 Jul 2021 18:28:14 +0200") Message-ID: <87y2apf9wz.fsf@miraculix.mork.no> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.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.103.2 at canardo X-Virus-Status: Clean Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Stefan Br=C3=BCns writes: > On Donnerstag, 24. Juni 2021 13:15:07 CEST Bj=C3=B8rn Mork wrote: >> Johan Hovold writes: >> > Could you please also post the output of usb-devices (or lsusb -v) for >> > this device in MBIM mode? >>=20 >> Yes, this would be nice to have. > > See below. >=20=20 >> I suspect that this device is like other SDX55 devices we've seen, using >> class/subclass/function to map the vendor specific functions >> too. Dropping static interface numbers. If correct, then the patch is >> bogus and the interface numbers might change based on firmware version >> and configuration. > > Do you really expect Sierra do to something sensible? According to their= =20 > documentation functions are matched by interface numbers. Well... I expect them to be as sensible as any other vendor. And I expect docs to be intendend as guidance only ;-) > They still use broken interface descriptors with holes in interface numbe= ring=20 > (i.e. interface number 2 does not exist, which violates the USB standard). Right. Wrt the violation, I think that train left a decade ago.=20=20 > Interface Descriptor: > bLength 9 > bDescriptorType 4 > bInterfaceNumber 3 > bAlternateSetting 0 > bNumEndpoints 3 > bInterfaceClass 255 Vendor Specific Class > bInterfaceSubClass 0=20 > bInterfaceProtocol 0=20 [..] > Interface Descriptor: > bLength 9 > bDescriptorType 4 > bInterfaceNumber 4 > bAlternateSetting 0 > bNumEndpoints 2 > bInterfaceClass 255 Vendor Specific Class > bInterfaceSubClass 255 Vendor Specific Subclass > bInterfaceProtocol 48=20 So Sierra do follow the same pattern we've seen on other X55 devices: ff/00/00 - AT ff/ff/30 - QCDM See commits accf227de4d2 ("USB: serial: option: Add support for Quectel RM500Q") d6c1ddd938d8 ("USB: serial: option: add Quectel EM160R-GL") for other examples. This obviously doesn't make any difference if your configuration is the only one. But I believe that is unlikely. There are probably ways the layout can be changed, even if currenly not documented. The advantage of class/subclass/protocol matching to function is that it works regardless of the number of functions and their interface number. Bj=C3=B8rn