Received: by 2002:a05:6a11:4021:0:0:0:0 with SMTP id ky33csp2153484pxb; Mon, 20 Sep 2021 13:43:19 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyg3T7x4awvyEa0Ae/IwmrrgvCIUH/0PEdFf0pQpzk7rchH72mqg+fctV0ZD/r/Ee5MuqAg X-Received: by 2002:a05:6602:214f:: with SMTP id y15mr13454179ioy.127.1632170599300; Mon, 20 Sep 2021 13:43:19 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1632170599; cv=none; d=google.com; s=arc-20160816; b=K8VsAPdmpvlYzV++zfuVuBnv85Z5amaiwnxi7cEzuzeBowDkM2YouF+YPbskdE/wRS pOWZZYfDUfJDyEBBJ7tai6oopwxkBd5UeIfvIX0NNnBNevG+JJho1QbaBbX1IswSTuyj gGvlUkYFsHaJDKZ/J6em84Xs5eufwYznyntf0Zbn1k7rfvpcAJH8ZjEdBOowDXxNyPjm kOgLLxpemoPRmUEd0IahIBCnAxMXLLN6xw6jli6eLVWBq9X8mxZR5bW8FSaR3touMqgv X9cPc/yuvsj0uzBPBWN6wryPEdx/NevoTJM/4cdAOuqI+Jt1PMK+oGLwCI5ArCJD5hvf CvwQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=XSBOD1qrecPcyazxjYIdjdgkyHe+9CGg8oU8sDPAKzc=; b=k/mlZdEPcFJRzk3BC9qBYKWO4+c/0MTRzEcEpe3kXWGjP4l1+Qwj6t8dnQcA/tgOZw lbNuz3b87Cb95vDGubLqMAVNmUto20x/jxfZedR+s7/gH6wua4dxb9WIXDMzaWBOCT47 WH4TOfP1QOACQfCjuRmQmJOK/kFZGpOvxVmVFNElWrkjr8XbPvG1Pdcb0eYdLZaXYjzN v+9zGtpQfWcRqOdL1UGMndQJeZzn/XNJXe2vqP0/EgAMOo0gEBYIhyl5wkQ0U67WOpgY XPHP6HrwhNckJrG2n3FfIVhLPoA9b1xCbImZwD5Uefhol/TeGikhmrrnInyIfeSLKmH2 yTww== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=kSOSfcoJ; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id x9si8032574ilg.115.2021.09.20.13.43.06; Mon, 20 Sep 2021 13:43:19 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=kSOSfcoJ; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S237535AbhITMOA (ORCPT + 99 others); Mon, 20 Sep 2021 08:14:00 -0400 Received: from mail.kernel.org ([198.145.29.99]:44138 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S237519AbhITMN7 (ORCPT ); Mon, 20 Sep 2021 08:13:59 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id 8B58D61040; Mon, 20 Sep 2021 12:12:32 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1632139952; bh=92Zco9rXt6W+e6PF3VjFECoFUbUIIIKca4hGES5Ml+o=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=kSOSfcoJpTxGrpygYlvVlVB4djdfH7aRb6HHRyy9jIQaRSBF0C17nydFMyr0CbbKE vxcMLftmwR93lOfPaGj/V6LDMZZ6ow4WLsxyLmN3RJvgXcOKUpK25sqR0alChon3PO 92ZU9DVll/y0bZeBy9mLeYOFYmEuFAx+ti/w2veFBrp4YX3P8r9EvJSfrG+iD6L01r Ty/+gnc5ge1dhzCAKJXzgoe0WGJqcwK7IVW48LDE1EvOR9uc+C77W8mQfIjJr2mRsF r50x5Mwzid6J8CUWPWba8amSTEtbHpVAAj4L5PaIGS08r/xFEfAvO0+91AdI9PG2q8 LsNCv1EWgEvEQ== Date: Mon, 20 Sep 2021 08:12:31 -0400 From: Sasha Levin To: Marek Vasut Cc: linux-kernel@vger.kernel.org, stable@vger.kernel.org, Marek Vasut , Lorenzo Pieralisi , Bjorn Helgaas , Geert Uytterhoeven , Wolfram Sang , Yoshihiro Shimoda , linux-renesas-soc@vger.kernel.org, linux-pci@vger.kernel.org Subject: Re: [PATCH AUTOSEL 5.14 12/32] PCI: rcar: Add L1 link state fix into data abort hook Message-ID: References: <20210911131149.284397-1-sashal@kernel.org> <20210911131149.284397-12-sashal@kernel.org> <6cbfadee-0d74-fa4c-9ef3-a1bce55632bb@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii; format=flowed Content-Disposition: inline In-Reply-To: <6cbfadee-0d74-fa4c-9ef3-a1bce55632bb@gmail.com> Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Sat, Sep 11, 2021 at 06:05:37PM +0200, Marek Vasut wrote: >On 9/11/21 3:11 PM, Sasha Levin wrote: >>From: Marek Vasut >> >>[ Upstream commit a115b1bd3af0c2963e72f6e47143724c59251be6 ] >> >>When the link is in L1, hardware should return it to L0 >>automatically whenever a transaction targets a component on the >>other end of the link (PCIe r5.0, sec 5.2). >> >>The R-Car PCIe controller doesn't handle this transition correctly. >>If the link is not in L0, an MMIO transaction targeting a downstream >>device fails, and the controller reports an ARM imprecise external >>abort. >> >>Work around this by hooking the abort handler so the driver can >>detect this situation and help the hardware complete the link state >>transition. >> >>When the R-Car controller receives a PM_ENTER_L1 DLLP from the >>downstream component, it sets PMEL1RX bit in PMSR register, but then >>the controller enters some sort of in-between state. A subsequent >>MMIO transaction will fail, resulting in the external abort. The >>abort handler detects this condition and completes the link state >>transition by setting the L1IATN bit in PMCTLR and waiting for the >>link state transition to complete. > >You will also need the following patch, otherwise the build will fail >on configurations without COMMON_CLK (none where this driver is used, >but happened on one of the build bots). I'm waiting for PCIe >maintainers to pick it up: >https://patchwork.kernel.org/project/linux-pci/patch/20210907144512.5238-1-marek.vasut@gmail.com/ I see that it's not upstream yet, so I'll drop this patch for now. -- Thanks, Sasha