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>
Этот коммит содержится в:
Edmund Nadolski
2011-05-19 11:59:10 +00:00
коммит произвёл Dan Williams
родитель 9269e0e898
Коммит 5553ba2be0
4 изменённых файлов: 60 добавлений и 25 удалений

Просмотреть файл

@@ -1359,6 +1359,13 @@ void isci_host_deinit(struct isci_host *ihost)
wait_for_stop(ihost);
scic_controller_reset(&ihost->sci);
/* Cancel any/all outstanding port timers */
for (i = 0; i < ihost->sci.logical_port_entries; i++) {
struct scic_sds_port *sci_port = &ihost->ports[i].sci;
del_timer_sync(&sci_port->timer.timer);
}
isci_timer_list_destroy(ihost);
}