Received: by 2002:a05:6a10:f347:0:0:0:0 with SMTP id d7csp493140pxu; Fri, 4 Dec 2020 08:11:42 -0800 (PST) X-Google-Smtp-Source: ABdhPJzVddBzh0byKNAqRfhkBMFHUvaBFs+29fETVWxG3HUU8gX4tZvanhdkcGRJgftENgfamTig X-Received: by 2002:a17:906:3daa:: with SMTP id y10mr7651274ejh.23.1607098302494; Fri, 04 Dec 2020 08:11:42 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1607098302; cv=none; d=google.com; s=arc-20160816; b=puNYBTZ9CPyqWO92vnbvHr1WBapiAH+aIx5wJJzYDAw0Apag9Mjl7ryHGJOhHE2IDL 9R6SVaKHMgxtp0J8S6y3gLX9QfLh/E2zmirc1cfHXQbgDHhWlpL5oRy3m2xwGYO7DiXR AhLGzY3dU58asA5xCq7o4WC5Vbx1+oeRB9VTwvx9KH7DkFtixo9f/Fflhu4c/vuJjYaM M2v1pR4NIJy7P46r7bi/w2YEApeJobM7AqdrM1vQX3dx4mO5oUK7WHgA65SOEUmnHDw1 eRdy3hFUbN0Nk7uUDC1wpHnmOI7gLFJno4QSuQebAzb7bJG/BX1ObywnZfTiqoMAaaJH +9pQ== 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:dkim-signature :dkim-signature:date; bh=Xy/9QtTx3UpO4JIfYbYMImqZERsY61stjvd6BB0ENZ4=; b=ly44BMnPHpIFwmDabJye1EOJux0CmBiC/AsL4GinG7R79xkSG9MnBpdSBrsesJ1msQ N1cocGBDe8dyTQIMRYxvoivrmVdc49DBC7b5k9Ib9bsYv9jmNAR30EaYsKlLAjdiM4MG htGSKmcivTFaU4UheZQHGSIGn6zhpUOd7KPtfTR1eDj9gCTePbDHHfrph32QCwZFhZNW s+9CS/Gab8tRtYlW9uru7tFxP7Im0ilcckqrPyjwkQm2FKuqIoPnZ84o52vpxkJ0n0sI nQiCfNQacRfiTktukEIoiorStqyz6lCpFeMUJhuya+Tn1OgMBZdCHG276aY9CQtvz01M WzSw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linutronix.de header.s=2020 header.b=MJ7bYsHV; dkim=neutral (no key) header.i=@linutronix.de header.s=2020e header.b=w4Pul5+k; 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=QUARANTINE dis=NONE) header.from=linutronix.de Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id k18si3125021eds.42.2020.12.04.08.11.19; Fri, 04 Dec 2020 08:11:42 -0800 (PST) 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=@linutronix.de header.s=2020 header.b=MJ7bYsHV; dkim=neutral (no key) header.i=@linutronix.de header.s=2020e header.b=w4Pul5+k; 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=QUARANTINE dis=NONE) header.from=linutronix.de Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1730841AbgLDQJa (ORCPT + 99 others); Fri, 4 Dec 2020 11:09:30 -0500 Received: from Galois.linutronix.de ([193.142.43.55]:48330 "EHLO galois.linutronix.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727008AbgLDQJa (ORCPT ); Fri, 4 Dec 2020 11:09:30 -0500 Date: Fri, 4 Dec 2020 17:08:47 +0100 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020; t=1607098128; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=Xy/9QtTx3UpO4JIfYbYMImqZERsY61stjvd6BB0ENZ4=; b=MJ7bYsHV7TPIHmu2rNgwoX3+TkJCeN95hlA9vXvetWgdnoWHUXrG9WdUjlS909EN1EEe2g 1Qnr9iN2uAr8VHq58yxyMrozhPe0NzmBgfDXYihLgnkJJgS08GNZ3EWBPI3Vu7c8reVaMz 0EFa0zum8OUzPhdXl0EVaBgLsjW/9py0xaoVcQ5J3FCRCYQF3oMlmhUasNKsvW1BQVCbmy PAr2RPjDTj/OW5IC+0lHc+OPG6uZ2dsTlXrtxwUmvMpBrwa/1SsErE+v30C3hAGZXFZMGH exCqxquoGieoosONyTESnZ796EoK2wEriTkr6GWoYm/GtYFssSMRlYu8XiMsBQ== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020e; t=1607098128; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=Xy/9QtTx3UpO4JIfYbYMImqZERsY61stjvd6BB0ENZ4=; b=w4Pul5+kYZfht3cMhIbq7t7Dln2VSt/wCSjR5W/wGVyZSnBNDBRUFuo8kMlIqIwE40HlRz ENVLMwaEX8+SKbBg== From: "Ahmed S. Darwish" To: Finn Thain Cc: Sebastian Andrzej Siewior , Michael Schmitz , "James E.J. Bottomley" , "Martin K. Petersen" , Thomas Gleixner , linux-scsi@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH] scsi/NCR5380: Remove in_interrupt() test Message-ID: References: <58cf6feeaf5dae1ee0c78c1b25c00c73de15b087.1606805196.git.fthain@telegraphics.com.au> <20201201170547.d6ff743eeuh6en6s@linutronix.de> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, Dec 04, 2020 at 10:08:08AM +1100, Finn Thain wrote: ... > > You've put your finger on a known problem with certain > NCR5380_poll_politely() call sites. That is, the nominal timeout, HZ / 64, > is meaningless because it is ignored in atomic context. So you may as well > specify 0 jiffies at these call sites. (There will be a 1 jiffy timeout > applied regardless.) ... > > However, I can see the value in your approach, i.e. passing a zero timeout > to NCR5380_poll_politely() whenever that argument is unused. And I agree > that this could then be used to inhibit sleeping, rather than testing > irqs_disabled(). > > So if you really don't like irqs_disabled(), perhaps you can just keep the > better parts of your two attempts, i.e. passing 0 to > NCR5380_poll_politely() where appropriate and facilitating that by adding > a new can_sleep parameter to do_abort() and NCR5380_transfer_pio(), as in, ... > > Does that sound like a reasonable compromise? > Yes, of course. Thanks a lot. I've sent a v2. -- Ahmed S. Darwish Linutronix GmbH