diff options
author | Brian King <brking@linux.vnet.ibm.com> | 2007-03-29 13:42:40 -0400 |
---|---|---|
committer | James Bottomley <jejb@mulgrave.il.steeleye.com> | 2007-04-01 12:15:26 -0400 |
commit | 5469cb5bdef76dbe18865fff30975f0694fff2c2 (patch) | |
tree | d6b596eb15bfbd247f40fbaff9da3aaaf6098f3e /drivers/scsi/ipr.c | |
parent | 0979c84b4affaf924a894380dd0069638b64de03 (diff) |
[SCSI] ipr: Make adapter operational timeout be per adapter type
Some ipr adapters may take longer than others to come operational.
This patch makes this timeout different for different adapters,
while still preserving the module parameter which can be used
to globally override the default.
Signed-off-by: Brian King <brking@linux.vnet.ibm.com>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
Diffstat (limited to 'drivers/scsi/ipr.c')
-rw-r--r-- | drivers/scsi/ipr.c | 29 |
1 files changed, 21 insertions, 8 deletions
diff --git a/drivers/scsi/ipr.c b/drivers/scsi/ipr.c index 95045e33710d..ba17ac501278 100644 --- a/drivers/scsi/ipr.c +++ b/drivers/scsi/ipr.c | |||
@@ -89,7 +89,7 @@ static unsigned int ipr_log_level = IPR_DEFAULT_LOG_LEVEL; | |||
89 | static unsigned int ipr_max_speed = 1; | 89 | static unsigned int ipr_max_speed = 1; |
90 | static int ipr_testmode = 0; | 90 | static int ipr_testmode = 0; |
91 | static unsigned int ipr_fastfail = 0; | 91 | static unsigned int ipr_fastfail = 0; |
92 | static unsigned int ipr_transop_timeout = IPR_OPERATIONAL_TIMEOUT; | 92 | static unsigned int ipr_transop_timeout = 0; |
93 | static unsigned int ipr_enable_cache = 1; | 93 | static unsigned int ipr_enable_cache = 1; |
94 | static unsigned int ipr_debug = 0; | 94 | static unsigned int ipr_debug = 0; |
95 | static int ipr_auto_create = 1; | 95 | static int ipr_auto_create = 1; |
@@ -6187,7 +6187,7 @@ static int ipr_reset_enable_ioa(struct ipr_cmnd *ipr_cmd) | |||
6187 | dev_info(&ioa_cfg->pdev->dev, "Initializing IOA.\n"); | 6187 | dev_info(&ioa_cfg->pdev->dev, "Initializing IOA.\n"); |
6188 | 6188 | ||
6189 | ipr_cmd->timer.data = (unsigned long) ipr_cmd; | 6189 | ipr_cmd->timer.data = (unsigned long) ipr_cmd; |
6190 | ipr_cmd->timer.expires = jiffies + (ipr_transop_timeout * HZ); | 6190 | ipr_cmd->timer.expires = jiffies + (ioa_cfg->transop_timeout * HZ); |
6191 | ipr_cmd->timer.function = (void (*)(unsigned long))ipr_oper_timeout; | 6191 | ipr_cmd->timer.function = (void (*)(unsigned long))ipr_oper_timeout; |
6192 | ipr_cmd->done = ipr_reset_ioa_job; | 6192 | ipr_cmd->done = ipr_reset_ioa_job; |
6193 | add_timer(&ipr_cmd->timer); | 6193 | add_timer(&ipr_cmd->timer); |
@@ -7232,6 +7232,13 @@ static int __devinit ipr_probe_ioa(struct pci_dev *pdev, | |||
7232 | goto out_scsi_host_put; | 7232 | goto out_scsi_host_put; |
7233 | } | 7233 | } |
7234 | 7234 | ||
7235 | if (ipr_transop_timeout) | ||
7236 | ioa_cfg->transop_timeout = ipr_transop_timeout; | ||
7237 | else if (dev_id->driver_data & IPR_USE_LONG_TRANSOP_TIMEOUT) | ||
7238 | ioa_cfg->transop_timeout = IPR_LONG_OPERATIONAL_TIMEOUT; | ||
7239 | else | ||
7240 | ioa_cfg->transop_timeout = IPR_OPERATIONAL_TIMEOUT; | ||
7241 | |||
7235 | ipr_regs_pci = pci_resource_start(pdev, 0); | 7242 | ipr_regs_pci = pci_resource_start(pdev, 0); |
7236 | 7243 | ||
7237 | rc = pci_request_regions(pdev, IPR_NAME); | 7244 | rc = pci_request_regions(pdev, IPR_NAME); |
@@ -7539,29 +7546,35 @@ static struct pci_device_id ipr_pci_table[] __devinitdata = { | |||
7539 | { PCI_VENDOR_ID_IBM, PCI_DEVICE_ID_IBM_CITRINE, | 7546 | { PCI_VENDOR_ID_IBM, PCI_DEVICE_ID_IBM_CITRINE, |
7540 | PCI_VENDOR_ID_IBM, IPR_SUBS_DEV_ID_571A, 0, 0, 0 }, | 7547 | PCI_VENDOR_ID_IBM, IPR_SUBS_DEV_ID_571A, 0, 0, 0 }, |
7541 | { PCI_VENDOR_ID_IBM, PCI_DEVICE_ID_IBM_CITRINE, | 7548 | { PCI_VENDOR_ID_IBM, PCI_DEVICE_ID_IBM_CITRINE, |
7542 | PCI_VENDOR_ID_IBM, IPR_SUBS_DEV_ID_575B, 0, 0, 0 }, | 7549 | PCI_VENDOR_ID_IBM, IPR_SUBS_DEV_ID_575B, 0, 0, |
7550 | IPR_USE_LONG_TRANSOP_TIMEOUT }, | ||
7543 | { PCI_VENDOR_ID_ADAPTEC2, PCI_DEVICE_ID_ADAPTEC2_OBSIDIAN, | 7551 | { PCI_VENDOR_ID_ADAPTEC2, PCI_DEVICE_ID_ADAPTEC2_OBSIDIAN, |
7544 | PCI_VENDOR_ID_IBM, IPR_SUBS_DEV_ID_572A, 0, 0, 0 }, | 7552 | PCI_VENDOR_ID_IBM, IPR_SUBS_DEV_ID_572A, 0, 0, 0 }, |
7545 | { PCI_VENDOR_ID_ADAPTEC2, PCI_DEVICE_ID_ADAPTEC2_OBSIDIAN, | 7553 | { PCI_VENDOR_ID_ADAPTEC2, PCI_DEVICE_ID_ADAPTEC2_OBSIDIAN, |
7546 | PCI_VENDOR_ID_IBM, IPR_SUBS_DEV_ID_572B, 0, 0, 0 }, | 7554 | PCI_VENDOR_ID_IBM, IPR_SUBS_DEV_ID_572B, 0, 0, 0 }, |
7547 | { PCI_VENDOR_ID_ADAPTEC2, PCI_DEVICE_ID_ADAPTEC2_OBSIDIAN, | 7555 | { PCI_VENDOR_ID_ADAPTEC2, PCI_DEVICE_ID_ADAPTEC2_OBSIDIAN, |
7548 | PCI_VENDOR_ID_IBM, IPR_SUBS_DEV_ID_575C, 0, 0, 0 }, | 7556 | PCI_VENDOR_ID_IBM, IPR_SUBS_DEV_ID_575C, 0, 0, |
7557 | IPR_USE_LONG_TRANSOP_TIMEOUT }, | ||
7549 | { PCI_VENDOR_ID_IBM, PCI_DEVICE_ID_IBM_OBSIDIAN, | 7558 | { PCI_VENDOR_ID_IBM, PCI_DEVICE_ID_IBM_OBSIDIAN, |
7550 | PCI_VENDOR_ID_IBM, IPR_SUBS_DEV_ID_572A, 0, 0, 0 }, | 7559 | PCI_VENDOR_ID_IBM, IPR_SUBS_DEV_ID_572A, 0, 0, 0 }, |
7551 | { PCI_VENDOR_ID_IBM, PCI_DEVICE_ID_IBM_OBSIDIAN, | 7560 | { PCI_VENDOR_ID_IBM, PCI_DEVICE_ID_IBM_OBSIDIAN, |
7552 | PCI_VENDOR_ID_IBM, IPR_SUBS_DEV_ID_572B, 0, 0, 0 }, | 7561 | PCI_VENDOR_ID_IBM, IPR_SUBS_DEV_ID_572B, 0, 0, 0 }, |
7553 | { PCI_VENDOR_ID_IBM, PCI_DEVICE_ID_IBM_OBSIDIAN, | 7562 | { PCI_VENDOR_ID_IBM, PCI_DEVICE_ID_IBM_OBSIDIAN, |
7554 | PCI_VENDOR_ID_IBM, IPR_SUBS_DEV_ID_575C, 0, 0, 0 }, | 7563 | PCI_VENDOR_ID_IBM, IPR_SUBS_DEV_ID_575C, 0, 0, |
7564 | IPR_USE_LONG_TRANSOP_TIMEOUT }, | ||
7555 | { PCI_VENDOR_ID_IBM, PCI_DEVICE_ID_IBM_OBSIDIAN_E, | 7565 | { PCI_VENDOR_ID_IBM, PCI_DEVICE_ID_IBM_OBSIDIAN_E, |
7556 | PCI_VENDOR_ID_IBM, IPR_SUBS_DEV_ID_57B7, 0, 0, 0 }, | 7566 | PCI_VENDOR_ID_IBM, IPR_SUBS_DEV_ID_57B7, 0, 0, |
7567 | IPR_USE_LONG_TRANSOP_TIMEOUT }, | ||
7557 | { PCI_VENDOR_ID_IBM, PCI_DEVICE_ID_IBM_SNIPE, | 7568 | { PCI_VENDOR_ID_IBM, PCI_DEVICE_ID_IBM_SNIPE, |
7558 | PCI_VENDOR_ID_IBM, IPR_SUBS_DEV_ID_2780, 0, 0, 0 }, | 7569 | PCI_VENDOR_ID_IBM, IPR_SUBS_DEV_ID_2780, 0, 0, 0 }, |
7559 | { PCI_VENDOR_ID_ADAPTEC2, PCI_DEVICE_ID_ADAPTEC2_SCAMP, | 7570 | { PCI_VENDOR_ID_ADAPTEC2, PCI_DEVICE_ID_ADAPTEC2_SCAMP, |
7560 | PCI_VENDOR_ID_IBM, IPR_SUBS_DEV_ID_571E, 0, 0, 0 }, | 7571 | PCI_VENDOR_ID_IBM, IPR_SUBS_DEV_ID_571E, 0, 0, 0 }, |
7561 | { PCI_VENDOR_ID_ADAPTEC2, PCI_DEVICE_ID_ADAPTEC2_SCAMP, | 7572 | { PCI_VENDOR_ID_ADAPTEC2, PCI_DEVICE_ID_ADAPTEC2_SCAMP, |
7562 | PCI_VENDOR_ID_IBM, IPR_SUBS_DEV_ID_571F, 0, 0, 0 }, | 7573 | PCI_VENDOR_ID_IBM, IPR_SUBS_DEV_ID_571F, 0, 0, |
7574 | IPR_USE_LONG_TRANSOP_TIMEOUT }, | ||
7563 | { PCI_VENDOR_ID_ADAPTEC2, PCI_DEVICE_ID_ADAPTEC2_SCAMP, | 7575 | { PCI_VENDOR_ID_ADAPTEC2, PCI_DEVICE_ID_ADAPTEC2_SCAMP, |
7564 | PCI_VENDOR_ID_IBM, IPR_SUBS_DEV_ID_572F, 0, 0, 0 }, | 7576 | PCI_VENDOR_ID_IBM, IPR_SUBS_DEV_ID_572F, 0, 0, |
7577 | IPR_USE_LONG_TRANSOP_TIMEOUT }, | ||
7565 | { } | 7578 | { } |
7566 | }; | 7579 | }; |
7567 | MODULE_DEVICE_TABLE(pci, ipr_pci_table); | 7580 | MODULE_DEVICE_TABLE(pci, ipr_pci_table); |