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 <[email protected]>
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 [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
[Index of Archives]
[Kernel Newbies]
[Netfilter]
[Bugtraq]
[Photo]
[Stuff]
[Gimp]
[Yosemite News]
[MIPS Linux]
[ARM Linux]
[Linux Security]
[Linux RAID]
[Video 4 Linux]
[Linux for the blind]
[Linux Resources]