Received: by 2002:a05:6a10:206:0:0:0:0 with SMTP id 6csp359029pxj; Thu, 24 Jun 2021 00:30:04 -0700 (PDT) X-Google-Smtp-Source: ABdhPJy6H15FG4NmU+8IveFwFnmmYqfhSfC0ASzFXhTZ9ijZfS2axxzOoV7pAx9thZ6EDJVO9jS8 X-Received: by 2002:a5d:8b8b:: with SMTP id p11mr3018697iol.77.1624519804079; Thu, 24 Jun 2021 00:30:04 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1624519804; cv=none; d=google.com; s=arc-20160816; b=k+OBRYwKAEuBYNbDOa0WhBaEVwUNjvirtGZqX95pvnCA1blbTfztKd9MWC+v86gCI3 U9D/G5GoBL008Yp0ML6N6jUr6QayEqqcqMav4DTzqvz8p4vCN8//WwNW4RXFnSt18YQ8 aq4CfMWISkjViHh5kFMqqMAVyTDBdzvzc6NS412r14iW+tGwi1jhnC1FouEcIuJn2U1j uazZPSQJrKR+Ye76GikgNE3HxIl2H87eePSeMkaVe9uWxjLm4m/J9zQAN7Ti22L8HBdd 6Xf93EemM5Om94vN8U9jKQIwE2zYuyZDXZ7D8PmQ7kg+wLQBcE6GxDeajHpHZY6P0Bx2 sU9Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-transfer-encoding :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:dkim-signature; bh=7LA0GE8VtOYyhgEa3z7YRRTW0t9fUpb9UZpSo5pEQh0=; b=Tb++idZxWD4vZ00d5W836dzH47C1DkNKo/sY3QFuZFekn5BhW8PRcqAlioiKnppm33 81vcwYY6ACP7WDakoQYyJQODj6YXxDNQpQ4V4Pl+J0Ua4SpMvzHjaILW7/n5FtwIJlqQ AZ1IYQTtG5gAjQ658zI7ac5j+Is1WOMtBnkTUeaDC8VEpD72j95Rm4cddGKHpL0TEHao nmNq9gvNyeK02ONsm4E+pyhSRO7i2rE22IZlW0P0vX4QghGQh6ViW3bHP5eVqp9Rev13 8tzVGLvTkoiHnkrW9saRIefUEprgGfHl+CivpC5af2nFS20meJ8nmBP0oVL6HvVZdSr5 tltw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=NQPdZDQN; 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=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id l16si1699143ion.65.2021.06.24.00.29.52; Thu, 24 Jun 2021 00:30:04 -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=k20201202 header.b=NQPdZDQN; 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=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231634AbhFXHbU (ORCPT + 99 others); Thu, 24 Jun 2021 03:31:20 -0400 Received: from mail.kernel.org ([198.145.29.99]:45918 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231630AbhFXHbT (ORCPT ); Thu, 24 Jun 2021 03:31:19 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id 2BB806023B; Thu, 24 Jun 2021 07:29:01 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1624519741; bh=QvbfkFPqbdVYI2vQ6XJWPcJ3DP/t0747GD4/aq152Ds=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=NQPdZDQNFuGEbjdQjMpBp52gSF8RYN7JkDmaNLFSgITt0rc4oe86gnuIyz8RUXi24 dLdbOCvL8mAeu68VSWfHTxEfQiAfYlnQQqDQk13waEQp48C4h6BSDIzQctpYFec4JM Ays/+XtWg6B7eO0nx7Lndk6zUFa2et7+/YxSIVKIo1cBhT6+gx6LvPPmEpTJgNcf8F bebRFbhPHbkyfHNzPx2BMD8xWoMrW+pPeINVixvQwB3G+pPB2b+IliMmHbXYrLNLXa 1jlVu/Fe/RDOpjM/4i98s2UCwZo1VZmv6ihpxWw28TSJgV5GMqKd6/a5ec2rCuE9Ai l2ZUQ9CyDp2Zw== Received: from johan by xi.lan with local (Exim 4.94.2) (envelope-from ) id 1lwJnH-0005cY-BJ; Thu, 24 Jun 2021 09:29:00 +0200 Date: Thu, 24 Jun 2021 09:28:59 +0200 From: Johan Hovold To: Stefan =?utf-8?B?QnLDvG5z?= Cc: Greg Kroah-Hartman , linux-usb@vger.kernel.org, linux-kernel@vger.kernel.org, Daniele Palmas , =?utf-8?B?QmrDuHJu?= Mork Subject: Re: [PATCH v2] USB: serial: qcserial: Support for SDX55 based Sierra Wireless 5G modules Message-ID: References: <20210611134507.8780-1-stefan.bruens@rwth-aachen.de> <20210611135842.14415-1-stefan.bruens@rwth-aachen.de> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <20210611135842.14415-1-stefan.bruens@rwth-aachen.de> Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org [ +CC: Daniele and Bjørn ] On Fri, Jun 11, 2021 at 03:58:41PM +0200, Stefan Brüns wrote: > The devices exposes two different interface compositions: > - QDL mode, single interface > - MBIM mode, MBIM class compliant plus AT/DM(/ADB) > > Current firmware versions (up to 01.07.19) do not expose an NMEA port. We already have at least one SDX55 based modem (FN980) supported by the option driver. Any particular reason why you chose to add it to qcserial instead of option? Note that the FN980 also needs the ZLP flag set in QDL (flashing) mode, I'd assume this one needs it too. Could you please also post the output of usb-devices (or lsusb -v) for this device in MBIM mode? > Signed-off-by: Stefan Brüns > --- > drivers/usb/serial/qcserial.c | 29 +++++++++++++++++++++++++++++ > 1 file changed, 29 insertions(+) > > diff --git a/drivers/usb/serial/qcserial.c b/drivers/usb/serial/qcserial.c > index 83da8236e3c8..4ff325a14c98 100644 > --- a/drivers/usb/serial/qcserial.c > +++ b/drivers/usb/serial/qcserial.c > @@ -26,12 +26,15 @@ enum qcserial_layouts { > QCSERIAL_G1K = 1, /* Gobi 1000 */ > QCSERIAL_SWI = 2, /* Sierra Wireless */ > QCSERIAL_HWI = 3, /* Huawei */ > + QCSERIAL_SWI2 = 4, /* Sierra Wireless */ > }; > > #define DEVICE_G1K(v, p) \ > USB_DEVICE(v, p), .driver_info = QCSERIAL_G1K > #define DEVICE_SWI(v, p) \ > USB_DEVICE(v, p), .driver_info = QCSERIAL_SWI > +#define DEVICE_SWI2(v, p) \ > + USB_DEVICE(v, p), .driver_info = QCSERIAL_SWI2 > #define DEVICE_HWI(v, p) \ > USB_DEVICE(v, p), .driver_info = QCSERIAL_HWI > > @@ -181,6 +184,10 @@ static const struct usb_device_id id_table[] = { > {DEVICE_SWI(0x413c, 0x81d1)}, /* Dell Wireless 5818 */ > {DEVICE_SWI(0x413c, 0x81d2)}, /* Dell Wireless 5818 */ > > + /* SDX55 based Sierra Wireless devices */ > + {DEVICE_SWI2(0x1199, 0x90d2)}, /* Sierra Wireless EM919x QDL */ > + {DEVICE_SWI2(0x1199, 0x90d3)}, /* Sierra Wireless EM919x */ > + > /* Huawei devices */ > {DEVICE_HWI(0x03f0, 0x581d)}, /* HP lt4112 LTE/HSPA+ Gobi 4G Modem (Huawei me906e) */ > > @@ -359,6 +366,28 @@ static int qcprobe(struct usb_serial *serial, const struct usb_device_id *id) > break; > } > break; > + case QCSERIAL_SWI2: > + /* > + * Sierra Wireless SDX55 in MBIM mode: > + * 0/1: MBIM Control/Data > + * 3: AT-capable modem port > + * 4: DM/DIAG (use libqcdm from ModemManager for communication) > + * 5: ADB > + */ > + switch (ifnum) { > + case 3: > + dev_dbg(dev, "Modem port found\n"); > + sendsetup = true; > + break; > + case 4: > + dev_dbg(dev, "DM/DIAG interface found\n"); > + break; > + default: > + /* don't claim any unsupported interface */ > + altsetting = -1; > + break; > + } > + break; > case QCSERIAL_HWI: > /* > * Huawei devices map functions by subclass + protocol Johan