diff options
author | Christoph Hellwig <hch@lst.de> | 2005-10-31 12:49:52 -0500 |
---|---|---|
committer | James Bottomley <jejb@mulgrave.(none)> | 2005-11-06 13:49:36 -0500 |
commit | 7dfdc9a52b4219fba8240750e36de5db860ddd5f (patch) | |
tree | b7be4c6a706aad1ce4e07ac22dea6c2afb050868 /include | |
parent | 262eef663b579f9b495c7392ac7d2d3f34ecc9fe (diff) |
[SCSI] use a completion in scsi_send_eh_cmnd
scsi_send_eh_cmnd currently uses a semaphore and an overload of eh_timer
to either get a completion for a command for a timeout.
Switch to using a completion and wait_for_completion_timeout to simply
the code and not having to deal with the races ourselves.
Signed-off-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
Diffstat (limited to 'include')
-rw-r--r-- | include/scsi/scsi_host.h | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/include/scsi/scsi_host.h b/include/scsi/scsi_host.h index 9984d3fbb1f0..6cbb1982ed03 100644 --- a/include/scsi/scsi_host.h +++ b/include/scsi/scsi_host.h | |||
@@ -7,6 +7,7 @@ | |||
7 | #include <linux/workqueue.h> | 7 | #include <linux/workqueue.h> |
8 | 8 | ||
9 | struct block_device; | 9 | struct block_device; |
10 | struct completion; | ||
10 | struct module; | 11 | struct module; |
11 | struct scsi_cmnd; | 12 | struct scsi_cmnd; |
12 | struct scsi_device; | 13 | struct scsi_device; |
@@ -467,8 +468,8 @@ struct Scsi_Host { | |||
467 | 468 | ||
468 | struct list_head eh_cmd_q; | 469 | struct list_head eh_cmd_q; |
469 | struct task_struct * ehandler; /* Error recovery thread. */ | 470 | struct task_struct * ehandler; /* Error recovery thread. */ |
470 | struct semaphore * eh_action; /* Wait for specific actions on the | 471 | struct completion * eh_action; /* Wait for specific actions on the |
471 | host. */ | 472 | host. */ |
472 | wait_queue_head_t host_wait; | 473 | wait_queue_head_t host_wait; |
473 | struct scsi_host_template *hostt; | 474 | struct scsi_host_template *hostt; |
474 | struct scsi_transport_template *transportt; | 475 | struct scsi_transport_template *transportt; |