From: Tejun Heo <htejun@gmail.com>
To: jgarzik@pobox.com, mlord@pobox.com, albertcc@tw.ibm.com,
alan@lxorguk.ukuu.org.uk, axboe@suse.de, forrest.zhao@intel.com,
linux-ide@vger.kernel.org
Cc: Tejun Heo <htejun@gmail.com>
Subject: [PATCH 08/12] libata-hp-prep: add ata_scsi_wq
Date: Mon, 29 May 2006 15:25:58 +0900 [thread overview]
Message-ID: <1148883958977-git-send-email-htejun@gmail.com> (raw)
In-Reply-To: <11488839571850-git-send-email-htejun@gmail.com>
It's best to run ATA hotplug from EH but attaching SCSI devices needs
working EH. ata_scsi_wq is used to give SCSI hotplug operations a
separate context.
Signed-off-by: Tejun Heo <htejun@gmail.com>
---
drivers/scsi/libata-core.c | 9 +++++++++
drivers/scsi/libata.h | 1 +
2 files changed, 10 insertions(+), 0 deletions(-)
84fc45de6b3fc32e8310a27dd54fa455a1038e9b
diff --git a/drivers/scsi/libata-core.c b/drivers/scsi/libata-core.c
index 83fb9dd..aa1e0a1 100644
--- a/drivers/scsi/libata-core.c
+++ b/drivers/scsi/libata-core.c
@@ -69,6 +69,8 @@ static void ata_dev_xfermask(struct ata_
static unsigned int ata_unique_id = 1;
static struct workqueue_struct *ata_wq;
+struct workqueue_struct *ata_scsi_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)");
@@ -5622,6 +5624,12 @@ static int __init ata_init(void)
if (!ata_wq)
return -ENOMEM;
+ ata_scsi_wq = create_singlethread_workqueue("ata_scsi");
+ if (!ata_scsi_wq) {
+ destroy_workqueue(ata_wq);
+ return -ENOMEM;
+ }
+
printk(KERN_DEBUG "libata version " DRV_VERSION " loaded.\n");
return 0;
}
@@ -5629,6 +5637,7 @@ static int __init ata_init(void)
static void __exit ata_exit(void)
{
destroy_workqueue(ata_wq);
+ destroy_workqueue(ata_scsi_wq);
}
module_init(ata_init);
diff --git a/drivers/scsi/libata.h b/drivers/scsi/libata.h
index d46c552..d4bb2e4 100644
--- a/drivers/scsi/libata.h
+++ b/drivers/scsi/libata.h
@@ -39,6 +39,7 @@ struct ata_scsi_args {
};
/* libata-core.c */
+extern struct workqueue_struct *ata_scsi_wq;
extern int atapi_enabled;
extern int atapi_dmadir;
extern int libata_fua;
--
1.3.2
next prev parent reply other threads:[~2006-05-29 6:26 UTC|newest]
Thread overview: 32+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-05-29 6:25 [PATCHSET 01/03] prep for hotplug support, take 4 Tejun Heo
2006-05-29 6:25 ` [PATCH 01/12] libata-hp-prep: add flags and eh_info/context fields for hotplug Tejun Heo
2006-05-29 6:25 ` [PATCH 02/12] libata-hp-prep: implement ata_dev_init() Tejun Heo
2006-05-29 6:25 ` [PATCH 04/12] libata-hp-prep: update ata_scsi_find_dev() and friends Tejun Heo
2006-05-29 8:40 ` zhao, forrest
2006-05-29 9:09 ` Tejun Heo
2006-05-30 4:38 ` Jeff Garzik
2006-05-30 4:02 ` Jeff Garzik
2006-05-30 4:26 ` Tejun Heo
2006-05-30 4:37 ` Jeff Garzik
2006-05-30 4:43 ` Tejun Heo
2006-05-29 6:25 ` Tejun Heo [this message]
2006-05-29 6:25 ` [PATCH 06/12] libata-hp-prep: implement ap->hw_sata_spd_limit Tejun Heo
2006-05-29 6:25 ` [PATCH 09/12] libata-hp-prep: make probing related functions global Tejun Heo
2006-05-30 4:06 ` Jeff Garzik
2006-05-29 6:25 ` [PATCH 05/12] libata-hp-prep: use __ata_scsi_find_dev() Tejun Heo
2006-05-29 6:25 ` [PATCH 11/12] libata-hp-prep: add prereset() method and implement ata_std_prereset() Tejun Heo
2006-05-29 11:12 ` [PATCH 11/12] (updated) " Tejun Heo
2006-05-30 4:12 ` Jeff Garzik
2006-05-29 6:25 ` [PATCH 12/12] libata-hp-prep: implement followup softreset handling Tejun Heo
2006-05-30 4:12 ` Jeff Garzik
2006-05-29 6:25 ` [PATCH 03/12] libata-hp-prep: make some ata_device fields persistent Tejun Heo
2006-05-30 4:00 ` Jeff Garzik
2006-05-29 6:25 ` [PATCH 07/12] libata-hp-prep: store attached SCSI device Tejun Heo
2006-05-29 8:45 ` zhao, forrest
2006-05-29 9:14 ` Tejun Heo
2006-05-30 4:04 ` Jeff Garzik
2006-05-30 4:55 ` Tejun Heo
2006-05-29 6:25 ` [PATCH 10/12] libata-hp-prep: implement sata_phy_debounce() Tejun Heo
2006-05-30 4:10 ` Jeff Garzik
2006-05-30 5:08 ` Tejun Heo
2006-05-30 5:23 ` Jeff Garzik
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1148883958977-git-send-email-htejun@gmail.com \
--to=htejun@gmail.com \
--cc=alan@lxorguk.ukuu.org.uk \
--cc=albertcc@tw.ibm.com \
--cc=axboe@suse.de \
--cc=forrest.zhao@intel.com \
--cc=jgarzik@pobox.com \
--cc=linux-ide@vger.kernel.org \
--cc=mlord@pobox.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).