Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 293028
b: refs/heads/master
c: 8402347
h: refs/heads/master
v: v3
  • Loading branch information
Dan Williams authored and James Bottomley committed Feb 29, 2012
1 parent 8a9633a commit 4db8032
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 7 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 9508a66f898d46e726a318469312b45e0b1d078b
refs/heads/master: 840234745edaa82d514420dc1086e63536493a51
13 changes: 7 additions & 6 deletions trunk/drivers/scsi/libsas/sas_scsi_host.c
Original file line number Diff line number Diff line change
Expand Up @@ -521,8 +521,7 @@ static int try_to_reset_cmd_device(struct scsi_cmnd *cmd)
return FAILED;
}

static int sas_eh_handle_sas_errors(struct Scsi_Host *shost,
struct list_head *work_q)
static void sas_eh_handle_sas_errors(struct Scsi_Host *shost, struct list_head *work_q)
{
struct scsi_cmnd *cmd, *n;
enum task_disposition res = TASK_IS_DONE;
Expand Down Expand Up @@ -658,7 +657,7 @@ static int sas_eh_handle_sas_errors(struct Scsi_Host *shost,
out:
list_splice_tail(&done, work_q);
list_splice_tail_init(&ha->eh_ata_q, work_q);
return list_empty(work_q);
return;

clear_q:
SAS_DPRINTK("--- Exit %s -- clear_q\n", __func__);
Expand All @@ -682,10 +681,13 @@ void sas_scsi_recover_host(struct Scsi_Host *shost)
__func__, shost->host_busy, shost->host_failed);
/*
* Deal with commands that still have SAS tasks (i.e. they didn't
* complete via the normal sas_task completion mechanism)
* complete via the normal sas_task completion mechanism),
* SAS_HA_FROZEN gives eh dominion over all sas_task completion.
*/
set_bit(SAS_HA_FROZEN, &ha->state);
if (sas_eh_handle_sas_errors(shost, &eh_work_q))
sas_eh_handle_sas_errors(shost, &eh_work_q);
clear_bit(SAS_HA_FROZEN, &ha->state);
if (list_empty(&eh_work_q))
goto out;

/*
Expand All @@ -699,7 +701,6 @@ void sas_scsi_recover_host(struct Scsi_Host *shost)
scsi_eh_ready_devs(shost, &eh_work_q, &ha->eh_done_q);

out:
clear_bit(SAS_HA_FROZEN, &ha->state);
if (ha->lldd_max_execute_num > 1)
wake_up_process(ha->core.queue_thread);

Expand Down

0 comments on commit 4db8032

Please sign in to comment.