Received: by 2002:a25:c205:0:0:0:0:0 with SMTP id s5csp1592497ybf; Thu, 27 Feb 2020 14:07:51 -0800 (PST) X-Google-Smtp-Source: APXvYqw8Sz/0C/YZPLRcHT1QCJZjcnt6m/LZlBRcjX0EBDXCbxZvsnmOEV9xslUxArdeFekzMCdH X-Received: by 2002:aca:c481:: with SMTP id u123mr867892oif.177.1582841270990; Thu, 27 Feb 2020 14:07:50 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1582841270; cv=none; d=google.com; s=arc-20160816; b=jVW1X3y815y4IRRKNBTF1YCv7Ec4aHcXI2Zd6e2lCg+IBbSORHVaCRu38hnlM0o3pZ M6vLBhS8KngjNJqOvtSD+OmSE71VNlXaPX6LtLMTqKX+quBqt77VbGOei4NRSrtMbsHD txusILV8SN+Wp5Rbi9pEXudqwHMC6SAvP0zqtrbeYW2TOosR0hgOKj19cDtZeFb4zTYJ C7ZC1oH1GTdsQtPyTin+5T+AHXyZypDBzLo0nYl0rDfxZmZSfKYySmPHjBWF30dOmLB1 xCCsxdC8sYjsreq3VqNQ1h+X2DWVXkfLjDp5WjR1Np546pWubu1Zl73gyhscfwT6UXL8 qMFw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:dkim-signature; bh=QZJFYpDMu28rzg4sSH4lYDpplDJcLA4t74m3kwP0OVc=; b=gnLKN6ykCW4XBtGc9vnHgfOV8kSjGXtGf+A3AwZYOSIAqkeakKYqemH9gXdFb7o0cj 7gKggkvU140Js5lR58Y2UgsdduIR0dZ+4HLiMyb84YFGS7+F8fOT8blILu9TCOEWpZCQ nF5CAYRiO3keuYTWRk1cfigAijzngw7Gg6LK/4Y+i9lmV8biuUnQ6Cp34+0j4VFhmSVP 4QRMIkmYEviiEC4oV2utmkp9z9YUUBNGg5wxC8DlKPVrNrKk5Rc8z4AUh7/7v7PGqY+0 UJRnasafA/PpnU5nPa2ri31LbRFhaZ8brfl194R9c6xZMoVJHc+pi0/j6hClGFQQpcg0 LS0A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@chromium.org header.s=google header.b=fSnXxRqD; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=chromium.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id t70si644508oif.99.2020.02.27.14.07.39; Thu, 27 Feb 2020 14:07:50 -0800 (PST) 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=@chromium.org header.s=google header.b=fSnXxRqD; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=chromium.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1730217AbgB0WG7 (ORCPT + 99 others); Thu, 27 Feb 2020 17:06:59 -0500 Received: from mail-ua1-f67.google.com ([209.85.222.67]:39105 "EHLO mail-ua1-f67.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1730189AbgB0WG7 (ORCPT ); Thu, 27 Feb 2020 17:06:59 -0500 Received: by mail-ua1-f67.google.com with SMTP id c21so252316uam.6 for ; Thu, 27 Feb 2020 14:06:58 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=QZJFYpDMu28rzg4sSH4lYDpplDJcLA4t74m3kwP0OVc=; b=fSnXxRqDh7UfXXPdr2gz+QQFlZLuXvGjpruN8a7b0yy4UgTtmHn06hZFqIHGRvYNQG aTs1vV/VJNDqO64I6+DPkfrEJS/Gi5zmkHsLsciwXoZPq/OS9g9jIYQjEsY/VBPCji92 DVYwcrXRTNUyds2NfyFsBneM5dOfsQkdMShgU= 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; bh=QZJFYpDMu28rzg4sSH4lYDpplDJcLA4t74m3kwP0OVc=; b=EYZEPYcivMX+aY3z/8EU0O4KdX+W/EDgbCsrmf3N+xWs5AWuhxU//hWBzw/y6aHFHQ 8mlP6xl44yLoFhhf/fsErpQFkx+JPpgfir4zTUth3tBRNoI90eHff6yahwBkpXbEOek+ Y1EhJFSisxzIj5jbICNdOTy6ZoK+c1Tq2lCWgHrD+NP8nUYgxcy/Zqg8tNxakUHQ+7jM gFaoAf1CL6tCMoSVsxV7Lt2Z+jO8hFiFOJOxYQTozwHVmnutPctofMWIVsR8LfofSNFX 1YGBQHhdwfKIRdouKKbxsh0DKT2+YHFWP6vShXxQfSBcvyf19wFPYtMhuSLqBPviU4Hx fRGQ== X-Gm-Message-State: ANhLgQ3JebExtD+/k5tyRgk/fgE7qTAqwe8xX4vYeYgDMAeXsPm2OlFR 6PBXY4/v5oASWgCXqpxkMINxE8WM4Go= X-Received: by 2002:a9f:3e9e:: with SMTP id x30mr530527uai.122.1582841218076; Thu, 27 Feb 2020 14:06:58 -0800 (PST) Received: from mail-ua1-f48.google.com (mail-ua1-f48.google.com. [209.85.222.48]) by smtp.gmail.com with ESMTPSA id h139sm2419155vke.34.2020.02.27.14.06.55 for (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Thu, 27 Feb 2020 14:06:56 -0800 (PST) Received: by mail-ua1-f48.google.com with SMTP id t20so250777uao.7 for ; Thu, 27 Feb 2020 14:06:55 -0800 (PST) X-Received: by 2002:ab0:45b6:: with SMTP id u51mr513744uau.120.1582841215133; Thu, 27 Feb 2020 14:06:55 -0800 (PST) MIME-Version: 1.0 References: <20200226210414.28133-1-linux@roeck-us.net> <20200226210414.28133-3-linux@roeck-us.net> In-Reply-To: <20200226210414.28133-3-linux@roeck-us.net> From: Doug Anderson Date: Thu, 27 Feb 2020 14:06:44 -0800 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [RFT PATCH 2/4] usb: dwc2: Do not update data length if it is 0 on inbound transfers To: Guenter Roeck Cc: Minas Harutyunyan , Greg Kroah-Hartman , =?UTF-8?B?QW50dGkgU2VwcMOkbMOk?= , Boris ARZUR , linux-usb@vger.kernel.org, LKML , Felipe Balbi , Stefan Wahren , Martin Schiller Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi, On Wed, Feb 26, 2020 at 1:04 PM Guenter Roeck wrote: > > The DWC2 documentation states that transfers with zero data length should > set the number of packets to 1 and the transfer length to 0. This is not > currently the case for inbound transfers: the transfer length is set to > the maximum packet length. This can have adverse effects if the chip > actually does transfer data as it is programmed to do. Follow chip > documentation and keep the transfer length set to 0 in that situation. > > Signed-off-by: Guenter Roeck > --- > drivers/usb/dwc2/hcd.c | 15 ++++++++------- > 1 file changed, 8 insertions(+), 7 deletions(-) I don't have any other test setup that you don't have, so just giving my review tag and not tested tag. I will note that it feels like this should have a "Fixes" tag or a direct Cc to stable to make it obvious that it should make its way back to stable trees. Reviewed-by: Douglas Anderson