Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 234978
b: refs/heads/master
c: c34aeeb
h: refs/heads/master
v: v3
  • Loading branch information
James Bottomley authored and Jeff Garzik committed Mar 2, 2011
1 parent 8f559e8 commit fe44603
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 3 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: a29b5dad46ee4168c8fc18e47dabbde49790527b
refs/heads/master: c34aeebc06e8bdde93e8c8f40d9903b1aaab63c6
9 changes: 7 additions & 2 deletions trunk/drivers/ata/libata-eh.c
Original file line number Diff line number Diff line change
Expand Up @@ -589,9 +589,14 @@ void ata_scsi_error(struct Scsi_Host *host)
struct ata_port *ap = ata_shost_to_port(host);
int i;
unsigned long flags;
LIST_HEAD(eh_work_q);

DPRINTK("ENTER\n");

spin_lock_irqsave(host->host_lock, flags);
list_splice_init(&host->eh_cmd_q, &eh_work_q);
spin_unlock_irqrestore(host->host_lock, flags);

/* make sure sff pio task is not running */
ata_sff_flush_pio_task(ap);

Expand Down Expand Up @@ -627,7 +632,7 @@ void ata_scsi_error(struct Scsi_Host *host)
if (ap->ops->lost_interrupt)
ap->ops->lost_interrupt(ap);

list_for_each_entry_safe(scmd, tmp, &host->eh_cmd_q, eh_entry) {
list_for_each_entry_safe(scmd, tmp, &eh_work_q, eh_entry) {
struct ata_queued_cmd *qc;

for (i = 0; i < ATA_MAX_QUEUE; i++) {
Expand Down Expand Up @@ -762,7 +767,7 @@ void ata_scsi_error(struct Scsi_Host *host)
}

/* finish or retry handled scmd's and clean up */
WARN_ON(host->host_failed || !list_empty(&host->eh_cmd_q));
WARN_ON(host->host_failed || !list_empty(&eh_work_q));

scsi_eh_flush_done_q(&ap->eh_done_q);

Expand Down

0 comments on commit fe44603

Please sign in to comment.