Received: by 2002:a05:6902:102b:0:0:0:0 with SMTP id x11csp1654288ybt; Mon, 15 Jun 2020 06:12:40 -0700 (PDT) X-Google-Smtp-Source: ABdhPJw+VQgHM/cHx1IeHvz5dngE18+Ia1KDKi0DEp/gsMhdh7KhbOywxLtHidCIWf//6ZTLQPt+ X-Received: by 2002:a05:6402:b47:: with SMTP id bx7mr24601781edb.274.1592226760656; Mon, 15 Jun 2020 06:12:40 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1592226760; cv=none; d=google.com; s=arc-20160816; b=l/u7d3kLhmZiRZZVnfwdC/5awcT1fVAl+Q08WVVvxRZpsAYed7KxbhmYFQXsB7NJE0 45GNhCDroM++oCBbtF5yuk4sESd04gHm7IojTJW/8R8VrmnO7kd7E4RuE4YvNkZFTKJh K8iCZrAEzhLomzYoadJ5IpW1sN2kLqvWlK8ndJH+G52o+pL9X7kC5lS+2V1fZhWGnoZ3 XRICgbHXtnwcRGlEY/JNobH0cMqagwLMfsFxQm+7Mp59JpzhzQdgwfidZvP8YkKu5DHW X9DSI5GSMsVquJ7RPXhLUrkmSN964eDZ3sgS2FFNGKFiq2mRbkJ2h1hFAnayb6irwpVf VnYg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:dkim-signature; bh=KDZDcyIMsFqPHmbSWHY/l8KKxvEtrV7/6WZ/nA60CE0=; b=JSCpJP7UkB/8RM4J5WldbdjCXAaUV1wKKZ0XgTfNW1UwsiI8NgWIYRtyDyMWuR/OXJ Ucx6KeSjxqcbA93JxsFn7rwhhGdFXUu/lNJfHg5wU0K1ct/LsQgPeX1lXH3uA1SAqg/a TDqD0UB7sHvgm79S8Nl6XUc9pTKGzds9mN+joVb27F8hvvO6BhMp+kBBLZkdR/8blGQL hFCKHPlyYej+L+CI6vYfdS0GaXmNM7dUrhzalCRbfeZj7q6jeHjosnkTCklU9Ak31G5L NYh2FL9je+oEYSJdpfKLTE4fhNTgh6HIh8wBI9OJ/m5AUqBLTGptQW3PVMLcRi2BdS1Z gK4g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=LqTVQ+jq; 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 p22si7877478edy.126.2020.06.15.06.12.18; Mon, 15 Jun 2020 06:12:40 -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=default header.b=LqTVQ+jq; 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 S1730075AbgFONKL (ORCPT + 99 others); Mon, 15 Jun 2020 09:10:11 -0400 Received: from mail.kernel.org ([198.145.29.99]:47550 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729875AbgFONKK (ORCPT ); Mon, 15 Jun 2020 09:10:10 -0400 Received: from localhost (fw-tnat.cambridge.arm.com [217.140.96.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 38E642074D; Mon, 15 Jun 2020 13:10:08 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1592226610; bh=Q4kYEv8y1kbvADRAP1BgbtoDH5hmbT0bRy3I3ZrTBxo=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=LqTVQ+jqhr9sSuJEIjKtb+t7uP4Os3/80y041zWF2krFR9JKwQskpt0QEd/T7vJgW 6QPbsSsF+Q8LvR4mLDEWheUmbYY7U/rm3Nz/8raTQmh9v0P8ie0/r5CA1EnmeFIDG5 40QA+6TE1KO+vSLWQ4RcWUL7JJLez+pRm3r/kGv8= Date: Mon, 15 Jun 2020 14:10:06 +0100 From: Mark Brown To: Vladimir Oltean Cc: Marc Kleine-Budde , Krzysztof Kozlowski , Thomas Gleixner , Vladimir Oltean , linux-spi , lkml , Wolfram Sang , stable@vger.kernel.org, Pengutronix Kernel Team Subject: Re: [PATCH v2 1/3] spi: spi-fsl-dspi: Fix external abort on interrupt in exit paths Message-ID: <20200615131006.GR4447@sirena.org.uk> References: <1592208439-17594-1-git-send-email-krzk@kernel.org> <20200615123052.GO4447@sirena.org.uk> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="y2MHPAl/EzyWgzIZ" Content-Disposition: inline In-Reply-To: X-Cookie: Offer may end without notice. User-Agent: Mutt/1.10.1 (2018-07-13) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org --y2MHPAl/EzyWgzIZ Content-Type: text/plain; charset=us-ascii Content-Disposition: inline On Mon, Jun 15, 2020 at 03:56:01PM +0300, Vladimir Oltean wrote: > And the down-shot is that whatever is done in dspi_remove (free_irq) > also needs to be done in dspi_suspend, but with extra care in > dspi_resume not only to request the irq again, but also to flush the > module's FIFOs and clear interrupts, because there might have been > nasty stuff uncaught during sleep: > regmap_update_bits(dspi->regmap, SPI_MCR, > SPI_MCR_CLR_TXF | SPI_MCR_CLR_RXF, > SPI_MCR_CLR_TXF | SPI_MCR_CLR_RXF); > regmap_write(dspi->regmap, SPI_SR, SPI_SR_CLEAR); > So it's pretty messy. It's a bit unusual to need to actually free the IRQ over suspend - what's driving that requirement here? I can see we might need to reinit the hardware but usually the interrupt handler can be left there safely. --y2MHPAl/EzyWgzIZ Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQEzBAABCgAdFiEEreZoqmdXGLWf4p/qJNaLcl1Uh9AFAl7ncy4ACgkQJNaLcl1U h9ByxAf/Viw1asiMeFVTEX5NW6sj2JWKphdxsdlXt8jQ48yPQUOSKBWTcHKvZUop ugkURiAdYNLhV5qA/+6ORBe21lszw0YK85cF/+vY4T5AoeUnutOiw7yfl3w68zVX hibcK47M3IJ1vcbyruaMSvPSvc/EeAXs08szmYOtgAPCCL5eYd6iWt/bCVj/FtqO 30k5jVxSAvPUlOIrFWYcNkAFYYtrir6EOSRemnKkBuF+LIKW11LG1apvb28X56jv cRvTVPjzMAc9KlAVOoLWEEQ/o/XTA9PT70Qd2It67gRmdQZ/13L/L6Cqrys+5Du5 SCO6T+EoDrqAzA8mzY8EpJ18jhIDtA== =h3aO -----END PGP SIGNATURE----- --y2MHPAl/EzyWgzIZ--