summaryrefslogtreecommitdiff
path: root/drivers/scsi/libata-core.c
diff options
context:
space:
mode:
authorTejun Heo <htejun@gmail.com>2006-05-31 18:27:42 +0900
committerTejun Heo <htejun@gmail.com>2006-05-31 18:27:42 +0900
commit453b07accb47c5b54aa2f156ebffac63c543027b (patch)
treea08ee98bab64b1d92a9856e086c87de53012b6fc /drivers/scsi/libata-core.c
parent3edebac41bab7e146578ad9e723ee7fff71c99c0 (diff)
[PATCH] libata-hp-prep: add ata_aux_wq
It's best to run ATA hotplug from EH but attaching SCSI devices needs working EH. ata_aux_wq is used to give SCSI hotplug operations a separate context. Signed-off-by: Tejun Heo <htejun@gmail.com>
Diffstat (limited to 'drivers/scsi/libata-core.c')
-rw-r--r--drivers/scsi/libata-core.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/drivers/scsi/libata-core.c b/drivers/scsi/libata-core.c
index b1a02fdbb0a5..04921cf2fc0b 100644
--- a/drivers/scsi/libata-core.c
+++ b/drivers/scsi/libata-core.c
@@ -69,6 +69,8 @@ static void ata_dev_xfermask(struct ata_device *dev);
static unsigned int ata_unique_id = 1;
static struct workqueue_struct *ata_wq;
+struct workqueue_struct *ata_aux_wq;
+
int atapi_enabled = 1;
module_param(atapi_enabled, int, 0444);
MODULE_PARM_DESC(atapi_enabled, "Enable discovery of ATAPI devices (0=off, 1=on)");
@@ -5623,6 +5625,12 @@ static int __init ata_init(void)
if (!ata_wq)
return -ENOMEM;
+ ata_aux_wq = create_singlethread_workqueue("ata_aux");
+ if (!ata_aux_wq) {
+ destroy_workqueue(ata_wq);
+ return -ENOMEM;
+ }
+
printk(KERN_DEBUG "libata version " DRV_VERSION " loaded.\n");
return 0;
}
@@ -5630,6 +5638,7 @@ static int __init ata_init(void)
static void __exit ata_exit(void)
{
destroy_workqueue(ata_wq);
+ destroy_workqueue(ata_aux_wq);
}
module_init(ata_init);