Received: by 2002:a05:7412:31a9:b0:e2:908c:2ebd with SMTP id et41csp2960598rdb; Tue, 12 Sep 2023 19:00:05 -0700 (PDT) X-Google-Smtp-Source: AGHT+IFlKVkMact4mR4xcHMczlkyL7QgnmXMfklOBSx5/l1jKpO0+i+7wGcSbyAXcPEDtRHN0P/u X-Received: by 2002:a05:6808:3247:b0:3a9:e8e2:579d with SMTP id cc7-20020a056808324700b003a9e8e2579dmr1362177oib.2.1694570405161; Tue, 12 Sep 2023 19:00:05 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1694570405; cv=pass; d=google.com; s=arc-20160816; b=lUvRuj8w5nSWr7BWmHHd9Xe77QZgB2+KXVZvc/GDq8s/PXMcNIO3AQFxrhYCSaqQKB fWo/adDku8WFqpsgUvFPLzovhyhTMAgCInmy5ayftDERSyVOFT9wALMu6sDNjw1L/Q5u T3BWzUYyrhrFqRSJnohWhuvlEgKTTRuFwEiu+x526/ZFDh243Gk2bpLAIFHbYL23A35N gTy/BQ39nOnrqXadm5LrH9VpatpNmF+PXsQIVXc9gN3GvM4JIAk9GcmTAOW1rz+Lz3Bv ZN3c8hjMkwSYw6xOzD0uRT+2V0kHgi8XrRwUhpvdLlGkw6EB5tWoDTSIZLdORKakAp/2 TJFg== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:content-transfer-encoding :in-reply-to:from:references:cc:to:content-language:subject :user-agent:date:message-id:dkim-signature:dkim-signature; bh=GZ7AlKkGk4VuQgUFVxzBmP/3+9s6PD/Z+F2CzF22Vw0=; fh=77kX8h1P+/8/a9mDAQB8U2tyt67SPB3X/B3yXNWlzRk=; b=kuumhhkkDYxVW53dWhfknZ6GQy8VfEBejp4UGox1faYk+JYoJKbGvyzXufcqyrumdt VsMgA9NXWdxB3n0om9YbTQlaDiVBmSsEOpeRzHY0KoUvzMMTDNgpWc77ygQzIziCbbZv jr1irAopwXB72ovSE5AiuppHgDuUPduPgxgQcIw1XYDxqOk3NhqVfbaxgyazCI5Qd4WD WgFWSj82yOmHG+EDVJDENn0Zk3Oq6wWQTs66ijNvaaW3L7+3B0fDU0RSdH9MmFGahmrh cmUBsw5acy+ClviGj702wKGVylyZ/04qD2BEwR0+UwhoLdMybH9o8/Cw7H4scNIXfFUK ws3Q== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass (test mode) header.i=@axis.com header.s=axis-central1 header.b=i+EmgPwk; dkim=pass header.i=@axis.com header.s=selector1 header.b=OmrV37be; arc=pass (i=1 spf=pass spfdomain=axis.com dkim=pass dkdomain=axis.com dmarc=pass fromdomain=axis.com); spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.37 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=axis.com Return-Path: Received: from snail.vger.email (snail.vger.email. [23.128.96.37]) by mx.google.com with ESMTPS id 63-20020a630142000000b00565d4a437b5si8988185pgb.631.2023.09.12.18.59.57 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 12 Sep 2023 19:00:05 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.37 as permitted sender) client-ip=23.128.96.37; Authentication-Results: mx.google.com; dkim=pass (test mode) header.i=@axis.com header.s=axis-central1 header.b=i+EmgPwk; dkim=pass header.i=@axis.com header.s=selector1 header.b=OmrV37be; arc=pass (i=1 spf=pass spfdomain=axis.com dkim=pass dkdomain=axis.com dmarc=pass fromdomain=axis.com); spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.37 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=axis.com Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by snail.vger.email (Postfix) with ESMTP id 0A00481BDF3F; Tue, 12 Sep 2023 00:44:46 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.8 at snail.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231748AbjILHoh (ORCPT + 99 others); Tue, 12 Sep 2023 03:44:37 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:45762 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230366AbjILHoh (ORCPT ); Tue, 12 Sep 2023 03:44:37 -0400 Received: from smtp2.axis.com (smtp2.axis.com [195.60.68.18]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 50874E73; Tue, 12 Sep 2023 00:44:32 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=axis.com; q=dns/txt; s=axis-central1; t=1694504673; x=1726040673; h=message-id:date:subject:to:cc:references:from: in-reply-to:content-transfer-encoding:mime-version; bh=GZ7AlKkGk4VuQgUFVxzBmP/3+9s6PD/Z+F2CzF22Vw0=; b=i+EmgPwkFqWR7TU00gyzaSbK5yk1u5TJFEf6g+M89mFz/z6mHqdHpMOM 78CMB7DsbizFyBrM53Idh28QvmO8w6aDf4dwEEgvpiWx+c9qJgeEULZ2L N6KVCUnkDRNrjv6Qmzgc/UwSo+gkOGn+kQ/83opDEw0pZi+y1JTEz2k76 rOD/FDLGbqO++/BJhs6ljZ1a5T+HG6k5SdmFyznP28oF5y+PWBFPlWIfC 544h2IuCPCQ26krLtlnD5DHW8yXeHl9bbelCQp8sdAPw3UOec9MUuEKxZ QvCjpwlWDr8V9CmosGZ3w35GrZVSX73/fXda2BhgQFLz5blZ3j/X3lrEZ w==; ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=BxXnc5jRxKMGUbuyrzZ2oXNiO+q7P/4I6nWuru9PZlhyzl4krFxzemZp3LpwWtKhGhUnC9SHBNSaJaEb2VfqoXVQxj3JlDQfUIf41AfJ3kZuG1TFaR0uM84YTaVj3bzreyMfuDJxD9y3RVnfpDtKfbRPBC8Ymo/9waiNRYvmhAqWGtIsfdhtjn71af3y2gdkEsTxVYYuiOIKiuCVu1OFXzLtcd1OP0WhLF7gxZ6M1tQknRrr3bIy+HhZYt5fO8zhl4LAGxY0LJu76YWn3CW8CQorX62lRL8jXNj2Z6Ssw5AmpYX8Tkv7yi9e/Dd/BTOEnExYggUmLlK+ugTnmRM19Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=GZ7AlKkGk4VuQgUFVxzBmP/3+9s6PD/Z+F2CzF22Vw0=; b=F0Rju5AoCMkAMWygVfebdyhomGTWozbZHU1tjRNEu8HWbpGgNf3qwCGLvhPQrmqfIY4OtfAmfRYWkXy6lQjvS/Fq3I9qEZj2uwqys2sX/x2PHMfnu75e6T+ZBY3j/k+jdiKXSSSSgGujhje0v4WJkYHFlwhr+WV8HcGZZ/Lub1jRtBKuxpLwq9zBW1grQ/T7EFYOa2mDAmubMXjTZoEfdT0qfUL91McoFfggmklQztN98cIeSd+pMXoOD3UhewcWMuqX98s7zIFPZnF3puHbUL7qZLNqndk1PNP26xv/Bu3wvT+V04TOclH4SVKdhWxldK34LGZ5QQC18suWspcJ8w== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=axis.com; dmarc=pass action=none header.from=axis.com; dkim=pass header.d=axis.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=axis.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=GZ7AlKkGk4VuQgUFVxzBmP/3+9s6PD/Z+F2CzF22Vw0=; b=OmrV37beGjwy6ooYKMsXPfZITC6H3C++JVEJj4HdgIviX+mzOH5hzQCBhr7nyqvi/dYKFXCWBhv26OgTnWEFmKSmuyuiq4PIa2FlsSSkPd6+yOaB3sJc0FoUYZhw3I6wdhTQyGlAqxfBojLOaC4cALHjDDeqeclfFIMxyH838e4= Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=axis.com; Message-ID: <42522712-b739-3db4-9111-a4b378a65809@axis.com> Date: Tue, 12 Sep 2023 09:44:26 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.14.0 Subject: Re: [PATCH net-next] qmi_wwan: Add rawip module param Content-Language: sv-FI To: =?UTF-8?Q?Bj=c3=b8rn_Mork?= CC: "David S. Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , , , , References: <20230912-qmiraw-v1-1-21bc812fa0cf@axis.com> <87a5tramab.fsf@miraculix.mork.no> From: Stefan x Nilsson In-Reply-To: <87a5tramab.fsf@miraculix.mork.no> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit X-ClientProxiedBy: MM0P280CA0104.SWEP280.PROD.OUTLOOK.COM (2603:10a6:190:9::21) To DB5PR02MB10072.eurprd02.prod.outlook.com (2603:10a6:10:48b::20) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: DB5PR02MB10072:EE_|DU0PR02MB7923:EE_ X-MS-Office365-Filtering-Correlation-Id: cf8dc042-de61-43b5-5120-08dbb36417fc X-LD-Processed: 78703d3c-b907-432f-b066-88f7af9ca3af,ExtAddr X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: PZrPk0UNshAQwSEUBBvjJKhN8qPAlynKIZo2pKsB0Ei3Y4ann/+H+CGPy1CtWj6ctNxDXLGXIOA6rHZDttj09nBDiNwwd0oHzOk9gxNWMYIUeML4YThqCDZsgHrxs3OVGsS4TfEymji3Gw9Bat233Y7H1gvioQQAiRHM9W3zPhNJfZZiW3Re4Myi+BMevZgKfM7VEKNZ/j7mX+q6/eKRZv9USS0X7vXKA7r1K+zPo8nZ/IcZ48M5a6V6W3bZzr9J2ECe7U5HnBroq4OQknB7tKtgT3Cmvx83QYgNytRS4hBSpf81hVmH8CWHWYiVGu6E/5k0O6zH2zgFDNZTV437Fpja1WEPXLKzssTCscI1KVia/rx6JDxBrzVVcqzqm2R4I+W2F3FrF7CUrzLb/0LhAKso882Prmbp0/0PncsPXnoTtk0lfnigW/rfisjVMQ205Z7D2YzZ/OmAY/58yfrsbjrlbk+axObj2gonELZHYa3MT0lOueTxC0E3pBtHYN4dFXdcsxtGOj2SV2zHSjZqoUn/KCyslFF6AnFWYi8oaJ38kdLjYtVSn+SnIZ/LSy2wi1eeBMNG+dlSOM68itEHYmiBVh9CfmaOLP9d467goStkjpZOuBpCQviHCIsg8JqSd7CgepQAkZCTripz1AjlVQ== X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:DB5PR02MB10072.eurprd02.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230031)(376002)(39860400002)(346002)(396003)(366004)(136003)(1800799009)(186009)(451199024)(2906002)(31696002)(478600001)(86362001)(2616005)(26005)(53546011)(36756003)(6486002)(6506007)(6512007)(107886003)(83380400001)(38100700002)(66574015)(4326008)(41300700001)(8676002)(8936002)(6916009)(66946007)(66476007)(66556008)(5660300002)(316002)(31686004)(54906003)(45980500001)(43740500002);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?B?TDZNczBvUGJ6K1BuWGRYTHdmaGdhSVJISWpZN1R4ZUVEQzNxS0tjeGpqSk9p?= =?utf-8?B?dnZnamVNSHRFanB3eTAxQ1lzdGxDSG1iZlYxbklTOTIyWFlpZGlWTVpXeXdT?= =?utf-8?B?QjJxblVkbGFUelExalN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?eDR1MHduOWRpVFEyc0M0am8zVDVseGRrTDdCSklHVU5LSFBPZkVOK2svZmY1?= =?utf-8?B?MlpHOGNWTSt3SkN3ZnM5QS9hM0V1UmtPSDMvNHROWTc4eEFkS1lUUDJRUjc5?= =?utf-8?B?VU1TM3FML1RPaEtFMjNxWmJiUUYwUGVUT3o0eVQ1TU9wM3hBbmhFVkJXc2c3?= =?utf-8?Q?67z/cPVVPvC8UBmiKDeX1RKg3?= X-MS-Exchange-CrossTenant-Network-Message-Id: cf8dc042-de61-43b5-5120-08dbb36417fc X-MS-Exchange-CrossTenant-AuthSource: DB5PR02MB10072.eurprd02.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 12 Sep 2023 07:44:28.4816 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 78703d3c-b907-432f-b066-88f7af9ca3af X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: Cdec9SfJuucQ9pk7qDovwOarjpQQI9EHOFQBNaHb6PQesqZTUmYsZtZuBYO3zCSQLm6NgjnX5ADcWa2oMeJccA== X-MS-Exchange-Transport-CrossTenantHeadersStamped: DU0PR02MB7923 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 (snail.vger.email [0.0.0.0]); Tue, 12 Sep 2023 00:44:46 -0700 (PDT) On 9/12/23 09:22, Bjørn Mork wrote: > 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 >> */ >> >> +/* 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 = &qmi_wwan_netdev_ops; >> dev->net->sysfs_groups[0] = &qmi_wwan_sysfs_attr_group; >> + >> + /* Set the driver into rawip mode if requested by module param */ >> + if (rawip_as_default) { >> + info->flags |= 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ørn Right, got the message and I see your point. Thanks for the review. Would a quirk on the affected modem be an better/acceptable solution? Best Regards Stefan x Nilsson