Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 9559
b: refs/heads/master
c: 9203344
h: refs/heads/master
i:
  9557: edc5d42
  9555: 1ba3158
  9551: a313cf7
v: v3
  • Loading branch information
Mark Haverkamp authored and James Bottomley committed Sep 26, 2005
1 parent 29865eb commit a9b27db
Show file tree
Hide file tree
Showing 4 changed files with 32 additions and 4 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: 08efb7b6116927c8b6e0af5064448e3aa13300e6
refs/heads/master: 9203344cb8ecc554a1d36eae6661235ed422cf59
2 changes: 1 addition & 1 deletion trunk/drivers/scsi/aacraid/aachba.c
Original file line number Diff line number Diff line change
Expand Up @@ -692,7 +692,7 @@ int aac_get_adapter_info(struct aac_dev* dev)
fibptr,
sizeof(*info),
FsaNormal,
1, 1,
-1, 1, /* First `interrupt' command uses special wait */
NULL,
NULL);

Expand Down
2 changes: 1 addition & 1 deletion trunk/drivers/scsi/aacraid/comminit.c
Original file line number Diff line number Diff line change
Expand Up @@ -195,7 +195,7 @@ int aac_send_shutdown(struct aac_dev * dev)
fibctx,
sizeof(struct aac_close),
FsaNormal,
1, 1,
-2 /* Timeout silently */, 1,
NULL, NULL);

if (status == 0)
Expand Down
30 changes: 29 additions & 1 deletion trunk/drivers/scsi/aacraid/commsup.c
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@
#include <scsi/scsi_host.h>
#include <scsi/scsi_device.h>
#include <asm/semaphore.h>
#include <asm/delay.h>

#include "aacraid.h"

Expand Down Expand Up @@ -541,7 +542,34 @@ int fib_send(u16 command, struct fib * fibptr, unsigned long size, int priority

if (wait) {
spin_unlock_irqrestore(&fibptr->event_lock, flags);
down(&fibptr->event_wait);
/* Only set for first known interruptable command */
if (wait < 0) {
/*
* *VERY* Dangerous to time out a command, the
* assumption is made that we have no hope of
* functioning because an interrupt routing or other
* hardware failure has occurred.
*/
unsigned long count = 36000000L; /* 3 minutes */
unsigned long qflags;
while (down_trylock(&fibptr->event_wait)) {
if (--count == 0) {
spin_lock_irqsave(q->lock, qflags);
q->numpending--;
list_del(&fibptr->queue);
spin_unlock_irqrestore(q->lock, qflags);
if (wait == -1) {
printk(KERN_ERR "aacraid: fib_send: first asynchronous command timed out.\n"
"Usually a result of a PCI interrupt routing problem;\n"
"update mother board BIOS or consider utilizing one of\n"
"the SAFE mode kernel options (acpi, apic etc)\n");
}
return -ETIMEDOUT;
}
udelay(5);
}
} else
down(&fibptr->event_wait);
if(fibptr->done == 0)
BUG();

Expand Down

0 comments on commit a9b27db

Please sign in to comment.