linux-scsi.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Sebastian Andrzej Siewior <sebastian@breakpoint.cc>
To: linux-scsi@vger.kernel.org, linux-usb@vger.kernel.org,
	usb-storage@lists.one-eyed-alien.net
Cc: "James E.J. Bottomley" <jejb@linux.ibm.com>,
	"Martin K. Petersen" <martin.petersen@oracle.com>,
	Alan Stern <stern@rowland.harvard.edu>,
	Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
	Sebastian Andrzej Siewior <sebastian@breakpoint.cc>
Subject: [PATCH 2/2] usb: storage: Complete the scsi request directly.
Date: Tue,  1 Feb 2022 22:09:54 +0100	[thread overview]
Message-ID: <20220201210954.570896-3-sebastian@breakpoint.cc> (raw)
In-Reply-To: <20220201210954.570896-1-sebastian@breakpoint.cc>

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 <sebastian@breakpoint.cc>
---
 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 (;;) */
 
-- 
2.34.1


  parent reply	other threads:[~2022-02-01 21:10 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-02-01 21:09 [PATCH 0/2] Add scsi_done_direct() to complete request directly Sebastian Andrzej Siewior
2022-02-01 21:09 ` [PATCH 1/2] scsi: Add scsi_done_direct() for immediate completion Sebastian Andrzej Siewior
2022-02-02 20:49   ` Bart Van Assche
2022-02-03 19:46     ` Sebastian Andrzej Siewior
2022-02-03 20:29       ` [PATCH v2 " Sebastian Andrzej Siewior
2022-02-03 22:30         ` Bart Van Assche
2022-02-03 22:27       ` [PATCH " Bart Van Assche
2022-02-01 21:09 ` Sebastian Andrzej Siewior [this message]
2022-02-08  4:14 ` [PATCH 0/2] Add scsi_done_direct() to complete request directly Martin K. Petersen
2022-02-11 23:25 ` Martin K. Petersen

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20220201210954.570896-3-sebastian@breakpoint.cc \
    --to=sebastian@breakpoint.cc \
    --cc=gregkh@linuxfoundation.org \
    --cc=jejb@linux.ibm.com \
    --cc=linux-scsi@vger.kernel.org \
    --cc=linux-usb@vger.kernel.org \
    --cc=martin.petersen@oracle.com \
    --cc=stern@rowland.harvard.edu \
    --cc=usb-storage@lists.one-eyed-alien.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).