From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id C8752ECAAA1 for ; Tue, 30 Aug 2022 10:06:52 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230129AbiH3KGt (ORCPT ); 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> 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