Received: by 2002:a25:ab43:0:0:0:0:0 with SMTP id u61csp601298ybi; Thu, 30 May 2019 03:52:04 -0700 (PDT) X-Google-Smtp-Source: APXvYqzjqezTXITNTFhkCcGcHfzG0BsxEGvCBgNJkAbS8ZkK1p+5+uQ+Q5Fgk/H//oEobtVokHnX X-Received: by 2002:a62:fb18:: with SMTP id x24mr3131366pfm.76.1559213524603; Thu, 30 May 2019 03:52:04 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1559213524; cv=none; d=google.com; s=arc-20160816; b=BLuJ2ylE7QY1Ep0/XUSVoZgZzH9Tlf5wWKEtyFYVGAf2lPBedjVm3nHmAkNcruyi0y rOF8x8fCKbLI1zp6inu0NcVH504kLAV5kIVYjTSxy5Tv5JnBlR/CQKnNkYNL6eIXM1QY T2U/mihhK+MiIznTCNNf+lBs6YGtzTzdAmM711jHqD10Jo1uXL6hGxFGJpXZytSeW1PC uZqWcrYYGI8E8FVBoImBrvSjEPde3knWYTZUa67OPnBzwkPqAtXEVXgUx0AIV4Aqd7sU vuw4qMbqz1He4aZQ0XUwCHTksxAbvZdzyGSMhTl72+yooJ6i3isb7xiTm+wvIQJ4Lt1z Ys1A== 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 :content-language:in-reply-to:mime-version:user-agent:date :message-id:from:references:cc:to:subject:dkim-signature; bh=ru7Ex52FRFtL5vbLkCuc+6Mz4MzQPErYgk9ECr5pVrc=; b=qq+3nX7UPlGdRb2rBw+5itEFeevzna31HSOzmflzeLtycO8yM6/f5nBMtnSfXQDbX9 I6J+xPnodffnklFWoL3sd9IEgA8G3y9tzXWaYHtxXjH4yE0V6w7uW62Wvf7xuyNzl60L 3ImpZKxpgnwuKAOAMfezujpwU9+AiBniHdT40ZoP8XkGodTIrAWSD00F6GQbTSLnjxz4 HoyfZaG4iOd+zj3jltYwzAGPEaJtklJ98UKsv7t11IywRf4S/kwRYvByD8W47zyqB4EB 2dTJ4SzF2NwApJGPfu17K1Q1w2J7laxhczGETaSVP3vQPu9B2PRUYqLzzkDDvC9bnVEp Ub7g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@synopsys.com header.s=mail header.b=JfaWrNGv; 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=synopsys.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id x13si2356995pjq.98.2019.05.30.03.51.49; Thu, 30 May 2019 03:52:04 -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=@synopsys.com header.s=mail header.b=JfaWrNGv; 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=synopsys.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726550AbfE3KaB (ORCPT + 99 others); Thu, 30 May 2019 06:30:01 -0400 Received: from smtprelay-out1.synopsys.com ([198.182.47.102]:33224 "EHLO smtprelay-out1.synopsys.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726029AbfE3KaB (ORCPT ); Thu, 30 May 2019 06:30:01 -0400 Received: from mailhost.synopsys.com (dc2-mailhost2.synopsys.com [10.12.135.162]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) (No client certificate requested) by smtprelay-out1.synopsys.com (Postfix) with ESMTPS id 7DE91C00FD; Thu, 30 May 2019 10:30:08 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=synopsys.com; s=mail; t=1559212209; bh=gg8NunW7XsIUu7tJ+B+7jsvCIrIgnJylMlUTpkU5OaY=; h=Subject:To:Cc:References:From:Date:In-Reply-To:From; b=JfaWrNGvxdfq5OVVVJUOyO/WniWH1ZwTN88+4vua73kUXzL+7qBWFF4VvxP0SXF7R vxQjdu0KVs1Tuuwno7OB+6Ufbk6tjwcyfOw2xBn/O4AlQXpjfEGhUUV/6S9ZWzpPcI Oov+LRE4fSq+mNF7PsYoBoM+aa4YJHfuFBj2ooWsjX57ZWkf/7lwWP9dXcClip586m Xwp6kOvJX7K/v24iT7FH19sv9lHOMXui32/58RRgG/6/pTEmLEBEUhgspLymjgdggT UI3i3awQlpTBf89CwDeFIV54HuaagwcEC/EFy2QyxuFBiFksAibqVvfsmU7jTsb9EW MDh6ofLlrzIig== Received: from [10.116.70.206] (hminas-7480.internal.synopsys.com [10.116.70.206]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mailhost.synopsys.com (Postfix) with ESMTPSA id 62570A0093; Thu, 30 May 2019 10:29:56 +0000 (UTC) Subject: Re: [PATCH] usb: dwc2: Fix DMA cache alignment issues To: Doug Anderson , Martin Schiller , Felipe Balbi Cc: Greg Kroah-Hartman , =?UTF-8?B?QW50dGkgU2VwcMOkbMOk?= , "linux-usb@vger.kernel.org" , LKML , Tomasz Figa References: <20190218063730.26870-1-ms@dev.tdt.de> From: Minas Harutyunyan Message-ID: <7bf6f5dd-6f0f-4470-51c7-d024fc8ef4df@synopsys.com> Date: Thu, 30 May 2019 14:29:31 +0400 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:60.0) Gecko/20100101 Thunderbird/60.6.1 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 5/29/2019 10:31 PM, Doug Anderson wrote: > Hi, > > On Sun, Feb 17, 2019 at 10:37 PM Martin Schiller wrote: >> >> Insert a padding between data and the stored_xfer_buffer pointer to >> ensure they are not on the same cache line. >> >> Otherwise, the stored_xfer_buffer gets corrupted for IN URBs on >> non-cache-coherent systems. (In my case: Lantiq xRX200 MIPS) >> >> Fixes: 3bc04e28a030 ("usb: dwc2: host: Get aligned DMA in a more supported way") >> Fixes: 56406e017a88 ("usb: dwc2: Fix DMA alignment to start at allocated boundary") >> Signed-off-by: Martin Schiller >> --- >> drivers/usb/dwc2/hcd.c | 10 +++++++--- >> 1 file changed, 7 insertions(+), 3 deletions(-) > > This patch has been in the back of my mind for a while bug I never got > around to it. Today I was debugging memory corruption problems when > using a webcam on dwc2 on rk3288-veyron-jerry. This patch appears to > solve my problems nicely. Thanks! > > Tested-by: Douglas Anderson > Reviewed-by: Douglas Anderson > Cc: > Acked-by: Minas Harutyunyan