* [RESEND][PATCH 2.6.14-rc1] scsi: sd, sr, st, and scsi_lib all fail to copy cmd_len to new cmd
@ 2005-09-14 2:56 Timothy Thelin
2005-09-14 9:57 ` Jiri Slaby
0 siblings, 1 reply; 2+ messages in thread
From: Timothy Thelin @ 2005-09-14 2:56 UTC (permalink / raw)
To: James Bottomley, Mike Christie, SCSI Mailing List
Cc: Linux Kernel, Andrew Morton
[-- Attachment #1: Type: text/plain, Size: 280 bytes --]
Sorry it wrapped. It's now an attachment.
This fixes an issue in scsi command initialization from a request
where sd, sr, st, and scsi_lib all fail to copy the request's
cmd_len to the scsi command's cmd_len field.
Signed-off-by: Timothy Thelin <timothy.thelin@wdc.com>
[-- Attachment #2: scsi-sd-sr-st-and-scsi_lib-all-fail-to-copy-cmd_len-to-new-cmd.patch --]
[-- Type: application/octet-stream, Size: 2030 bytes --]
diff -pu linux-2.6.14-rc1.orig/drivers/scsi/scsi_lib.c linux-2.6.14-rc1/drivers/scsi/scsi_lib.c
--- linux-2.6.14-rc1.orig/drivers/scsi/scsi_lib.c 2005-09-12 20:12:09.000000000 -0700
+++ linux-2.6.14-rc1/drivers/scsi/scsi_lib.c 2005-09-13 16:28:58.000000000 -0700
@@ -1268,6 +1268,7 @@ static int scsi_prep_fn(struct request_q
}
} else {
memcpy(cmd->cmnd, req->cmd, sizeof(cmd->cmnd));
+ cmd->cmd_len = req->cmd_len;
if (rq_data_dir(req) == WRITE)
cmd->sc_data_direction = DMA_TO_DEVICE;
else if (req->data_len)
diff -pu linux-2.6.14-rc1.orig/drivers/scsi/sd.c linux-2.6.14-rc1/drivers/scsi/sd.c
--- linux-2.6.14-rc1.orig/drivers/scsi/sd.c 2005-09-12 20:12:09.000000000 -0700
+++ linux-2.6.14-rc1/drivers/scsi/sd.c 2005-09-13 16:03:20.000000000 -0700
@@ -235,6 +235,7 @@ static int sd_init_command(struct scsi_c
return 0;
memcpy(SCpnt->cmnd, rq->cmd, sizeof(SCpnt->cmnd));
+ SCpnt->cmd_len = rq->cmd_len;
if (rq_data_dir(rq) == WRITE)
SCpnt->sc_data_direction = DMA_TO_DEVICE;
else if (rq->data_len)
diff -pu linux-2.6.14-rc1.orig/drivers/scsi/sr.c linux-2.6.14-rc1/drivers/scsi/sr.c
--- linux-2.6.14-rc1.orig/drivers/scsi/sr.c 2005-09-12 20:12:09.000000000 -0700
+++ linux-2.6.14-rc1/drivers/scsi/sr.c 2005-09-13 16:05:47.000000000 -0700
@@ -326,6 +326,7 @@ static int sr_init_command(struct scsi_c
return 0;
memcpy(SCpnt->cmnd, rq->cmd, sizeof(SCpnt->cmnd));
+ SCpnt->cmd_len = rq->cmd_len;
if (!rq->data_len)
SCpnt->sc_data_direction = DMA_NONE;
else if (rq_data_dir(rq) == WRITE)
diff -pu linux-2.6.14-rc1.orig/drivers/scsi/st.c linux-2.6.14-rc1/drivers/scsi/st.c
--- linux-2.6.14-rc1.orig/drivers/scsi/st.c 2005-09-12 20:12:09.000000000 -0700
+++ linux-2.6.14-rc1/drivers/scsi/st.c 2005-09-13 16:04:10.000000000 -0700
@@ -4206,6 +4206,7 @@ static int st_init_command(struct scsi_c
return 0;
memcpy(SCpnt->cmnd, rq->cmd, sizeof(SCpnt->cmnd));
+ SCpnt->cmd_len = rq->cmd_len;
if (rq_data_dir(rq) == WRITE)
SCpnt->sc_data_direction = DMA_TO_DEVICE;
^ permalink raw reply [flat|nested] 2+ messages in thread* Re: [RESEND][PATCH 2.6.14-rc1] scsi: sd, sr, st, and scsi_lib all fail to copy cmd_len to new cmd
2005-09-14 2:56 [RESEND][PATCH 2.6.14-rc1] scsi: sd, sr, st, and scsi_lib all fail to copy cmd_len to new cmd Timothy Thelin
@ 2005-09-14 9:57 ` Jiri Slaby
0 siblings, 0 replies; 2+ messages in thread
From: Jiri Slaby @ 2005-09-14 9:57 UTC (permalink / raw)
To: Timothy Thelin
Cc: James Bottomley, Mike Christie, SCSI Mailing List, Linux Kernel,
Andrew Morton
Timothy Thelin napsal(a):
>Sorry it wrapped. It's now an attachment.
>
>This fixes an issue in scsi command initialization from a request
>where sd, sr, st, and scsi_lib all fail to copy the request's
>cmd_len to the scsi command's cmd_len field.
>
>Signed-off-by: Timothy Thelin <timothy.thelin@wdc.com>
>
>
Mime is hell, include patch in e-mail's body, please.
thanks,
--
Jiri Slaby www.fi.muni.cz/~xslaby
~\-/~ jirislaby@gmail.com ~\-/~
241B347EC88228DE51EE A49C4A73A25004CB2A10
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2005-09-14 9:58 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2005-09-14 2:56 [RESEND][PATCH 2.6.14-rc1] scsi: sd, sr, st, and scsi_lib all fail to copy cmd_len to new cmd Timothy Thelin
2005-09-14 9:57 ` Jiri Slaby
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).