Received: by 2002:a25:c205:0:0:0:0:0 with SMTP id s5csp506712ybf; Sat, 29 Feb 2020 08:34:56 -0800 (PST) X-Google-Smtp-Source: APXvYqwN2a8Z5f7vx6p9+7KebGRWErCWTEG2/9Oxm2RBAYuDelg2ISYtdABcW25ZCsUrZVwgppFx X-Received: by 2002:a9d:7a56:: with SMTP id z22mr6924594otm.201.1582994096795; Sat, 29 Feb 2020 08:34:56 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1582994096; cv=none; d=google.com; s=arc-20160816; b=tgpzcpXa01Ji3GRAEz0FH1qfSEli7itJCDzMvK7CHm1WCdRKD+dgbK00lpJ8Xeybvd pzlZ3CvxIev/3nAQeriGLH6rfgfsfvtTd73dAmtHCBIHAWue3q/CM1p1+mxpEjL1YbZP GsCK10tZmPrhzRdpzml5EhHOuD3M1W+0xVMNzYdpnEg5CmK90+F9KC79sBeVt5Z46MEr NzeU1IL1+y/RU1iRGLEibQCnzhMYdcOjAWkNFWGLJGBrc4UvHcYeR/wcFu0Aqcrx4rWr RR3ZaUV9hzKSctILACOV0hr3e1fdOh4asjouPV5zty2IRF9W1KIiBZ7XymJLmD08KSq4 fHYg== 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=NL/uMzsUD2HZLCImnyoogjvK4Zjw6EClchIYf2JMVHo=; b=YoRPM8EIrnKDMSM1WRpRaDot46cUe2jMcixOhno8xgV5mZGnJazseL/npq+qOH4MqH zSmII36sQjlDpVr5t831emx7U7UNzhhwlembZYfFq8hvWtZ2AMHZqPPHenQt+93gYFrm 6P8gibJZKSgzi6sgs1n+k8+oZf8VpiW4mlvfuKgDQRxGpEpMnSOvQUWxjhkhAqjWdQVF PKbBnCLTfShCmK2wr1khLYtgJNwBRpKJc+hqWtT/SeaIkhRqNYDLrlL1RmWtBXdP1WBG jBmr34GxDe0YupjQTXa2lH5N5Z0Jj4qL9Mg819yW8xbU3bS2d+/80Dnrie4nGipfMlmj ijYQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=qUHowmpG; 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=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id v13si2205711ota.218.2020.02.29.08.34.44; Sat, 29 Feb 2020 08:34:56 -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=@gmail.com header.s=20161025 header.b=qUHowmpG; 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=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727311AbgB2QeP (ORCPT + 99 others); Sat, 29 Feb 2020 11:34:15 -0500 Received: from mail-io1-f68.google.com ([209.85.166.68]:41701 "EHLO mail-io1-f68.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727196AbgB2QeO (ORCPT ); Sat, 29 Feb 2020 11:34:14 -0500 Received: by mail-io1-f68.google.com with SMTP id m25so7004094ioo.8; Sat, 29 Feb 2020 08:34:14 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=NL/uMzsUD2HZLCImnyoogjvK4Zjw6EClchIYf2JMVHo=; b=qUHowmpGyPUtIFeJG/+XE2zu4mA9NcB90XB5EGkBRfZk2MfI/qF/fFp8rqGBLwtf3U dJ07kXzM8y0FJnw9pjclsVkVck8eBhBo6L7s6e3DHHyKyl054G23BJozNq/1h+94DzEf zQZ7YRfmcHby109nRPpuIhZrH08FC+kDnV0xAjLywkUrdm+jNsm3gbMOi+BnFRMyy3wE ROcAJx52i1ET2089k86V5754YJq7mmD2JPTX1blNhggl1EFWyB5uth1VKbUjElTbCfW2 Eh1BmWbRuPYBpyWfVkhaciG1+/ujyMAQfLHi1DQy7psuR42XtK0/KFvegsMvSAARg7Xo 0oLA== 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=NL/uMzsUD2HZLCImnyoogjvK4Zjw6EClchIYf2JMVHo=; b=Pc8DA1ogkmUwEGbdjVgUJSnzy7yuWr1zHh8UuooiuP/PfEzWnhsZfND4SFBAsnY3ai cU7uFTwbWOWShWsiidYs67xRh5qYNUAhKZh46U3d0q6UZfAMeFx1bjvmFJW5icT/Vz5U KOAt/iMKsiryN4XxMCWVGFKpRujVtpfmJqd1CMXQsVfa23Xr4E9oND7jEDVpXYINzaFq 73/YDADP/FnOFSNGksYct4bkv07wjcqUs9SzTUx59N/FPZC/5nh/lIQoM1j0/L1hNGD5 LNHBvKdvehaBSD+wKTfW79hiqHH4GzPunMf3urcJT4HOwGstu47s4Pm/XW8SxG0Bxosu fuJQ== X-Gm-Message-State: APjAAAWrJcfUjr1YNSqEPHPcsQ5xkceKa9Hhrkf3GA6O94NxBdMuWxg1 B0aZBnJ09fs+lE2t9HDg4UaXuzwh8siKk+5sdW1P+F3A X-Received: by 2002:a5e:8214:: with SMTP id l20mr7989403iom.168.1582994052694; Sat, 29 Feb 2020 08:34:12 -0800 (PST) MIME-Version: 1.0 References: <20200226210414.28133-1-linux@roeck-us.net> <20200226210414.28133-2-linux@roeck-us.net> <20200228175905.GB3188@roeck-us.net> <62d81632-4a6f-b2d8-e420-b58fb6c9d044@roeck-us.net> In-Reply-To: <62d81632-4a6f-b2d8-e420-b58fb6c9d044@roeck-us.net> From: =?UTF-8?B?QW50dGkgU2VwcMOkbMOk?= Date: Sat, 29 Feb 2020 18:33:36 +0200 Message-ID: Subject: Re: [RFT PATCH 1/4] usb: dwc2: Simplify and fix DMA alignment code To: Guenter Roeck Cc: Doug Anderson , Minas Harutyunyan , Greg Kroah-Hartman , 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 On Sat, 29 Feb 2020 at 17:25, Guenter Roeck wrote: > > Sigh. It would have been too simple. Too bad I can't test myself. > I'd like to know if this is because URB_NO_TRANSFER_DMA_MAP is set on a > transfer, or because the beginning of the buffer indeed needs to be aligned > to the DMA cache line size on that system. In the latter case, the question > is why the alignment to DWC2_USB_DMA_ALIGN (=4) works. In the former case, > question would be why the realignment does any good in the first place. > > Any chance you can add some test code to help figuring out what exactly > goes wrong ? > Sure, I can try to help. Just let me know what code you would like to insert and where and I'll see what I can do. -- Antti