diff options
author | Tejun Heo <htejun@gmail.com> | 2006-05-31 05:27:42 -0400 |
---|---|---|
committer | Tejun Heo <htejun@gmail.com> | 2006-05-31 05:27:42 -0400 |
commit | 453b07accb47c5b54aa2f156ebffac63c543027b (patch) | |
tree | a08ee98bab64b1d92a9856e086c87de53012b6fc /drivers/scsi | |
parent | 3edebac41bab7e146578ad9e723ee7fff71c99c0 (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')
-rw-r--r-- | drivers/scsi/libata-core.c | 9 | ||||
-rw-r--r-- | drivers/scsi/libata.h | 1 |
2 files changed, 10 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); | |||
69 | static unsigned int ata_unique_id = 1; | 69 | static unsigned int ata_unique_id = 1; |
70 | static struct workqueue_struct *ata_wq; | 70 | static struct workqueue_struct *ata_wq; |
71 | 71 | ||
72 | struct workqueue_struct *ata_aux_wq; | ||
73 | |||
72 | int atapi_enabled = 1; | 74 | int atapi_enabled = 1; |
73 | module_param(atapi_enabled, int, 0444); | 75 | module_param(atapi_enabled, int, 0444); |
74 | MODULE_PARM_DESC(atapi_enabled, "Enable discovery of ATAPI devices (0=off, 1=on)"); | 76 | MODULE_PARM_DESC(atapi_enabled, "Enable discovery of ATAPI devices (0=off, 1=on)"); |
@@ -5623,6 +5625,12 @@ static int __init ata_init(void) | |||
5623 | if (!ata_wq) | 5625 | if (!ata_wq) |
5624 | return -ENOMEM; | 5626 | return -ENOMEM; |
5625 | 5627 | ||
5628 | ata_aux_wq = create_singlethread_workqueue("ata_aux"); | ||
5629 | if (!ata_aux_wq) { | ||
5630 | destroy_workqueue(ata_wq); | ||
5631 | return -ENOMEM; | ||
5632 | } | ||
5633 | |||
5626 | printk(KERN_DEBUG "libata version " DRV_VERSION " loaded.\n"); | 5634 | printk(KERN_DEBUG "libata version " DRV_VERSION " loaded.\n"); |
5627 | return 0; | 5635 | return 0; |
5628 | } | 5636 | } |
@@ -5630,6 +5638,7 @@ static int __init ata_init(void) | |||
5630 | static void __exit ata_exit(void) | 5638 | static void __exit ata_exit(void) |
5631 | { | 5639 | { |
5632 | destroy_workqueue(ata_wq); | 5640 | destroy_workqueue(ata_wq); |
5641 | destroy_workqueue(ata_aux_wq); | ||
5633 | } | 5642 | } |
5634 | 5643 | ||
5635 | module_init(ata_init); | 5644 | module_init(ata_init); |
diff --git a/drivers/scsi/libata.h b/drivers/scsi/libata.h index c2b1c919b964..4458fd9fc1a4 100644 --- a/drivers/scsi/libata.h +++ b/drivers/scsi/libata.h | |||
@@ -39,6 +39,7 @@ struct ata_scsi_args { | |||
39 | }; | 39 | }; |
40 | 40 | ||
41 | /* libata-core.c */ | 41 | /* libata-core.c */ |
42 | extern struct workqueue_struct *ata_aux_wq; | ||
42 | extern int atapi_enabled; | 43 | extern int atapi_enabled; |
43 | extern int atapi_dmadir; | 44 | extern int atapi_dmadir; |
44 | extern int libata_fua; | 45 | extern int libata_fua; |