From patchwork Tue Feb 1 21:09:54 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sebastian Andrzej Siewior X-Patchwork-Id: 539259 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 C838CC4332F for ; Tue, 1 Feb 2022 21:10:15 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233213AbiBAVKO (ORCPT ); Tue, 1 Feb 2022 16:10:14 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:34716 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232017AbiBAVKN (ORCPT ); Tue, 1 Feb 2022 16:10:13 -0500 Received: from Chamillionaire.breakpoint.cc (Chamillionaire.breakpoint.cc [IPv6:2a0a:51c0:0:12e:520::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id E0A70C06173B; Tue, 1 Feb 2022 13:10:12 -0800 (PST) Received: from localhost ([127.0.0.1] helo=flow.W.breakpoint.cc) by Chamillionaire.breakpoint.cc with esmtp (Exim 4.92) (envelope-from ) id 1nF0Pj-0006wn-9E; Tue, 01 Feb 2022 22:10:11 +0100 From: Sebastian Andrzej Siewior To: linux-scsi@vger.kernel.org, linux-usb@vger.kernel.org, usb-storage@lists.one-eyed-alien.net Cc: "James E.J. Bottomley" , "Martin K. Petersen" , Alan Stern , Greg Kroah-Hartman , Sebastian Andrzej Siewior Subject: [PATCH 2/2] usb: storage: Complete the scsi request directly. Date: Tue, 1 Feb 2022 22:09:54 +0100 Message-Id: <20220201210954.570896-3-sebastian@breakpoint.cc> In-Reply-To: <20220201210954.570896-1-sebastian@breakpoint.cc> References: <20220201210954.570896-1-sebastian@breakpoint.cc> MIME-Version: 1.0 X-Breakpoint-Spam-Score: -1.0 X-Breakpoint-Spam-Level: - X-Breakpoint-Spam-Status: No , -1.0 points, 5.0 required, ALL_TRUSTED=-1 Precedence: bulk List-ID: X-Mailing-List: linux-usb@vger.kernel.org The storage driver completes its requests directly from a kernel thread. Use scsi_done_direct() to avoid waking ksoftirqd. Signed-off-by: Sebastian Andrzej Siewior --- drivers/usb/storage/usb.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/usb/storage/usb.c b/drivers/usb/storage/usb.c index 8b543f2c98575..ed7c6ad96a743 100644 --- a/drivers/usb/storage/usb.c +++ b/drivers/usb/storage/usb.c @@ -417,7 +417,7 @@ static int usb_stor_control_thread(void * __us) if (srb) { usb_stor_dbg(us, "scsi cmd done, result=0x%x\n", srb->result); - scsi_done(srb); + scsi_done_direct(srb); } } /* for (;;) */