Received: by 2002:a05:7412:31a9:b0:e2:908c:2ebd with SMTP id et41csp2464080rdb; Tue, 12 Sep 2023 02:42:53 -0700 (PDT) X-Google-Smtp-Source: AGHT+IHueXHt37YJqH/ngrN6bxl1sEsQ4HYUCAz8QwxLY934FBr3UeZael3Xh267f+C0v0AQiURH X-Received: by 2002:a05:6808:d:b0:3a9:9bb6:811 with SMTP id u13-20020a056808000d00b003a99bb60811mr12212960oic.57.1694511773240; Tue, 12 Sep 2023 02:42:53 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1694511773; cv=none; d=google.com; s=arc-20160816; b=1IZeuUiLQli0o/Qqk7rp8hC8/pSgfSwXKf/M8/TrOFs6CcDL70NtpCMtC+xpcgmSsO boqXaBlY90eB7xw6HHl6Pqi0oxg45u1ZX5XaypfXqtxkYj75nPpa9CDhlrDzMCUS3z+W OPZJjegAzO5RBRDugGYMdv0HkqyZgLA78rjF1JF1+IvDaddZAHq8SP1ZwNQuXd8x03na 7tsD1yGc4pbVdep4ENnF1ApJlpRTcAMOFldvfYomz2ERtNCLzs+SgmalRq+rEWZzHoFZ fSTTlIWf/Lfz/Yyk+tlcxDbxmpeTYRBVz6qen6T+k2vCMQBJP84ap8/7wrDoZ8UA4W1J /TFQ== 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=2F4nqnLzYY063JtRlfe21BiVQR+M9A0W69yALeokWvs=; fh=bhsjwh4N4NgE6wmbOtGRfhF7ztUuuJoPC748ccVPcxM=; b=t3h19HbBkHXb8duI05paemy0LHEdX6jKu5md5kOYUPtgvtipuizcZGnT74pMGszNrD Dz137RGCcXVMZfIDTQ/DjNkaJf4BHg0xZ+HnbQn6K/f0C1OaIswF+akWxDeHmLgNzs0y TUKqintTVQ2Onq5h95QHpZIpKzr/8LABrQnbnmgwLMTKz7wCfOsovQEYUlMM/nYAMJVt R/OCa0HeCOGeBgRnhfjYq7ba6GvxsW4qmL4n3bkRR5dFvyGqx7zVPyhb9figGMeZxW6k kNDDfxYq5krBN4zi27GY+GxO5S34sU06R5w3tes2fpel5Mlt9q0QHBv2PMyIQTqGkj1p d7LQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@mork.no header.s=b header.b=ImO84iC6; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.38 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 fry.vger.email (fry.vger.email. [23.128.96.38]) by mx.google.com with ESMTPS id r15-20020a638f4f000000b005776adde96csi3691542pgn.403.2023.09.12.02.42.47 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 12 Sep 2023 02:42:53 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.38 as permitted sender) client-ip=23.128.96.38; Authentication-Results: mx.google.com; dkim=pass header.i=@mork.no header.s=b header.b=ImO84iC6; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.38 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=mork.no Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by fry.vger.email (Postfix) with ESMTP id 16A2E810F6C2; Tue, 12 Sep 2023 00:37:28 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at fry.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231681AbjILHhP (ORCPT + 99 others); Tue, 12 Sep 2023 03:37:15 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:45518 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231663AbjILHhO (ORCPT ); Tue, 12 Sep 2023 03:37:14 -0400 X-Greylist: delayed 848 seconds by postgrey-1.37 at lindbergh.monkeyblade.net; Tue, 12 Sep 2023 00:37:09 PDT Received: from dilbert.mork.no (dilbert.mork.no [IPv6:2a01:4f9:c010:a439::d]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 9CECBE78; Tue, 12 Sep 2023 00:37:09 -0700 (PDT) Received: from canardo.dyn.mork.no ([IPv6:2a01:799:964:4b04:3697:f6ff:fe5d:314]) (authenticated bits=0) by dilbert.mork.no (8.17.1.9/8.17.1.9) with ESMTPSA id 38C7MVW12686926 (version=TLSv1.3 cipher=TLS_AES_256_GCM_SHA384 bits=256 verify=OK); Tue, 12 Sep 2023 08:22:32 +0100 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=mork.no; s=b; t=1694503346; bh=2F4nqnLzYY063JtRlfe21BiVQR+M9A0W69yALeokWvs=; h=From:To:Cc:Subject:References:Date:Message-ID:From; b=ImO84iC69OmMNjz2XpsjCSFqwkSdAB0J5JaPvmubDiDVxqddiQYjA5MauV3Y1SWF9 rcl7MTArjTrz3lLDAAI04uRAhj8fi0bNmoWWhph7hqnaf4xPfTd15MnbckYbb2LVFd OsCl7iAc28X79JgRlCeTPEp+0XGVNQ6fQToaLRnw= Received: from miraculix.mork.no ([IPv6:2a01:799:10e0:8300:13c:9450:7f1:fd90]) (authenticated bits=0) by canardo.dyn.mork.no (8.17.1.9/8.17.1.9) with ESMTPSA id 38C7MPUc110735 (version=TLSv1.3 cipher=TLS_AES_256_GCM_SHA384 bits=256 verify=OK); Tue, 12 Sep 2023 09:22:25 +0200 Received: (nullmailer pid 135215 invoked by uid 1000); Tue, 12 Sep 2023 07:22:20 -0000 From: =?utf-8?Q?Bj=C3=B8rn_Mork?= To: Stefan x Nilsson Cc: "David S. Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , , , , Subject: Re: [PATCH net-next] qmi_wwan: Add rawip module param Organization: m References: <20230912-qmiraw-v1-1-21bc812fa0cf@axis.com> Date: Tue, 12 Sep 2023 09:22:20 +0200 In-Reply-To: <20230912-qmiraw-v1-1-21bc812fa0cf@axis.com> (Stefan x. Nilsson's message of "Tue, 12 Sep 2023 09:04:13 +0200") Message-ID: <87a5tramab.fsf@miraculix.mork.no> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.2 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Virus-Scanned: clamav-milter 1.0.1 at canardo X-Virus-Status: Clean Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (fry.vger.email [0.0.0.0]); Tue, 12 Sep 2023 00:37:28 -0700 (PDT) X-Spam-Status: No, score=-0.9 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on fry.vger.email Stefan x Nilsson writes: > Certain QMI modems will start communicating in rawip mode after > bootup, and will not work properly if communication starts off in > ethernet mode. So add a module parameter, rawip_as_default, that > can be used to load the qmi driver in rawip mode. > > The advantage compared to changing rawip at a later point using > sysfs is that the os will not detect the device and start talking > to it while the driver is still in incorrect mode. > > Signed-off-by: Stefan x Nilsson > --- > drivers/net/usb/qmi_wwan.c | 11 +++++++++++ > 1 file changed, 11 insertions(+) > > diff --git a/drivers/net/usb/qmi_wwan.c b/drivers/net/usb/qmi_wwan.c > index 344af3c5c836..968c60ececf8 100644 > --- a/drivers/net/usb/qmi_wwan.c > +++ b/drivers/net/usb/qmi_wwan.c > @@ -46,6 +46,10 @@ > * commands on a serial interface > */ >=20=20 > +/* Module parameters */ > +static bool rawip_as_default; > +module_param(rawip_as_default, bool, 0644); > + > /* driver specific data */ > struct qmi_wwan_state { > struct usb_driver *subdriver; > @@ -843,6 +847,13 @@ static int qmi_wwan_bind(struct usbnet *dev, struct = usb_interface *intf) > } > dev->net->netdev_ops =3D &qmi_wwan_netdev_ops; > dev->net->sysfs_groups[0] =3D &qmi_wwan_sysfs_attr_group; > + > + /* Set the driver into rawip mode if requested by module param */ > + if (rawip_as_default) { > + info->flags |=3D QMI_WWAN_FLAG_RAWIP; > + qmi_wwan_netdev_setup(dev->net); > + } > + > err: > return status; > } > NAK There is no reason to start communicating with the device before changing the framing, using the existing sysfs interface. This seems to be a workaround for some userspace bug. I don't think we yet another userspace knob for that. And certainly not one that applies to every device. Bj=C3=B8rn