mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Khalid Aziz <khalid@lyra.fc.hp.com>
To: linux-kernel@vger.kernel.org
Subject: [PATCH] SCSI command bytes are copied twice
Date: Wed, 18 Apr 2001 16:11:04 -0600 (MDT)	[thread overview]
Message-ID: <200104182211.QAA09466@lyra.fc.hp.com> (raw)

SCSI subsystem needs to copy the SCSI command bytes into a Scsi_Request 
structure for a SCSI command being issued by one of the higher level
drivers before it queues the command up. It does this copy twice. Even
though this will cause no more than 12 bytes to be copied twice, this
code is still invoked frequently enough to justify not incurring the 
overhead of a redundant copy. Following patch should fix this.

Thanks,
Khalid

====================================================================
Khalid Aziz                             Linux Development Laboratory
(970)898-9214                                        Hewlett-Packard
khalid@fc.hp.com                                    Fort Collins, CO



--- linux-2.4.3-orig/drivers/scsi/scsi.c	Fri Feb  9 12:30:23 2001
+++ linux-2.4.3/drivers/scsi/scsi.c	Wed Apr 18 14:22:00 2001
@@ -832,9 +832,6 @@
 	SRpnt->sr_allowed = retries;
 	SRpnt->sr_done = done;
 	SRpnt->sr_timeout_per_command = timeout;
-
-	memcpy((void *) SRpnt->sr_cmnd, (const void *) cmnd, 
-	       sizeof(SRpnt->sr_cmnd));
 
 	if (SRpnt->sr_cmd_len == 0)
 		SRpnt->sr_cmd_len = COMMAND_SIZE(SRpnt->sr_cmnd[0]);

                 reply	other threads:[~2001-04-18 22:10 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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=200104182211.QAA09466@lyra.fc.hp.com \
    --to=khalid@lyra.fc.hp.com \
    --cc=linux-kernel@vger.kernel.org \
    /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

all inboxes | Powered by JetHome®