diff options
author | FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp> | 2006-11-16 05:24:10 -0500 |
---|---|---|
committer | James Bottomley <jejb@mulgrave.il.steeleye.com> | 2006-11-25 14:08:56 -0500 |
commit | b58d91547fb17c65ad621f3f98b1f2c228c812a5 (patch) | |
tree | 4fafd4db96cb7931577f87b02a79cc6f52986333 /drivers/scsi/hosts.c | |
parent | 84ad58e4efcf80c154f693d4cc8f5c913511b760 (diff) |
[SCSI] export scsi-ml functions needed by tgt_scsi_lib and its LLDs
This patch contains the needed changes to the scsi-ml for the target
mode support.
Note, per the last review we moved almost all the fields we added
to the scsi_cmnd to our internal data structure which we are going
to try and kill off when we can replace it with support from other
parts of the kernel.
The one field we left on was the offset variable. This is needed to handle
the case where the target gets request that is so large that it cannot
execute it in one dma operation. So max_secotors or a segment limit may
limit the size of the transfer. In this case our tgt core code will
break up the command into managable transfers and send them to the
LLD one at a time. The offset is then used to tell the LLD where in
the command we are at. Is there another field on the scsi_cmd for
that?
Signed-off-by: Mike Christie <michaelc@cs.wisc.edu>
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
Diffstat (limited to 'drivers/scsi/hosts.c')
-rw-r--r-- | drivers/scsi/hosts.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/drivers/scsi/hosts.c b/drivers/scsi/hosts.c index 2ffdc9e0532d..38c3a291efac 100644 --- a/drivers/scsi/hosts.c +++ b/drivers/scsi/hosts.c | |||
@@ -263,6 +263,10 @@ static void scsi_host_dev_release(struct device *dev) | |||
263 | kthread_stop(shost->ehandler); | 263 | kthread_stop(shost->ehandler); |
264 | if (shost->work_q) | 264 | if (shost->work_q) |
265 | destroy_workqueue(shost->work_q); | 265 | destroy_workqueue(shost->work_q); |
266 | if (shost->uspace_req_q) { | ||
267 | kfree(shost->uspace_req_q->queuedata); | ||
268 | scsi_free_queue(shost->uspace_req_q); | ||
269 | } | ||
266 | 270 | ||
267 | scsi_destroy_command_freelist(shost); | 271 | scsi_destroy_command_freelist(shost); |
268 | if (shost->bqt) | 272 | if (shost->bqt) |