diff options
author | Andrew Morton <akpm@osdl.org> | 2006-06-25 04:36:52 -0400 |
---|---|---|
committer | Jeff Garzik <jeff@garzik.org> | 2006-06-26 20:59:28 -0400 |
commit | a8601e5f6b77aa4f223058a93bc5f77e1ee45638 (patch) | |
tree | 19d01b0b7fc9825471223fbe3d072dbc58827041 /drivers/scsi/libata-core.c | |
parent | 5806db22cffc7557b675d3c9229f327980aee797 (diff) |
[PATCH] libata reduce timeouts
From: Andrew Morton <akpm@osdl.org>
Provide a module parameter to override the default 30-second-per-device SATA
probing timeout.
Cc: Tejun Heo <htejun@gmail.com>
Cc: Jeff Garzik <jeff@garzik.org>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
Diffstat (limited to 'drivers/scsi/libata-core.c')
-rw-r--r-- | drivers/scsi/libata-core.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/drivers/scsi/libata-core.c b/drivers/scsi/libata-core.c index 60e80e3a8858..10f15ab95fab 100644 --- a/drivers/scsi/libata-core.c +++ b/drivers/scsi/libata-core.c | |||
@@ -88,6 +88,10 @@ int libata_fua = 0; | |||
88 | module_param_named(fua, libata_fua, int, 0444); | 88 | module_param_named(fua, libata_fua, int, 0444); |
89 | MODULE_PARM_DESC(fua, "FUA support (0=off, 1=on)"); | 89 | MODULE_PARM_DESC(fua, "FUA support (0=off, 1=on)"); |
90 | 90 | ||
91 | static int ata_probe_timeout = ATA_TMOUT_INTERNAL / HZ; | ||
92 | module_param(ata_probe_timeout, int, 0444); | ||
93 | MODULE_PARM_DESC(ata_probe_timeout, "Set ATA probing timeout (seconds)"); | ||
94 | |||
91 | MODULE_AUTHOR("Jeff Garzik"); | 95 | MODULE_AUTHOR("Jeff Garzik"); |
92 | MODULE_DESCRIPTION("Library module for ATA devices"); | 96 | MODULE_DESCRIPTION("Library module for ATA devices"); |
93 | MODULE_LICENSE("GPL"); | 97 | MODULE_LICENSE("GPL"); |
@@ -1059,7 +1063,7 @@ unsigned ata_exec_internal(struct ata_device *dev, | |||
1059 | 1063 | ||
1060 | spin_unlock_irqrestore(ap->lock, flags); | 1064 | spin_unlock_irqrestore(ap->lock, flags); |
1061 | 1065 | ||
1062 | rc = wait_for_completion_timeout(&wait, ATA_TMOUT_INTERNAL); | 1066 | rc = wait_for_completion_timeout(&wait, ata_probe_timeout); |
1063 | 1067 | ||
1064 | ata_port_flush_task(ap); | 1068 | ata_port_flush_task(ap); |
1065 | 1069 | ||
@@ -5738,6 +5742,7 @@ int ata_pci_device_resume(struct pci_dev *pdev) | |||
5738 | 5742 | ||
5739 | static int __init ata_init(void) | 5743 | static int __init ata_init(void) |
5740 | { | 5744 | { |
5745 | ata_probe_timeout *= HZ; | ||
5741 | ata_wq = create_workqueue("ata"); | 5746 | ata_wq = create_workqueue("ata"); |
5742 | if (!ata_wq) | 5747 | if (!ata_wq) |
5743 | return -ENOMEM; | 5748 | return -ENOMEM; |