Received: by 2002:a05:6a10:af89:0:0:0:0 with SMTP id iu9csp1418368pxb; Wed, 12 Jan 2022 14:25:20 -0800 (PST) X-Google-Smtp-Source: ABdhPJxnGn9eI3Tofthh7v0ruFNytJt8y3xBrzjWft8MQK7YtEts05yaIgPsiyPvjSMppqd0gBK9 X-Received: by 2002:a17:906:5414:: with SMTP id q20mr1344859ejo.731.1642026320738; Wed, 12 Jan 2022 14:25:20 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1642026320; cv=none; d=google.com; s=arc-20160816; b=ithe/1jDxVotnCWNAx+1CnsgOlIopmWMI+M/SD/knhz9dHwMZXbc1wozWePAF8bfEg wuUkhvunkwhhYrTH76raH9CCi+3/Tlb7WavMhQMtab/oJ1z0qu71bu+rLK3SeQRW6S+R yBO7GME86LuXjyA7uZS0lXFafqmO8NKqAfxoEOzvHftuu7RuCkQ6h0LrVXZoDUnjqjAx D3UalLJJJ3+fR0drkPUGcGY2oIQt9Jym+2DvK7VjbeWjhaTdo3mQ/SbulyktG2hguIIR o8XZGrxP9pGcG7ijv2ughf5qk5fTex7eznONBsRFoLHg7s0mfhwlXK6yrEqNHp6ZZ+Xs prmw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:in-reply-to:references :cc:to:from:content-language:subject:user-agent:mime-version:date :message-id:dkim-signature; bh=3SDZIFuhe0uISqv7b+/3Al40qedudpfYpA+c+2BcXSk=; b=h/AX2S18FIqlZb4y/Klt/C/Tk5Y9gf96ZpTYKDZzeJK8PUNBls5+aEmm3w+Rm6wBY7 J720IpemDvHa1xuJbTmSh9CA98qAOQUzOkm19v66jyTg04kzWj+h7z+DVgeKyahNEvqk E6Wxoic37HiaXhAfW9RYYNeCU+CmDy0fCxzsaQ+D4M6mWUtfN18x+lc2HOpDbDPoruZq zHum4NChJnDeH6Gd5SAsYhNN4/j6NC9jOZTUPPy3Fio7O9L19WyP2xTtO6sc4b1v17To DzMniU5/JH2KnH/4VXrDPnTHcPuUdkT7NLdN9r2B3fjs8N2HaeNAB5w02SjLLzhO61lV NDJQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=JvMtXGOE; spf=pass (google.com: domain of linux-wireless-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-wireless-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id sh10si455100ejc.599.2022.01.12.14.25.03; Wed, 12 Jan 2022 14:25:20 -0800 (PST) Received-SPF: pass (google.com: domain of linux-wireless-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=@intel.com header.s=Intel header.b=JvMtXGOE; spf=pass (google.com: domain of linux-wireless-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-wireless-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1350703AbiALE3d (ORCPT + 71 others); Tue, 11 Jan 2022 23:29:33 -0500 Received: from mga01.intel.com ([192.55.52.88]:13698 "EHLO mga01.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1350698AbiALE3c (ORCPT ); Tue, 11 Jan 2022 23:29:32 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1641961772; x=1673497772; h=message-id:date:mime-version:subject:from:to:cc: references:in-reply-to:content-transfer-encoding; bh=8Zd1Q5NzsO2AMYuW95wPeJM27wv0QIzvMoy7RYnSqa4=; b=JvMtXGOE661sZLc2+0WIyEruZUkzTvqIS2De5VvTlzFNvoohAaCObcoZ XcUTO3lDavEVdBCYJic6Qe8I1JNJLXZbYKlyqBBbE7E16c4h9ZPplfDA4 VmTaXQhSSzivwjwM9Y0gV3kOl1jck3TpL8q4Cw64jHCT0qOH2nuWHTtdz x04/Xu28xspuLgriTquQWrxwhmpiGHP1/cqhzZbps40VGPnP8DuA1fFKM y+u1BEXJGMCREEMgeMMrwdgkbEFpCVOY0b1+vQinFlIvOFsYOZECUmWdD OxpVwzExS0tyTYugCQWPYa9EHXO0IvtK/UWimkufAjXI4G3BwyeS+pd9t Q==; X-IronPort-AV: E=McAfee;i="6200,9189,10224"; a="267998946" X-IronPort-AV: E=Sophos;i="5.88,281,1635231600"; d="scan'208";a="267998946" Received: from orsmga002.jf.intel.com ([10.7.209.21]) by fmsmga101.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 11 Jan 2022 20:29:31 -0800 X-IronPort-AV: E=Sophos;i="5.88,281,1635231600"; d="scan'208";a="490616783" Received: from rmarti10-mobl2.amr.corp.intel.com (HELO [10.212.140.183]) ([10.212.140.183]) by orsmga002-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 11 Jan 2022 20:29:31 -0800 Message-ID: Date: Tue, 11 Jan 2022 20:29:10 -0800 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:91.0) Gecko/20100101 Thunderbird/91.4.0 Subject: Re: [PATCH v2 06/14] net: wwan: t7xx: Add AT and MBIM WWAN ports Content-Language: en-US From: "Martinez, Ricardo" To: Sergey Ryazanov Cc: netdev@vger.kernel.org, linux-wireless@vger.kernel.org, Jakub Kicinski , David Miller , Johannes Berg , Loic Poulain , M Chetan Kumar , chandrashekar.devegowda@intel.com, Intel Corporation , chiranjeevi.rapolu@linux.intel.com, haijun.liu@mediatek.com, amir.hanania@intel.com, Andy Shevchenko , dinesh.sharma@intel.com, eliot.lee@intel.com, mika.westerberg@linux.intel.com, moises.veleta@intel.com, pierre-louis.bossart@intel.com, muralidharan.sethuraman@intel.com, Soumya.Prakash.Mishra@intel.com, sreehari.kancharla@intel.com, suresh.nagaraj@intel.com References: <20211101035635.26999-1-ricardo.martinez@linux.intel.com> <20211101035635.26999-7-ricardo.martinez@linux.intel.com> In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org Hi Sergey, On 12/6/2021 6:41 PM, Martinez, Ricardo wrote: > > On 12/1/2021 12:45 PM, Sergey Ryazanov wrote: >> Hello Ricardo, >> >> On Wed, Dec 1, 2021 at 9:14 AM Martinez, Ricardo >> wrote: >>> On 11/9/2021 4:06 AM, Sergey Ryazanov wrote: >>>> On Mon, Nov 1, 2021 at 6:57 AM Ricardo Martinez wrote: >>>>> ... >>>>>    static struct t7xx_port md_ccci_ports[] = { >>>>> +       {CCCI_UART2_TX, CCCI_UART2_RX, DATA_AT_CMD_Q, >>>>> DATA_AT_CMD_Q, 0xff, >>>>> +        0xff, ID_CLDMA1, PORT_F_RX_CHAR_NODE, &wwan_sub_port_ops, >>>>> 0, "ttyC0", WWAN_PORT_AT}, >>>>> +       {CCCI_MBIM_TX, CCCI_MBIM_RX, 2, 2, 0, 0, ID_CLDMA1, >>>>> +        PORT_F_RX_CHAR_NODE, &wwan_sub_port_ops, 10, "ttyCMBIM0", >>>>> WWAN_PORT_MBIM}, >>>>> ... >>>>> +               if (count + CCCI_H_ELEN > txq_mtu && >>>>> +                   (port_ccci->tx_ch == CCCI_MBIM_TX || >>>>> +                    (port_ccci->tx_ch >= CCCI_DSS0_TX && >>>>> port_ccci->tx_ch <= CCCI_DSS7_TX))) >>>>> +                       multi_packet = DIV_ROUND_UP(count, txq_mtu >>>>> - CCCI_H_ELEN); >>>> I am just wondering, the chip does support MBIM message fragmentation, >>>> but does not support AT commands stream (CCCI_UART2_TX) fragmentation. >>>> Is that the correct conclusion from the code above? >>> Yes, that is correct. >> Are you sure that the modem does not support AT command fragmentation? >> The AT commands interface is a stream of chars by its nature. It is >> designed to work over serial lines. Some modem configuration software >> even writes commands to a port in a char-by-char manner, i.e. it >> writes no more than one char at a time to the port. >> >> The mechanism that is implemented in the driver to split user input >> into individual messages is not a true fragmentation mechanism since >> it does not preserve the original user input length. It just cuts the >> user input into individual messages and sends them to the modem >> independently. So, the modem firmware has no way to distinguish >> whether the user input has been "fragmented" by the user or the >> driver. How, then, does the modem firmware deal with an AT command >> "fragmented" by a user? Will the modem firmware ignore the AT command >> that is received in the char-by-char manner? > > The modem supports char-by-char AT command over serial lines, I'll get > more information > > about why splitting long commands is supported only for MBIM and not > for AT commands. > The next version will allow AT command fragmentation as there is modem is able to handle fragments as you pointed out. This will make the WWAN Tx callback a bit simpler.