Commit 404d9a90 authored by Mark Haverkamp's avatar Mark Haverkamp Committed by James Bottomley

[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: default avatarMark Haverkamp <markh@osdl.org>
Signed-off-by: default avatarJames Bottomley <James.Bottomley@SteelEye.com>
parent 3c1e0cca
...@@ -148,6 +148,8 @@ static int nondasd = -1; ...@@ -148,6 +148,8 @@ static int nondasd = -1;
static int dacmode = -1; static int dacmode = -1;
static int commit = -1; static int commit = -1;
int startup_timeout = 180;
int aif_timeout = 120;
module_param(nondasd, int, S_IRUGO|S_IWUSR); module_param(nondasd, int, S_IRUGO|S_IWUSR);
MODULE_PARM_DESC(nondasd, "Control scanning of hba for nondasd devices. 0=off, 1=on"); MODULE_PARM_DESC(nondasd, "Control scanning of hba for nondasd devices. 0=off, 1=on");
...@@ -155,6 +157,10 @@ module_param(dacmode, int, S_IRUGO|S_IWUSR); ...@@ -155,6 +157,10 @@ module_param(dacmode, int, S_IRUGO|S_IWUSR);
MODULE_PARM_DESC(dacmode, "Control whether dma addressing is using 64 bit DAC. 0=off, 1=on"); MODULE_PARM_DESC(dacmode, "Control whether dma addressing is using 64 bit DAC. 0=off, 1=on");
module_param(commit, int, S_IRUGO|S_IWUSR); module_param(commit, int, S_IRUGO|S_IWUSR);
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"); 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");
module_param(startup_timeout, int, S_IRUGO|S_IWUSR);
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.");
module_param(aif_timeout, int, S_IRUGO|S_IWUSR);
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.");
int numacb = -1; int numacb = -1;
module_param(numacb, int, S_IRUGO|S_IWUSR); module_param(numacb, int, S_IRUGO|S_IWUSR);
......
...@@ -1815,3 +1815,5 @@ int aac_probe_container(struct aac_dev *dev, int cid); ...@@ -1815,3 +1815,5 @@ int aac_probe_container(struct aac_dev *dev, int cid);
extern int numacb; extern int numacb;
extern int acbsize; extern int acbsize;
extern char aac_driver_version[]; extern char aac_driver_version[];
extern int startup_timeout;
extern int aif_timeout;
...@@ -1214,7 +1214,7 @@ int aac_command_thread(void *data) ...@@ -1214,7 +1214,7 @@ int aac_command_thread(void *data)
* since the last read off * since the last read off
* the queue? * the queue?
*/ */
if ((time_now - time_last) > 120) { if ((time_now - time_last) > aif_timeout) {
entry = entry->next; entry = entry->next;
aac_close_fib_context(dev, fibctx); aac_close_fib_context(dev, fibctx);
continue; continue;
......
...@@ -444,14 +444,14 @@ int aac_rkt_init(struct aac_dev *dev) ...@@ -444,14 +444,14 @@ int aac_rkt_init(struct aac_dev *dev)
*/ */
while (!(rkt_readl(dev, MUnit.OMRx[0]) & KERNEL_UP_AND_RUNNING)) while (!(rkt_readl(dev, MUnit.OMRx[0]) & KERNEL_UP_AND_RUNNING))
{ {
if(time_after(jiffies, start+180*HZ)) if(time_after(jiffies, start+startup_timeout*HZ))
{ {
status = rkt_readl(dev, MUnit.OMRx[0]); status = rkt_readl(dev, MUnit.OMRx[0]);
printk(KERN_ERR "%s%d: adapter kernel failed to start, init status = %lx.\n", printk(KERN_ERR "%s%d: adapter kernel failed to start, init status = %lx.\n",
dev->name, instance, status); dev->name, instance, status);
goto error_iounmap; goto error_iounmap;
} }
schedule_timeout_uninterruptible(1); msleep(1);
} }
if (request_irq(dev->scsi_host_ptr->irq, aac_rkt_intr, SA_SHIRQ|SA_INTERRUPT, "aacraid", (void *)dev)<0) if (request_irq(dev->scsi_host_ptr->irq, aac_rkt_intr, SA_SHIRQ|SA_INTERRUPT, "aacraid", (void *)dev)<0)
{ {
......
...@@ -444,14 +444,14 @@ int aac_rx_init(struct aac_dev *dev) ...@@ -444,14 +444,14 @@ int aac_rx_init(struct aac_dev *dev)
while ((!(rx_readl(dev, IndexRegs.Mailbox[7]) & KERNEL_UP_AND_RUNNING)) while ((!(rx_readl(dev, IndexRegs.Mailbox[7]) & KERNEL_UP_AND_RUNNING))
|| (!(rx_readl(dev, MUnit.OMRx[0]) & KERNEL_UP_AND_RUNNING))) || (!(rx_readl(dev, MUnit.OMRx[0]) & KERNEL_UP_AND_RUNNING)))
{ {
if(time_after(jiffies, start+180*HZ)) if(time_after(jiffies, start+startup_timeout*HZ))
{ {
status = rx_readl(dev, IndexRegs.Mailbox[7]); status = rx_readl(dev, IndexRegs.Mailbox[7]);
printk(KERN_ERR "%s%d: adapter kernel failed to start, init status = %lx.\n", printk(KERN_ERR "%s%d: adapter kernel failed to start, init status = %lx.\n",
dev->name, instance, status); dev->name, instance, status);
goto error_iounmap; goto error_iounmap;
} }
schedule_timeout_uninterruptible(1); msleep(1);
} }
if (request_irq(dev->scsi_host_ptr->irq, aac_rx_intr, SA_SHIRQ|SA_INTERRUPT, "aacraid", (void *)dev)<0) if (request_irq(dev->scsi_host_ptr->irq, aac_rx_intr, SA_SHIRQ|SA_INTERRUPT, "aacraid", (void *)dev)<0)
{ {
......
...@@ -318,13 +318,13 @@ int aac_sa_init(struct aac_dev *dev) ...@@ -318,13 +318,13 @@ int aac_sa_init(struct aac_dev *dev)
* Wait for the adapter to be up and running. Wait up to 3 minutes. * Wait for the adapter to be up and running. Wait up to 3 minutes.
*/ */
while (!(sa_readl(dev, Mailbox7) & KERNEL_UP_AND_RUNNING)) { while (!(sa_readl(dev, Mailbox7) & KERNEL_UP_AND_RUNNING)) {
if (time_after(jiffies, start+180*HZ)) { if (time_after(jiffies, start+startup_timeout*HZ)) {
status = sa_readl(dev, Mailbox7); status = sa_readl(dev, Mailbox7);
printk(KERN_WARNING "%s%d: adapter kernel failed to start, init status = %lx.\n", printk(KERN_WARNING "%s%d: adapter kernel failed to start, init status = %lx.\n",
name, instance, status); name, instance, status);
goto error_iounmap; goto error_iounmap;
} }
schedule_timeout_uninterruptible(1); msleep(1);
} }
if (request_irq(dev->scsi_host_ptr->irq, aac_sa_intr, SA_SHIRQ|SA_INTERRUPT, "aacraid", (void *)dev ) < 0) { if (request_irq(dev->scsi_host_ptr->irq, aac_sa_intr, SA_SHIRQ|SA_INTERRUPT, "aacraid", (void *)dev ) < 0) {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment