aboutsummaryrefslogtreecommitdiffstats
path: root/include/scsi/scsi_host.h
diff options
context:
space:
mode:
authorFUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>2007-03-02 19:55:54 -0500
committerJames Bottomley <jejb@mulgrave.il.steeleye.com>2007-03-11 12:39:27 -0400
commitbc7e380a6a4c94f79a49c36bdb28062a750b3c2b (patch)
treec5ae13015fd0f7f15e9dbf16f865a11d0c495f3b /include/scsi/scsi_host.h
parent181011e04a2a32f8d5df212254239ac9a3c8ab5e (diff)
[SCSI] tgt: fix sesnse buffer problems
This patch simplify the way to notify LLDs of the command completion and addresses the following sense buffer problems: - can't handle both data and sense. - forces user-space to use aligned sense buffer tgt copies sense_data from userspace to cmnd->sense_buffer (if necessary), maps user-space pages (if necessary) and then calls host->transfer_response (host->transfer_data is removed). Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp> Signed-off-by: Mike Christie <michaelc@cs.wisc.edu> Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
Diffstat (limited to 'include/scsi/scsi_host.h')
-rw-r--r--include/scsi/scsi_host.h19
1 files changed, 5 insertions, 14 deletions
diff --git a/include/scsi/scsi_host.h b/include/scsi/scsi_host.h
index 7f1f411d07af..965b6b8ffec5 100644
--- a/include/scsi/scsi_host.h
+++ b/include/scsi/scsi_host.h
@@ -129,6 +129,11 @@ struct scsi_host_template {
129 * the LLD. When the driver is finished processing the command 129 * the LLD. When the driver is finished processing the command
130 * the done callback is invoked. 130 * the done callback is invoked.
131 * 131 *
132 * This is called to inform the LLD to transfer
133 * cmd->request_bufflen bytes. The cmd->use_sg speciefies the
134 * number of scatterlist entried in the command and
135 * cmd->request_buffer contains the scatterlist.
136 *
132 * return values: see queuecommand 137 * return values: see queuecommand
133 * 138 *
134 * If the LLD accepts the cmd, it should set the result to an 139 * If the LLD accepts the cmd, it should set the result to an
@@ -139,20 +144,6 @@ struct scsi_host_template {
139 /* TODO: rename */ 144 /* TODO: rename */
140 int (* transfer_response)(struct scsi_cmnd *, 145 int (* transfer_response)(struct scsi_cmnd *,
141 void (*done)(struct scsi_cmnd *)); 146 void (*done)(struct scsi_cmnd *));
142 /*
143 * This is called to inform the LLD to transfer cmd->request_bufflen
144 * bytes of the cmd at cmd->offset in the cmd. The cmd->use_sg
145 * speciefies the number of scatterlist entried in the command
146 * and cmd->request_buffer contains the scatterlist.
147 *
148 * If the command cannot be processed in one transfer_data call
149 * becuase a scatterlist within the LLD's limits cannot be
150 * created then transfer_data will be called multiple times.
151 * It is initially called from process context, and later
152 * calls are from the interrup context.
153 */
154 int (* transfer_data)(struct scsi_cmnd *,
155 void (*done)(struct scsi_cmnd *));
156 147
157 /* Used as callback for the completion of task management request. */ 148 /* Used as callback for the completion of task management request. */
158 int (* tsk_mgmt_response)(u64 mid, int result); 149 int (* tsk_mgmt_response)(u64 mid, int result);