Skip to content

Commit 404d9a9

Browse files
Mark HaverkampJames Bottomley
authored andcommitted
[SCSI] aacraid: adjustable timeouts
Received From Mark Salyzyn Add the ability to adjust for unusual corner case failures. Both of these additional module parameters deal with embedded, non-intel or complicated system scenarios. Aif_timeout can be increased past the default 2 minute timeout to drop application registrations when a system has an unusually high event load resulting from continuing management requests, or simultaneous builds, or sluggish user space as a result of system load. Startup_timeout can be increased past the default 3 minute timeout to drop an adapter initialization for systems that have a very large number of targets, or slow to spin-up targets, or a complicated set of array configurations that extend the time for the firmware to declare that it is operational. This timeout would only have an affect on non-intel based systems, as the (more patient) BIOS would generally be where the startup delay would be dealt with. Signed-off-by: Mark Haverkamp <markh@osdl.org> Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
1 parent 3c1e0cc commit 404d9a9

File tree

6 files changed

+15
-7
lines changed

6 files changed

+15
-7
lines changed

drivers/scsi/aacraid/aachba.c

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -148,13 +148,19 @@ static int nondasd = -1;
148148
static int dacmode = -1;
149149

150150
static int commit = -1;
151+
int startup_timeout = 180;
152+
int aif_timeout = 120;
151153

152154
module_param(nondasd, int, S_IRUGO|S_IWUSR);
153155
MODULE_PARM_DESC(nondasd, "Control scanning of hba for nondasd devices. 0=off, 1=on");
154156
module_param(dacmode, int, S_IRUGO|S_IWUSR);
155157
MODULE_PARM_DESC(dacmode, "Control whether dma addressing is using 64 bit DAC. 0=off, 1=on");
156158
module_param(commit, int, S_IRUGO|S_IWUSR);
157159
MODULE_PARM_DESC(commit, "Control whether a COMMIT_CONFIG is issued to the adapter for foreign arrays.\nThis is typically needed in systems that do not have a BIOS. 0=off, 1=on");
160+
module_param(startup_timeout, int, S_IRUGO|S_IWUSR);
161+
MODULE_PARM_DESC(startup_timeout, "The duration of time in seconds to wait for adapter to have it's kernel up and\nrunning. This is typically adjusted for large systems that do not have a BIOS.");
162+
module_param(aif_timeout, int, S_IRUGO|S_IWUSR);
163+
MODULE_PARM_DESC(aif_timeout, "The duration of time in seconds to wait for applications to pick up AIFs before\nderegistering them. This is typically adjusted for heavily burdened systems.");
158164

159165
int numacb = -1;
160166
module_param(numacb, int, S_IRUGO|S_IWUSR);

drivers/scsi/aacraid/aacraid.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1815,3 +1815,5 @@ int aac_probe_container(struct aac_dev *dev, int cid);
18151815
extern int numacb;
18161816
extern int acbsize;
18171817
extern char aac_driver_version[];
1818+
extern int startup_timeout;
1819+
extern int aif_timeout;

drivers/scsi/aacraid/commsup.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1214,7 +1214,7 @@ int aac_command_thread(void *data)
12141214
* since the last read off
12151215
* the queue?
12161216
*/
1217-
if ((time_now - time_last) > 120) {
1217+
if ((time_now - time_last) > aif_timeout) {
12181218
entry = entry->next;
12191219
aac_close_fib_context(dev, fibctx);
12201220
continue;

drivers/scsi/aacraid/rkt.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -444,14 +444,14 @@ int aac_rkt_init(struct aac_dev *dev)
444444
*/
445445
while (!(rkt_readl(dev, MUnit.OMRx[0]) & KERNEL_UP_AND_RUNNING))
446446
{
447-
if(time_after(jiffies, start+180*HZ))
447+
if(time_after(jiffies, start+startup_timeout*HZ))
448448
{
449449
status = rkt_readl(dev, MUnit.OMRx[0]);
450450
printk(KERN_ERR "%s%d: adapter kernel failed to start, init status = %lx.\n",
451451
dev->name, instance, status);
452452
goto error_iounmap;
453453
}
454-
schedule_timeout_uninterruptible(1);
454+
msleep(1);
455455
}
456456
if (request_irq(dev->scsi_host_ptr->irq, aac_rkt_intr, SA_SHIRQ|SA_INTERRUPT, "aacraid", (void *)dev)<0)
457457
{

drivers/scsi/aacraid/rx.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -444,14 +444,14 @@ int aac_rx_init(struct aac_dev *dev)
444444
while ((!(rx_readl(dev, IndexRegs.Mailbox[7]) & KERNEL_UP_AND_RUNNING))
445445
|| (!(rx_readl(dev, MUnit.OMRx[0]) & KERNEL_UP_AND_RUNNING)))
446446
{
447-
if(time_after(jiffies, start+180*HZ))
447+
if(time_after(jiffies, start+startup_timeout*HZ))
448448
{
449449
status = rx_readl(dev, IndexRegs.Mailbox[7]);
450450
printk(KERN_ERR "%s%d: adapter kernel failed to start, init status = %lx.\n",
451451
dev->name, instance, status);
452452
goto error_iounmap;
453453
}
454-
schedule_timeout_uninterruptible(1);
454+
msleep(1);
455455
}
456456
if (request_irq(dev->scsi_host_ptr->irq, aac_rx_intr, SA_SHIRQ|SA_INTERRUPT, "aacraid", (void *)dev)<0)
457457
{

drivers/scsi/aacraid/sa.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -318,13 +318,13 @@ int aac_sa_init(struct aac_dev *dev)
318318
* Wait for the adapter to be up and running. Wait up to 3 minutes.
319319
*/
320320
while (!(sa_readl(dev, Mailbox7) & KERNEL_UP_AND_RUNNING)) {
321-
if (time_after(jiffies, start+180*HZ)) {
321+
if (time_after(jiffies, start+startup_timeout*HZ)) {
322322
status = sa_readl(dev, Mailbox7);
323323
printk(KERN_WARNING "%s%d: adapter kernel failed to start, init status = %lx.\n",
324324
name, instance, status);
325325
goto error_iounmap;
326326
}
327-
schedule_timeout_uninterruptible(1);
327+
msleep(1);
328328
}
329329

330330
if (request_irq(dev->scsi_host_ptr->irq, aac_sa_intr, SA_SHIRQ|SA_INTERRUPT, "aacraid", (void *)dev ) < 0) {

0 commit comments

Comments
 (0)