Received: by 2002:ac0:946b:0:0:0:0:0 with SMTP id j40csp151323imj; Thu, 14 Feb 2019 17:27:14 -0800 (PST) X-Google-Smtp-Source: AHgI3IY+9YvetGbNCLTgUSETUsYLSizyXURfbUI/V1SU+eYhBOUS7bMfzy8ZoxDFPDkEtxe1uupl X-Received: by 2002:a63:fc59:: with SMTP id r25mr2882046pgk.302.1550194033927; Thu, 14 Feb 2019 17:27:13 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1550194033; cv=none; d=google.com; s=arc-20160816; b=y326aBFMTumDp6GejbnhDDSb6i3DbuSLCW5GObpl+ZqM3JUy4fOvpEH8dlmyt2mLFy LbcUZnD7UIRbU7rSOcArCahYZY0lqG3B2SGRSHU8pxNAPefkaZ2b/gaNdcBqMYHBjYp+ jh+3J1mKNSW6ibCyp5pIe8HQyI2/xVJDzwZkjTv5Z0lsQX4c7OTsJbMf4fk5N37EZ/oL ZFaUxsxGYP/qCJv1KNcwQPh40pwdLChak40KPAcUjbahPtSFov9cXVHIGLXU6RjfWGbT hQKrwgFQB3uiguVjsSOcCs7gpmnZJNpPpekLN8i/ciWnR/jRlfgEU/U09WMimxf1VZu4 5mTw== 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=Q7Cx/Crhp0no8GWc+NeB1APfLt8OgYRtu//UB0ro46A=; b=Lq7dFJwYV5fu8BWxu103nhltkPej+Ki1qlc7U9fGmkKvqZGL2cZjXLUMQpbvLR04E9 pI4FXP50QWERYHkRAAxOh2LmHqH7MgEJQxdhl+3t7rPjlfEDETWjvyQiLsaAt77JZWRi KJQkbndL1RQE2F5PXTU+QpGFBGGcldUaYXPhDEKEd0WNrnypOwnPStgNP87mkS2Kdw+W 5LuLy4dQDGY/h3kQFoHP4I1/PYO5KAhI12i4Qmwxbyonn9Nn2PZja6JpnHPKknC/nIFh D2TpskY3zNP3r0Vv3Hbg3XIfw3w0tdYZnQAFQalQRWvv/TDicv2oUOd7zhhdhoWL+GmU k/5g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@broadcom.com header.s=google header.b=anzzR5Sa; 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=QUARANTINE sp=QUARANTINE dis=NONE) header.from=broadcom.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id z185si3813623pgb.222.2019.02.14.17.26.58; Thu, 14 Feb 2019 17:27:13 -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=@broadcom.com header.s=google header.b=anzzR5Sa; 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=QUARANTINE sp=QUARANTINE dis=NONE) header.from=broadcom.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2391132AbfBNSA5 (ORCPT + 99 others); Thu, 14 Feb 2019 13:00:57 -0500 Received: from mail-pf1-f193.google.com ([209.85.210.193]:36656 "EHLO mail-pf1-f193.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2390777AbfBNSA5 (ORCPT ); Thu, 14 Feb 2019 13:00:57 -0500 Received: by mail-pf1-f193.google.com with SMTP id n22so3474118pfa.3 for ; Thu, 14 Feb 2019 10:00:56 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=broadcom.com; s=google; h=subject:to:cc:references:from:message-id:date:user-agent :mime-version:in-reply-to:content-language:content-transfer-encoding; bh=Q7Cx/Crhp0no8GWc+NeB1APfLt8OgYRtu//UB0ro46A=; b=anzzR5SaedAZk06QdlqvK+8aQPBhG9BdoVepDvnS3cjH3q/C1I5PR3laMdjNkIk79t zl1HnLZEudBmNNMcb+DXfd16DadgKrUA196LSd4LQDkvkoCp2GushiA4nOle4eoLEbtb LKTWP75+TYEBq3Cu0Sn7n49S7ZaJjee0qz7Cs= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:cc:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=Q7Cx/Crhp0no8GWc+NeB1APfLt8OgYRtu//UB0ro46A=; b=rS1NKbuV+rBRcVAB8oMm7UBuBNkjl4/gjMo/MZgNACxq0kMr4zeThEHnrPnbJ6IOSx P+VqCuqRDTNkTziMmvO2MjYeagoOh0eAroyU53ueVervTXwuLBDKKN6wwdLBgM5mROEL WYvqPsfmnl1jjkpCqdREhOVEtp391X0XzL+HiaDo3MdQ83mkec8bU7pIicHaaSFPTErk aRR/sx65m2537X6lsOfPm8tVz6k6Na7ws/xV+awk+2pFIgRwCqft/8pnZWUTRgqCYDgL LFjU0g2323yqdBEnrZZgI/lPPa9l60gzjQN0j9nEFrgBT58FDq7JgXfBmQNV+cjG/Ydv pmtA== X-Gm-Message-State: AHQUAub3WIBrb07Hq1E6ItexOiYuPnlClteB2/9jNufHdpWM1NY5mV7g T/wHjKiYlrWz2XVTnPjwgLY4hw== X-Received: by 2002:a65:610f:: with SMTP id z15mr1043149pgu.153.1550167255854; Thu, 14 Feb 2019 10:00:55 -0800 (PST) Received: from [10.136.8.252] ([192.19.228.250]) by smtp.gmail.com with ESMTPSA id m7sm7238498pfj.162.2019.02.14.10.00.53 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 14 Feb 2019 10:00:54 -0800 (PST) Subject: Re: [PATCH] mailbox: bcm-flexrm-mailbox: Fix FlexRM ring flush timeout issue To: Scott Branden , Jassi Brar Cc: linux-kernel@vger.kernel.org, bcm-kernel-feedback-list@broadcom.com, Rayagonda Kokatanur References: <20190204192129.93533-1-ray.jui@broadcom.com> From: Ray Jui Message-ID: Date: Thu, 14 Feb 2019 10:00:52 -0800 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:60.0) Gecko/20100101 Thunderbird/60.5.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Jassi, Have you had a chance to review this fix? This is a critical fix for a crash during driver shutdown. Regards, Ray On 2/4/2019 11:22 AM, Scott Branden wrote: > Fix looks good. > > On 2019-02-04 11:21 a.m., Ray Jui wrote: >> From: Rayagonda Kokatanur >> >> RING_CONTROL reg was not written due to wrong address, hence all >> the subsequent ring flush was timing out. >> >> Fixes: a371c10ea4b3 ("mailbox: bcm-flexrm-mailbox: Fix FlexRM ring >> flush sequence") >> >> Signed-off-by: Rayagonda Kokatanur >> Signed-off-by: Ray Jui > Reviewed-by: Scott Branden >> --- >>   drivers/mailbox/bcm-flexrm-mailbox.c | 4 ++-- >>   1 file changed, 2 insertions(+), 2 deletions(-) >> >> diff --git a/drivers/mailbox/bcm-flexrm-mailbox.c >> b/drivers/mailbox/bcm-flexrm-mailbox.c >> index d713271ebf7c..a64116586b4c 100644 >> --- a/drivers/mailbox/bcm-flexrm-mailbox.c >> +++ b/drivers/mailbox/bcm-flexrm-mailbox.c >> @@ -1396,9 +1396,9 @@ static void flexrm_shutdown(struct mbox_chan *chan) >>         /* Clear ring flush state */ >>       timeout = 1000; /* timeout of 1s */ >> -    writel_relaxed(0x0, ring + RING_CONTROL); >> +    writel_relaxed(0x0, ring->regs + RING_CONTROL); >>       do { >> -        if (!(readl_relaxed(ring + RING_FLUSH_DONE) & >> +        if (!(readl_relaxed(ring->regs + RING_FLUSH_DONE) & >>                 FLUSH_DONE_MASK)) >>               break; >>           mdelay(1);