Received: by 2002:a25:e7d8:0:0:0:0:0 with SMTP id e207csp741449ybh; Tue, 10 Mar 2020 07:26:26 -0700 (PDT) X-Google-Smtp-Source: ADFU+vt05juKfBNy3INL85oDqhLzh7V/QBOnC6ak2FLn4W0DPonMYiUiA1svuNxgpmgV+CIl4Kyd X-Received: by 2002:aca:5109:: with SMTP id f9mr1304545oib.14.1583850386364; Tue, 10 Mar 2020 07:26:26 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1583850386; cv=none; d=google.com; s=arc-20160816; b=czA9vfJN4GGzjBfxCsIjJmD0N8ezHioAlo87CBg0C/VorulimcCQyrSy9XCf1/kuoV frQI3W1rYpid9YQBE+pwxdK64cuxvfHoW4yaTx9IVkbELdKgoss8evDtsWa9QgrkKv90 F5iWXcTqcz+YUc6yn+LIsoJXKcxIFfnAUoQlXFKtKdPrrgQVNpNTlgnT3nJMQb1WMs1C ifo8FZ2ExY6sio/0+JxTrTz84LqdEOyph9ZbYN2qE3JrN8nke6CgRVnqskmx5jvqSPOY UQW26AXpyD7WlXRmADgSdh32RpITHX28DjaRV08iy+43CTySbypQWNB0c0dwb6MO8qdZ IgnQ== 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=fci+lGVHIk5dS90H4Qwn6hmtLu+TjO+LbICLyZySdcVCzQB9rWrzuo383NlXLX1AV+ x0f0cOInc+7LCmz1Y2Be4EnP4j5POV4bN+5Y4mmxjyg4w8hz/5DIByRMsvdk9mRZEWrB pVI9AI+4tU+oT8Qomo0G3WJTrNrar3lYdw5R0tNRPCdHyA/4UhwinExSHI6yWpnbuHKV 1H9rcCHPCDOzr8iK+9OksQbW+UcdxJXWeH8FCHqD21+Go7WW56Dj8VXp2ThS0sw++FO6 REgdjt0SFxsAYQvjbsWj2kfBHdNn8yRiYCg8l97LfyP4Q5aHDh1NILB5LQsEFjKEYRdp FbxA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@hackerdom.ru header.s=google header.b=R30ltV5t; 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 y15si8013823oto.19.2020.03.10.07.26.05; Tue, 10 Mar 2020 07:26:26 -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=R30ltV5t; 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 S1727391AbgCJOYP (ORCPT + 99 others); Tue, 10 Mar 2020 10:24:15 -0400 Received: from mail-vs1-f65.google.com ([209.85.217.65]:46984 "EHLO mail-vs1-f65.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727142AbgCJOYP (ORCPT ); Tue, 10 Mar 2020 10:24:15 -0400 Received: by mail-vs1-f65.google.com with SMTP id z125so4588301vsb.13 for ; Tue, 10 Mar 2020 07:24:12 -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=R30ltV5tj9XzuTZ2exE8wYmEotSsZ5kd0syyUTaIwJ2RS4e1QbDTMJo2CnIJPg0QOQ atO1T/En7QKSQYES5TMSv2EVMQ9rXpIoxUB10SH5C9fz24obJLJA9UptdQ7r3yhmD3t2 iEYdsf76hyflnonwLDkN12zPkyg/E7zYuWQCI= 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=qiJz5s2Ccv0o2bb5MyMbjCEFB6OqlbwfM8PPg9blkurkQe28NMAUeHRzB+5FLl8I3r w5kSpYuUVUNIU6wH8xxyG9F2JbgGIOIy8xvwTlJEUSCSCcC+6/I8JOVce6P94Ngv4xmb l4Fb54MXoLS3RPiIvzv2e6HdP2+D0SKWU/ZqL+DyO70mlEGXVGp/AZyGUC+XtpLi9fLf ynsWZ66Vv5ohO0uWGoFDhNz38SSw+ufhs6I3eSnhwOXoVU6Agr4Cqtmw8Xj4FssMDflV NeqMrItN9gj8KVWK+hxyWKMJWeHpHeQ+VGZVfxgNYXo2IygHJq2dLCrF62+LWKEDco68 r2Zg== X-Gm-Message-State: ANhLgQ1vlw/d9ytLsFBa/ijcYbGbDbw00izFoyT9TRMQDhpGG0EnaOkJ gxq6PkggRVxWLSYzcCIAvVeeWmzZWcwbGxo1QUq4YA== X-Received: by 2002:a05:6102:1153:: with SMTP id j19mr13290116vsg.55.1583850252332; Tue, 10 Mar 2020 07:24:12 -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:24:01 +0500 Message-ID: Subject: Re: [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