mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-30 11:41:38 -04:00
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 ...
This commit is contained in:
commit
5f0b1437e0
104 changed files with 5827 additions and 3135 deletions
|
|
@ -838,32 +838,28 @@ zfcp_erp_action_exists(struct zfcp_erp_action *erp_action)
|
|||
* and does appropriate preparations (dismiss fsf request, ...)
|
||||
*
|
||||
* locks: called under erp_lock (disabled interrupts)
|
||||
*
|
||||
* returns: 0
|
||||
*/
|
||||
static int
|
||||
static void
|
||||
zfcp_erp_strategy_check_fsfreq(struct zfcp_erp_action *erp_action)
|
||||
{
|
||||
int retval = 0;
|
||||
struct zfcp_fsf_req *fsf_req = NULL;
|
||||
struct zfcp_adapter *adapter = erp_action->adapter;
|
||||
|
||||
if (erp_action->fsf_req) {
|
||||
/* take lock to ensure that request is not deleted meanwhile */
|
||||
spin_lock(&adapter->req_list_lock);
|
||||
if ((!zfcp_reqlist_ismember(adapter,
|
||||
erp_action->fsf_req->req_id)) &&
|
||||
(fsf_req->erp_action == erp_action)) {
|
||||
if (zfcp_reqlist_ismember(adapter,
|
||||
erp_action->fsf_req->req_id)) {
|
||||
/* fsf_req still exists */
|
||||
debug_text_event(adapter->erp_dbf, 3, "a_ca_req");
|
||||
debug_event(adapter->erp_dbf, 3, &fsf_req,
|
||||
debug_event(adapter->erp_dbf, 3, &erp_action->fsf_req,
|
||||
sizeof (unsigned long));
|
||||
/* dismiss fsf_req of timed out/dismissed erp_action */
|
||||
if (erp_action->status & (ZFCP_STATUS_ERP_DISMISSED |
|
||||
ZFCP_STATUS_ERP_TIMEDOUT)) {
|
||||
debug_text_event(adapter->erp_dbf, 3,
|
||||
"a_ca_disreq");
|
||||
fsf_req->status |= ZFCP_STATUS_FSFREQ_DISMISSED;
|
||||
erp_action->fsf_req->status |=
|
||||
ZFCP_STATUS_FSFREQ_DISMISSED;
|
||||
}
|
||||
if (erp_action->status & ZFCP_STATUS_ERP_TIMEDOUT) {
|
||||
ZFCP_LOG_NORMAL("error: erp step timed out "
|
||||
|
|
@ -876,11 +872,11 @@ zfcp_erp_strategy_check_fsfreq(struct zfcp_erp_action *erp_action)
|
|||
* then keep it running asynchronously and don't mess
|
||||
* with the association of erp_action and fsf_req.
|
||||
*/
|
||||
if (fsf_req->status & (ZFCP_STATUS_FSFREQ_COMPLETED |
|
||||
if (erp_action->fsf_req->status &
|
||||
(ZFCP_STATUS_FSFREQ_COMPLETED |
|
||||
ZFCP_STATUS_FSFREQ_DISMISSED)) {
|
||||
/* forget about association between fsf_req
|
||||
and erp_action */
|
||||
fsf_req->erp_action = NULL;
|
||||
erp_action->fsf_req = NULL;
|
||||
}
|
||||
} else {
|
||||
|
|
@ -894,8 +890,6 @@ zfcp_erp_strategy_check_fsfreq(struct zfcp_erp_action *erp_action)
|
|||
spin_unlock(&adapter->req_list_lock);
|
||||
} else
|
||||
debug_text_event(adapter->erp_dbf, 3, "a_ca_noreq");
|
||||
|
||||
return retval;
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
|||
|
|
@ -89,7 +89,7 @@ extern int zfcp_fsf_control_file(struct zfcp_adapter *, struct zfcp_fsf_req **,
|
|||
u32, u32, struct zfcp_sg_list *);
|
||||
extern void zfcp_fsf_start_timer(struct zfcp_fsf_req *, unsigned long);
|
||||
extern void zfcp_erp_start_timer(struct zfcp_fsf_req *);
|
||||
extern int zfcp_fsf_req_dismiss_all(struct zfcp_adapter *);
|
||||
extern void zfcp_fsf_req_dismiss_all(struct zfcp_adapter *);
|
||||
extern int zfcp_fsf_status_read(struct zfcp_adapter *, int);
|
||||
extern int zfcp_fsf_req_create(struct zfcp_adapter *, u32, int, mempool_t *,
|
||||
unsigned long *, struct zfcp_fsf_req **);
|
||||
|
|
|
|||
|
|
@ -176,28 +176,25 @@ static void zfcp_fsf_req_dismiss(struct zfcp_adapter *adapter,
|
|||
/**
|
||||
* zfcp_fsf_req_dismiss_all - dismiss all remaining fsf requests
|
||||
*/
|
||||
int zfcp_fsf_req_dismiss_all(struct zfcp_adapter *adapter)
|
||||
void zfcp_fsf_req_dismiss_all(struct zfcp_adapter *adapter)
|
||||
{
|
||||
struct zfcp_fsf_req *request, *tmp;
|
||||
unsigned long flags;
|
||||
LIST_HEAD(remove_queue);
|
||||
unsigned int i, counter;
|
||||
|
||||
spin_lock_irqsave(&adapter->req_list_lock, flags);
|
||||
atomic_set(&adapter->reqs_active, 0);
|
||||
for (i=0; i<REQUEST_LIST_SIZE; i++) {
|
||||
if (list_empty(&adapter->req_list[i]))
|
||||
continue;
|
||||
for (i=0; i<REQUEST_LIST_SIZE; i++)
|
||||
list_splice_init(&adapter->req_list[i], &remove_queue);
|
||||
|
||||
counter = 0;
|
||||
list_for_each_entry_safe(request, tmp,
|
||||
&adapter->req_list[i], list) {
|
||||
zfcp_fsf_req_dismiss(adapter, request, counter);
|
||||
counter++;
|
||||
}
|
||||
}
|
||||
spin_unlock_irqrestore(&adapter->req_list_lock, flags);
|
||||
|
||||
return 0;
|
||||
counter = 0;
|
||||
list_for_each_entry_safe(request, tmp, &remove_queue, list) {
|
||||
zfcp_fsf_req_dismiss(adapter, request, counter);
|
||||
counter++;
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
|
|
|
|||
Loading…
Reference in a new issue