Received: by 2002:a05:6358:45e:b0:b5:b6eb:e1f9 with SMTP id 30csp4044806rwe; Tue, 30 Aug 2022 03:45:35 -0700 (PDT) X-Google-Smtp-Source: AA6agR63GZIkDigEDFv2Wlf1DvdYhRyaX2on5fvngKMa8dZZrfs43L47X+9+KKQYP7+79mA8ekRx X-Received: by 2002:a05:6402:5489:b0:43b:b935:db37 with SMTP id fg9-20020a056402548900b0043bb935db37mr20447339edb.347.1661856335047; Tue, 30 Aug 2022 03:45:35 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1661856335; cv=none; d=google.com; s=arc-20160816; b=BeXmbIs9b7JTBZlEQ6V2EssvDo006t08AEDJdwufHq6/hngpsax+i0iY+d8aaMPZ7K fctCQXtICA4i83vPP+lfpbo/T+ZWgggwo5o3AqBLswth1E/vHQf3PwVEEOPwP//NVHQq U9TiDono8nvLk8ENOwDuXBGeK22oTGdBm6IM87DGOgYmAc6WI/eP9LcF9cLXIpdsR0vQ EVQzy1U0tXI+qrziU1jgboO305ooWvnIto+yKNkkVfPrVTsEZa/JNdeRcYwV6UJp1ld5 AJlFV8bQ07pd4U9e4nqtdT++AKljgEPLg9ZeKiUxSF+pG6Mz6FuPFodeZjUGDF/avD3v ZIJw== 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=5Th0mQ/sNN9c18CVRxErzRPXBEZvcyeYzQkxhouGlyc=; b=gymC9W/ekF28NWhyDm5AMrPpz5+nVflr9lKpPbcEjCo5w71KG7fVwrYB2jyUq8K/hA +6+6NT4nNTQBnfsTQN+PVtD07C5Myc5UvAYHJHsZIm8AP/O1Sy23/K3mK7Y1rOtv+9zN DFA6M3FQFd3qxb25rpD+7E3vrBIMX55l8RlbgISDXk12htpacbhm6Kn8fBaxotfIUiiU fz6xVOM7N/nlsPirVGi20fl8EJQKKGJzr9V+b73bHL6VTJ5mxONUKVr99IgBW9LUlDc4 vBJItJbZoO0qj4rP9dqxR1ifE7adUmVHQyR+/HoakevA65kAdIvBB07ThouUVt6jRYOb m7Hw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linutronix.de header.s=2020 header.b=qMETC6v6; dkim=neutral (no key) header.i=@linutronix.de; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 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 out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id c1-20020aa7df01000000b004483613511esi5168193edy.618.2022.08.30.03.45.09; Tue, 30 Aug 2022 03:45:35 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@linutronix.de header.s=2020 header.b=qMETC6v6; dkim=neutral (no key) header.i=@linutronix.de; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 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 S229742AbiH3KGt (ORCPT + 99 others); Tue, 30 Aug 2022 06:06:49 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:50162 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229840AbiH3KGH (ORCPT ); Tue, 30 Aug 2022 06:06:07 -0400 Received: from galois.linutronix.de (Galois.linutronix.de [IPv6:2a0a:51c0:0:12e:550::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id E052CEE68A; Tue, 30 Aug 2022 03:03:26 -0700 (PDT) Date: Tue, 30 Aug 2022 12:03:20 +0200 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020; t=1661853802; 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=5Th0mQ/sNN9c18CVRxErzRPXBEZvcyeYzQkxhouGlyc=; b=qMETC6v6RTxNCE90+XAWi3L/rz6zS3FsKcQe2Uj32rmKr8M0vVUZ0iD6iQ+/6v1YT62AKY UfmzmDieJiYqyLxx1/XJ5g7u9AhVAEnynv1O2TYCk2buD7zFdf7cLeajft8SWRFT/GSImi 4yk5pfiCQ/1D6VWuafWjBidWdsrI9K/EhkUxNu9w2f7YxooeGv7Abv3FkWJr20P7zzZGHd fnB4umkby03JJarue+rnpk+Xr1znNtRpX40Nk0OP63an3yDMYbaGJ2xWxsLO0sRjMKy96A 2pkLletIezeR4cPRY+qUHHMUYYACxtw2MEa+qqknEV5vGkbB/zXrJLB+x/jiYg== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020e; t=1661853802; 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=5Th0mQ/sNN9c18CVRxErzRPXBEZvcyeYzQkxhouGlyc=; b=C3ReCx7C6MDZVd65vQy2DaG87J1pVM2D6Je302ILkOPzKilw0k3yrFc3iUYHAF7iR6GhCu wLEcLJGk6gxrgSBA== From: Sebastian Andrzej Siewior To: Thinh Nguyen Cc: Felipe Balbi , Greg Kroah-Hartman , "linux-usb@vger.kernel.org" , "linux-kernel@vger.kernel.org" , Dmitry Bogdanov , "linux-scsi@vger.kernel.org" , "target-devel@vger.kernel.org" Subject: Re: [PATCH v2 11/25] usb: gadget: f_tcm: Execute command on write completion Message-ID: References: <20220826183732.vxogtdlwqiqbcg2t@synopsys.com> <20220829214738.g4sazbxapgmlyksa@synopsys.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <20220829214738.g4sazbxapgmlyksa@synopsys.com> X-Spam-Status: No, score=-4.4 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_MED,SPF_HELO_NONE, SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 2022-08-29 21:47:41 [+0000], Thinh Nguyen wrote: > Ok. Maybe we should make a change in the target_execute_cmd() then. It > seems unreasonable to force the caller to workaround this such as the > wait+complete construct you did (and I don't recall we have changes in > place to know/guarantee that interrupts are enabled before executing > target_execute_cmd() previously either). Sounds reasonable. Back then I wasn't sure if I'm putting all the puzzle pieces correctly together so I preferred this over a target change I wasn't sure was really needed. Anyway. > For the dwc3, we masked the interrupt at this point, so interrupt won't > be asserted here. dwc3 has a irqrestore() after calling the routine so that will avoid the splat. But lockdep should yell here. Anyway, other interrupts on that CPU (timer for instance) could trigger. > Thanks, > Thinh Sebastian