diff options
author | Edmund Nadolski <edmund.nadolski@intel.com> | 2011-05-19 07:59:10 -0400 |
---|---|---|
committer | Dan Williams <dan.j.williams@intel.com> | 2011-07-03 07:04:49 -0400 |
commit | 5553ba2be0f3e3741e1a885a33d2b89921f9fd48 (patch) | |
tree | ba29bd7a120cc170b4b6e9f09ee8a4751a3773be /drivers/scsi/isci/host.c | |
parent | 9269e0e898594c65dee6b20d4ed48e33dbbd4eeb (diff) |
isci: replace isci_timer list with proper embedded timers
Rather than preallocating a list of timers and doling them out at runtime,
embed a struct timerlist in each object that needs one. A struct sci_timer
interface is introduced to manage the timer cancellation semantics which
currently need to guarantee the timer is cancelled while holding
spin_lock(ihost->scic_lock). Since the timeout functions also need to acquire
the lock it currently prevents the driver from using del_timer_sync() for
runtime cancellations.
del_timer_sync() is used however before the objects go out of scope.
Signed-off-by: Edmund Nadolski <edmund.nadolski@intel.com>
Signed-off-by: Dan Williams <dan.j.williams@intel.com>
Diffstat (limited to 'drivers/scsi/isci/host.c')
-rw-r--r-- | drivers/scsi/isci/host.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/drivers/scsi/isci/host.c b/drivers/scsi/isci/host.c index 6cd7648197e1..a3269b6fa225 100644 --- a/drivers/scsi/isci/host.c +++ b/drivers/scsi/isci/host.c | |||
@@ -1359,6 +1359,13 @@ void isci_host_deinit(struct isci_host *ihost) | |||
1359 | 1359 | ||
1360 | wait_for_stop(ihost); | 1360 | wait_for_stop(ihost); |
1361 | scic_controller_reset(&ihost->sci); | 1361 | scic_controller_reset(&ihost->sci); |
1362 | |||
1363 | /* Cancel any/all outstanding port timers */ | ||
1364 | for (i = 0; i < ihost->sci.logical_port_entries; i++) { | ||
1365 | struct scic_sds_port *sci_port = &ihost->ports[i].sci; | ||
1366 | del_timer_sync(&sci_port->timer.timer); | ||
1367 | } | ||
1368 | |||
1362 | isci_timer_list_destroy(ihost); | 1369 | isci_timer_list_destroy(ihost); |
1363 | } | 1370 | } |
1364 | 1371 | ||