Commit 453b07ac authored by Tejun Heo's avatar Tejun Heo

[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: default avatarTejun Heo <htejun@gmail.com>
parent 3edebac4
...@@ -69,6 +69,8 @@ static void ata_dev_xfermask(struct ata_device *dev); ...@@ -69,6 +69,8 @@ static void ata_dev_xfermask(struct ata_device *dev);
static unsigned int ata_unique_id = 1; static unsigned int ata_unique_id = 1;
static struct workqueue_struct *ata_wq; static struct workqueue_struct *ata_wq;
struct workqueue_struct *ata_aux_wq;
int atapi_enabled = 1; int atapi_enabled = 1;
module_param(atapi_enabled, int, 0444); module_param(atapi_enabled, int, 0444);
MODULE_PARM_DESC(atapi_enabled, "Enable discovery of ATAPI devices (0=off, 1=on)"); 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,6 +5625,12 @@ static int __init ata_init(void)
if (!ata_wq) if (!ata_wq)
return -ENOMEM; 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"); printk(KERN_DEBUG "libata version " DRV_VERSION " loaded.\n");
return 0; return 0;
} }
...@@ -5630,6 +5638,7 @@ static int __init ata_init(void) ...@@ -5630,6 +5638,7 @@ static int __init ata_init(void)
static void __exit ata_exit(void) static void __exit ata_exit(void)
{ {
destroy_workqueue(ata_wq); destroy_workqueue(ata_wq);
destroy_workqueue(ata_aux_wq);
} }
module_init(ata_init); module_init(ata_init);
......
...@@ -39,6 +39,7 @@ struct ata_scsi_args { ...@@ -39,6 +39,7 @@ struct ata_scsi_args {
}; };
/* libata-core.c */ /* libata-core.c */
extern struct workqueue_struct *ata_aux_wq;
extern int atapi_enabled; extern int atapi_enabled;
extern int atapi_dmadir; extern int atapi_dmadir;
extern int libata_fua; extern int libata_fua;
......
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