Received: by 2002:a25:e7d8:0:0:0:0:0 with SMTP id e207csp735395ybh; Tue, 10 Mar 2020 07:20:12 -0700 (PDT) X-Google-Smtp-Source: ADFU+vvi+boqeubPL/HWWkQdI/oT/EeLooJHe2Pg3GzT0ZB9awcqrAuHOSIeX8Qopm4WwQy25r84 X-Received: by 2002:a05:6830:1645:: with SMTP id h5mr17668590otr.317.1583850012476; Tue, 10 Mar 2020 07:20:12 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1583850012; cv=none; d=google.com; s=arc-20160816; b=D5VJLCyfyNavQ2xNp45qkTIJ9CfRS+H2k8Zefom3u3nGf9UcOxuI1JK24rj7iVFlTc aRviKgFM1ypi6+OvSfWSwGViVkGBQXtg53x5cn0/93VbtEFAcbjrJlcWExpkVg4U9UIA tkRvFVKARYEXB7cLIRCSnTr+JJBG4s7JWCIPG65gfml2c3D4TFGC7j3axurmuqhFEWg1 ZjFoRwgaM9C0FyeTi3RVUTLYIzWY4O1FgRz1QJVplEbG6puUgwERYseQFmJZD8JBfY/X FhxFpTdFp8CZLZ/8KdbBvIceozLG/5+Gxs4wQWtPuKh+r67tvNJ+cvksiF9E0xpNP2Sx n3VQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:cc:to:subject :message-id:date:from:in-reply-to:references:mime-version :dkim-signature; bh=/gHw4kLrEIsmI95qZ6nhMGzekL5ir6AYQAFylshVC6Q=; b=gFrXe/iXLJGY6hdRBDXtPraC60qPQjsXJu9fPKYfSk5KP+ZYmxK9CNgFpV4nBxH++2 Ea/dalh0jCd3IZ4PcHLUwmo9mmATq2XVpktDbf6kb0o+xVBetarxlVlaCTiuUMWZayjS z/SkMYEfqNYEOzxKQ7iEVD+ECoIiwUEwLBBpEdztwtpcqnKdkXrKAL2vmWX+Zd+cNCd6 gbsU5zQkUQTcYsYwU+CEhmTfiKmpgNVQ7uiZZ8VU3o5MOLHWDnVlnmd1lRqVU76/BtMY pdgASeO5B/7fOX2VO5I0V4BFMGa8R/ww8/R6WiQjW1042xmogQ+xeEaZ7BULFgVavTGA 3CnQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@hackerdom.ru header.s=google header.b=A8T824hj; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id k201si4360853oib.94.2020.03.10.07.19.51; Tue, 10 Mar 2020 07:20:12 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@hackerdom.ru header.s=google header.b=A8T824hj; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727426AbgCJOSI (ORCPT + 99 others); Tue, 10 Mar 2020 10:18:08 -0400 Received: from mail-vs1-f43.google.com ([209.85.217.43]:42091 "EHLO mail-vs1-f43.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727408AbgCJOSI (ORCPT ); Tue, 10 Mar 2020 10:18:08 -0400 Received: by mail-vs1-f43.google.com with SMTP id i25so4700937vsq.9 for ; Tue, 10 Mar 2020 07:18:07 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=hackerdom.ru; s=google; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc:content-transfer-encoding; bh=/gHw4kLrEIsmI95qZ6nhMGzekL5ir6AYQAFylshVC6Q=; b=A8T824hjR5N/p3t3GhfyJAVPoTfJqcp3OKdDgsbiK4SGctpaKlRRUyHCbbGcv75bXL NXldU72tYY2nGR+YAXp2X2rq2Lr36BCeFqvZ2fOj5xB+/8i1GGsXNYRJXkuLK8k1cPg5 ca15KLiVc/ILC9E0Br8QiADrxu7F4lAJojt4Q= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc:content-transfer-encoding; bh=/gHw4kLrEIsmI95qZ6nhMGzekL5ir6AYQAFylshVC6Q=; b=fQVctznMXoAQm9xToeoS4lyL3XPtGlu0EV+MpOamxDEGu/iWo+reHqAmLRiGJdZsRY 0ZvHUOT0+ARARak8f8BxyTLG+LUM88X038sdOC15OoB1v6CZh85KgeCchXV9N1TJ6Rqk ia/vUHZHt1Bu3wGWdH9VY4djy6qvg2/v2du0nwLlyrmSutv0LavQggkLaAaYI+T5yjzl 3ldvjVWn0y9UovXgS0j+UiNVjZpqd3PaGF/zDKw1ennTq/tsxQoxPbZC0cO1wHQLed50 uZeZ3RL6oKrQupdYZjKP9yLOXeDh2/WHBbrmxcPrisBwIulbB6Q+hsMEVQk/kav0umI3 dncA== X-Gm-Message-State: ANhLgQ3gzWQF5JZNwPCe0xfj+U2LnBcHZMIZ8UyF8AiHnTsb5Ua3FrGW ZenOoReD5+yA5V8S5b4NGDoAEYZ7vjd5XszGf5OJXg== X-Received: by 2002:a67:88c8:: with SMTP id k191mr1432889vsd.110.1583849886533; Tue, 10 Mar 2020 07:18:06 -0700 (PDT) MIME-Version: 1.0 References: <20200305203318.8980-1-bay@hackerdom.ru> <1583749022.17100.5.camel@suse.com> In-Reply-To: From: =?UTF-8?B?0JDQu9C10LrRgdCw0L3QtNGAINCR0LXRgNGB0LXQvdC10LI=?= Date: Tue, 10 Mar 2020 19:17:55 +0500 Message-ID: Subject: Fwd: [PATCH] cdc_ncm: Implement the 32-bit version of NCM Transfer Block To: linux-usb@vger.kernel.org Cc: netdev@vger.kernel.org, linux-kernel@vger.kernel.org Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org =D0=BF=D0=BD, 9 =D0=BC=D0=B0=D1=80. 2020 =D0=B3. =D0=B2 15:17, Oliver Neuku= m : > > Am Freitag, den 06.03.2020, 01:33 +0500 schrieb Alexander Bersenev: > > The NCM specification defines two formats of transfer blocks: with 16-b= it > > fields (NTB-16) and with 32-bit fields (NTB-32). Currently only NTB-16 = is > > implemented. > > > > This patch adds the support of NTB-32. The motivation behind this is th= at > > some devices such as E5785 or E5885 from the current generation of Huaw= ei > > LTE routers do not support NTB-16. The previous generations of Huawei > > devices are also use NTB-32 by default. > > > > Also this patch enables NTB-32 by default for Huawei devices > > Hi, > > do you really see no other option but to make the choice with yet > anothet flag? The rest of the code looks good to me. > Hi, The reason of yet another flag is that some Huawei devices, E5785 and E5885= , are incorrectly reporting that they support NTB-16. In fact they support on= ly NTB-32. Historically the Huawei devices used NTB-32 by default and there was a flag CDC_NCM_FLAG_RESET_NTB16 to work around the bug that some Huawei E3372H devices come out of reset in NTB-32 mode even if NTB-16 mode was set. This commit removes the CDC_NCM_FLAG_RESET_NTB16 flag, that was specific to Huawei devices and introduces the CDC_NCM_FLAG_PREFER_NTB32 flag. The NTB-16 has lower, protocol overhead, but NTB-32 allows to transfer more data per transfer block, up to 4GB, supporting both High Speed and SuperSpeed data rates. So NTB-32 can be faster on devices with big buffers and slower on devices with small buffers. Anyway, for 4g modem devices there should not be much difference between NDP-16 and NDP-32 because the 4g speeds are lower than the USB speed. But also there may be the devices, that, vice versa, buggy with NTB-32 and work well with NTB-16. So having a flag to choose the preferred implementation is probably the bes= t option - it allows to keep older device to work as before, but if it is found out that the device works with NTB-32 better, the flag can be enabled for that devic= e or vendor. Best, Alexander Bersenev