lkml.org 
[lkml]   [2005]   [Apr]   [12]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
SubjectRe: [PATCH scsi-misc-2.6 05/07] scsi: move scsi_init_cmd_errh() from request_fn to prep_fn.
Date
05_scsi_requeue_move_init_cmd_errh.patch

As now all non-reprepped requeue goes through
scsi_retry_command() which clears sense buffer, there's no
need to call scsi_init_cmd_errh() in scsi_request_fn(). Move
scsi_init_cmd_errh() to scsi_prep_fn().

Signed-off-by: Tejun Heo <htejun@gmail.com>

scsi_lib.c | 5 ++---
1 files changed, 2 insertions(+), 3 deletions(-)

Index: scsi-reqfn-export/drivers/scsi/scsi_lib.c
===================================================================
--- scsi-reqfn-export.orig/drivers/scsi/scsi_lib.c 2005-04-12 21:50:11.000000000 +0900
+++ scsi-reqfn-export/drivers/scsi/scsi_lib.c 2005-04-12 21:50:12.000000000 +0900
@@ -1051,6 +1051,8 @@ static int scsi_prep_fn(struct request_q
if (CDB_SIZE(cmd) > sdev->host->max_cmd_len)
goto kill;

+ scsi_init_cmd_errh(cmd);
+
/* If SCSI-2 or lower, store the LUN value in cmnd. */
if (cmd->device->scsi_level <= SCSI_2)
cmd->cmnd[1] = (cmd->cmnd[1] & 0x1f) |
@@ -1311,9 +1313,6 @@ static void scsi_request_fn(struct reque
target->starget_sdev_user = sdev;
}

- /* Once requeue path is cleaned up, init_cmd_errh can
- * be moved to prep_fn() where it belongs. */
- scsi_init_cmd_errh(cmd);
shost->host_busy++;
scsi_log_send(cmd);
scsi_cmd_get_serial(shost, cmd);
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2005-04-12 15:25    [W:0.292 / U:0.792 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site