aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/s390
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@woody.linux-foundation.org>2007-02-11 14:44:25 -0500
committerLinus Torvalds <torvalds@woody.linux-foundation.org>2007-02-11 14:44:25 -0500
commit5f0b1437e0708772b6fecae5900c01c3b5f9b512 (patch)
treebcd923e305345178bc162ed8560d56a3af197224 /drivers/s390
parent574009c1a895aeeb85eaab29c235d75852b09eb8 (diff)
parent81b7bbd1932a04869d4c8635a75222dfc6089f96 (diff)
Merge master.kernel.org:/pub/scm/linux/kernel/git/jejb/scsi-misc-2.6
* master.kernel.org:/pub/scm/linux/kernel/git/jejb/scsi-misc-2.6: (97 commits) [SCSI] zfcp: removed wrong comment [SCSI] zfcp: use of uninitialized variable [SCSI] zfcp: Invalid locking order [SCSI] aic79xx: use dma_get_required_mask() [SCSI] aic79xx: fix bracket mismatch in unused macro [SCSI] BusLogic: Replace 'boolean' by 'bool' [SCSI] advansys: clean up warnings [SCSI] 53c7xx: brackets fix in uncompiled code [SCSI] nsp_cs: remove old scsi code [SCSI] aic79xx: make ahd_match_scb() static [SCSI] DAC960: kmalloc->kzalloc/Casting cleanups [SCSI] scsi_kmap_atomic_sg(): check that local irqs are disabled [SCSI] Buslogic: local_irq_disable() is redundant after local_irq_save() [SCSI] aic94xx: update for v28 firmware [SCSI] scsi_error: Fix lost EH commands [SCSI] aic94xx: Add default bus reset handler [SCSI] aic94xx: Remove TMF result code munging [SCSI] libsas: Add an LU reset mechanism to the error handler [SCSI] libsas: Don't BUG when connecting two expanders via wide port [SCSI] st: fix Tape dies if wrong block size used, bug 7919 ...
Diffstat (limited to 'drivers/s390')
-rw-r--r--drivers/s390/scsi/zfcp_erp.c22
-rw-r--r--drivers/s390/scsi/zfcp_ext.h2
-rw-r--r--drivers/s390/scsi/zfcp_fsf.c23
3 files changed, 19 insertions, 28 deletions
diff --git a/drivers/s390/scsi/zfcp_erp.c b/drivers/s390/scsi/zfcp_erp.c
index 88642dec080c..421da1e7c0ea 100644
--- a/drivers/s390/scsi/zfcp_erp.c
+++ b/drivers/s390/scsi/zfcp_erp.c
@@ -838,32 +838,28 @@ zfcp_erp_action_exists(struct zfcp_erp_action *erp_action)
838 * and does appropriate preparations (dismiss fsf request, ...) 838 * and does appropriate preparations (dismiss fsf request, ...)
839 * 839 *
840 * locks: called under erp_lock (disabled interrupts) 840 * locks: called under erp_lock (disabled interrupts)
841 *
842 * returns: 0
843 */ 841 */
844static int 842static void
845zfcp_erp_strategy_check_fsfreq(struct zfcp_erp_action *erp_action) 843zfcp_erp_strategy_check_fsfreq(struct zfcp_erp_action *erp_action)
846{ 844{
847 int retval = 0;
848 struct zfcp_fsf_req *fsf_req = NULL;
849 struct zfcp_adapter *adapter = erp_action->adapter; 845 struct zfcp_adapter *adapter = erp_action->adapter;
850 846
851 if (erp_action->fsf_req) { 847 if (erp_action->fsf_req) {
852 /* take lock to ensure that request is not deleted meanwhile */ 848 /* take lock to ensure that request is not deleted meanwhile */
853 spin_lock(&adapter->req_list_lock); 849 spin_lock(&adapter->req_list_lock);
854 if ((!zfcp_reqlist_ismember(adapter, 850 if (zfcp_reqlist_ismember(adapter,
855 erp_action->fsf_req->req_id)) && 851 erp_action->fsf_req->req_id)) {
856 (fsf_req->erp_action == erp_action)) {
857 /* fsf_req still exists */ 852 /* fsf_req still exists */
858 debug_text_event(adapter->erp_dbf, 3, "a_ca_req"); 853 debug_text_event(adapter->erp_dbf, 3, "a_ca_req");
859 debug_event(adapter->erp_dbf, 3, &fsf_req, 854 debug_event(adapter->erp_dbf, 3, &erp_action->fsf_req,
860 sizeof (unsigned long)); 855 sizeof (unsigned long));
861 /* dismiss fsf_req of timed out/dismissed erp_action */ 856 /* dismiss fsf_req of timed out/dismissed erp_action */
862 if (erp_action->status & (ZFCP_STATUS_ERP_DISMISSED | 857 if (erp_action->status & (ZFCP_STATUS_ERP_DISMISSED |
863 ZFCP_STATUS_ERP_TIMEDOUT)) { 858 ZFCP_STATUS_ERP_TIMEDOUT)) {
864 debug_text_event(adapter->erp_dbf, 3, 859 debug_text_event(adapter->erp_dbf, 3,
865 "a_ca_disreq"); 860 "a_ca_disreq");
866 fsf_req->status |= ZFCP_STATUS_FSFREQ_DISMISSED; 861 erp_action->fsf_req->status |=
862 ZFCP_STATUS_FSFREQ_DISMISSED;
867 } 863 }
868 if (erp_action->status & ZFCP_STATUS_ERP_TIMEDOUT) { 864 if (erp_action->status & ZFCP_STATUS_ERP_TIMEDOUT) {
869 ZFCP_LOG_NORMAL("error: erp step timed out " 865 ZFCP_LOG_NORMAL("error: erp step timed out "
@@ -876,11 +872,11 @@ zfcp_erp_strategy_check_fsfreq(struct zfcp_erp_action *erp_action)
876 * then keep it running asynchronously and don't mess 872 * then keep it running asynchronously and don't mess
877 * with the association of erp_action and fsf_req. 873 * with the association of erp_action and fsf_req.
878 */ 874 */
879 if (fsf_req->status & (ZFCP_STATUS_FSFREQ_COMPLETED | 875 if (erp_action->fsf_req->status &
876 (ZFCP_STATUS_FSFREQ_COMPLETED |
880 ZFCP_STATUS_FSFREQ_DISMISSED)) { 877 ZFCP_STATUS_FSFREQ_DISMISSED)) {
881 /* forget about association between fsf_req 878 /* forget about association between fsf_req
882 and erp_action */ 879 and erp_action */
883 fsf_req->erp_action = NULL;
884 erp_action->fsf_req = NULL; 880 erp_action->fsf_req = NULL;
885 } 881 }
886 } else { 882 } else {
@@ -894,8 +890,6 @@ zfcp_erp_strategy_check_fsfreq(struct zfcp_erp_action *erp_action)
894 spin_unlock(&adapter->req_list_lock); 890 spin_unlock(&adapter->req_list_lock);
895 } else 891 } else
896 debug_text_event(adapter->erp_dbf, 3, "a_ca_noreq"); 892 debug_text_event(adapter->erp_dbf, 3, "a_ca_noreq");
897
898 return retval;
899} 893}
900 894
901/** 895/**
diff --git a/drivers/s390/scsi/zfcp_ext.h b/drivers/s390/scsi/zfcp_ext.h
index cda0cc095ad1..01386ac688a2 100644
--- a/drivers/s390/scsi/zfcp_ext.h
+++ b/drivers/s390/scsi/zfcp_ext.h
@@ -89,7 +89,7 @@ extern int zfcp_fsf_control_file(struct zfcp_adapter *, struct zfcp_fsf_req **,
89 u32, u32, struct zfcp_sg_list *); 89 u32, u32, struct zfcp_sg_list *);
90extern void zfcp_fsf_start_timer(struct zfcp_fsf_req *, unsigned long); 90extern void zfcp_fsf_start_timer(struct zfcp_fsf_req *, unsigned long);
91extern void zfcp_erp_start_timer(struct zfcp_fsf_req *); 91extern void zfcp_erp_start_timer(struct zfcp_fsf_req *);
92extern int zfcp_fsf_req_dismiss_all(struct zfcp_adapter *); 92extern void zfcp_fsf_req_dismiss_all(struct zfcp_adapter *);
93extern int zfcp_fsf_status_read(struct zfcp_adapter *, int); 93extern int zfcp_fsf_status_read(struct zfcp_adapter *, int);
94extern int zfcp_fsf_req_create(struct zfcp_adapter *, u32, int, mempool_t *, 94extern int zfcp_fsf_req_create(struct zfcp_adapter *, u32, int, mempool_t *,
95 unsigned long *, struct zfcp_fsf_req **); 95 unsigned long *, struct zfcp_fsf_req **);
diff --git a/drivers/s390/scsi/zfcp_fsf.c b/drivers/s390/scsi/zfcp_fsf.c
index 4b3ae3f22e78..ef16f7ca4bb1 100644
--- a/drivers/s390/scsi/zfcp_fsf.c
+++ b/drivers/s390/scsi/zfcp_fsf.c
@@ -176,28 +176,25 @@ static void zfcp_fsf_req_dismiss(struct zfcp_adapter *adapter,
176/** 176/**
177 * zfcp_fsf_req_dismiss_all - dismiss all remaining fsf requests 177 * zfcp_fsf_req_dismiss_all - dismiss all remaining fsf requests
178 */ 178 */
179int zfcp_fsf_req_dismiss_all(struct zfcp_adapter *adapter) 179void zfcp_fsf_req_dismiss_all(struct zfcp_adapter *adapter)
180{ 180{
181 struct zfcp_fsf_req *request, *tmp; 181 struct zfcp_fsf_req *request, *tmp;
182 unsigned long flags; 182 unsigned long flags;
183 LIST_HEAD(remove_queue);
183 unsigned int i, counter; 184 unsigned int i, counter;
184 185
185 spin_lock_irqsave(&adapter->req_list_lock, flags); 186 spin_lock_irqsave(&adapter->req_list_lock, flags);
186 atomic_set(&adapter->reqs_active, 0); 187 atomic_set(&adapter->reqs_active, 0);
187 for (i=0; i<REQUEST_LIST_SIZE; i++) { 188 for (i=0; i<REQUEST_LIST_SIZE; i++)
188 if (list_empty(&adapter->req_list[i])) 189 list_splice_init(&adapter->req_list[i], &remove_queue);
189 continue; 190
190
191 counter = 0;
192 list_for_each_entry_safe(request, tmp,
193 &adapter->req_list[i], list) {
194 zfcp_fsf_req_dismiss(adapter, request, counter);
195 counter++;
196 }
197 }
198 spin_unlock_irqrestore(&adapter->req_list_lock, flags); 191 spin_unlock_irqrestore(&adapter->req_list_lock, flags);
199 192
200 return 0; 193 counter = 0;
194 list_for_each_entry_safe(request, tmp, &remove_queue, list) {
195 zfcp_fsf_req_dismiss(adapter, request, counter);
196 counter++;
197 }
201} 198}
202 199
203/* 200/*