Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 77120
b: refs/heads/master
c: d9aa3af
h: refs/heads/master
v: v3
  • Loading branch information
Krzysztof Helt authored and James Bottomley committed Jan 23, 2008
1 parent d7ec87f commit bbb6834
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: 3a0086a80ab7c2f1adb0e9b2a6fc82632979cec5
refs/heads/master: d9aa3af09cdc5d3ae0e67bed4107bcf7e25b9f31
13 changes: 7 additions & 6 deletions trunk/drivers/scsi/sym53c8xx_2/sym_glue.c
Original file line number Diff line number Diff line change
Expand Up @@ -609,22 +609,24 @@ static int sym_eh_handler(int op, char *opname, struct scsi_cmnd *cmd)
*/
#define WAIT_FOR_PCI_RECOVERY 35
if (pci_channel_offline(pdev)) {
struct completion *io_reset;
int finished_reset = 0;
init_completion(&eh_done);
spin_lock_irq(shost->host_lock);
/* Make sure we didn't race */
if (pci_channel_offline(pdev)) {
if (!sym_data->io_reset)
sym_data->io_reset = &eh_done;
io_reset = sym_data->io_reset;
BUG_ON(sym_data->io_reset);
sym_data->io_reset = &eh_done;
} else {
finished_reset = 1;
}
spin_unlock_irq(shost->host_lock);
if (!finished_reset)
finished_reset = wait_for_completion_timeout(io_reset,
finished_reset = wait_for_completion_timeout
(sym_data->io_reset,
WAIT_FOR_PCI_RECOVERY*HZ);
spin_lock_irq(shost->host_lock);
sym_data->io_reset = NULL;
spin_unlock_irq(shost->host_lock);
if (!finished_reset)
return SCSI_FAILED;
}
Expand Down Expand Up @@ -1879,7 +1881,6 @@ static void sym2_io_resume(struct pci_dev *pdev)
spin_lock_irq(shost->host_lock);
if (sym_data->io_reset)
complete_all(sym_data->io_reset);
sym_data->io_reset = NULL;
spin_unlock_irq(shost->host_lock);
}

Expand Down

0 comments on commit bbb6834

Please sign in to comment.