diff options
author | Amit Kumar Salecha <amit.salecha@qlogic.com> | 2010-10-07 19:46:05 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2010-10-08 16:59:08 -0400 |
commit | f7ec804a3edd2f7cf98a42bcad741d89d547c117 (patch) | |
tree | 13681fc0ee6bb05160aaa20367c1f5ee3de193f4 /drivers/net/qlcnic | |
parent | 9cf8d1a3b8cb19fa49494c1b8f0f9e3a37f2c218 (diff) |
qlcnic: driver private workqueue
Currently fw recovery usage global workqueue.
As same workqueue used by kernel for ethtool and etc., supporting
quiescent mode is not possible, without driver private workqueue.
Signed-off-by: Amit Kumar Salecha <amit.salecha@qlogic.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/qlcnic')
-rw-r--r-- | drivers/net/qlcnic/qlcnic_main.c | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/drivers/net/qlcnic/qlcnic_main.c b/drivers/net/qlcnic/qlcnic_main.c index 4757908b29b5..7503c487075c 100644 --- a/drivers/net/qlcnic/qlcnic_main.c +++ b/drivers/net/qlcnic/qlcnic_main.c | |||
@@ -46,6 +46,7 @@ char qlcnic_driver_name[] = "qlcnic"; | |||
46 | static const char qlcnic_driver_string[] = "QLogic 1/10 GbE " | 46 | static const char qlcnic_driver_string[] = "QLogic 1/10 GbE " |
47 | "Converged/Intelligent Ethernet Driver v" QLCNIC_LINUX_VERSIONID; | 47 | "Converged/Intelligent Ethernet Driver v" QLCNIC_LINUX_VERSIONID; |
48 | 48 | ||
49 | static struct workqueue_struct *qlcnic_wq; | ||
49 | static int qlcnic_mac_learn; | 50 | static int qlcnic_mac_learn; |
50 | module_param(qlcnic_mac_learn, int, 0644); | 51 | module_param(qlcnic_mac_learn, int, 0644); |
51 | MODULE_PARM_DESC(qlcnic_mac_learn, "Mac Filter (0=disabled, 1=enabled)"); | 52 | MODULE_PARM_DESC(qlcnic_mac_learn, "Mac Filter (0=disabled, 1=enabled)"); |
@@ -2886,7 +2887,8 @@ qlcnic_schedule_work(struct qlcnic_adapter *adapter, | |||
2886 | return; | 2887 | return; |
2887 | 2888 | ||
2888 | INIT_DELAYED_WORK(&adapter->fw_work, func); | 2889 | INIT_DELAYED_WORK(&adapter->fw_work, func); |
2889 | schedule_delayed_work(&adapter->fw_work, round_jiffies_relative(delay)); | 2890 | queue_delayed_work(qlcnic_wq, &adapter->fw_work, |
2891 | round_jiffies_relative(delay)); | ||
2890 | } | 2892 | } |
2891 | 2893 | ||
2892 | static void | 2894 | static void |
@@ -4163,6 +4165,12 @@ static int __init qlcnic_init_module(void) | |||
4163 | 4165 | ||
4164 | printk(KERN_INFO "%s\n", qlcnic_driver_string); | 4166 | printk(KERN_INFO "%s\n", qlcnic_driver_string); |
4165 | 4167 | ||
4168 | qlcnic_wq = create_singlethread_workqueue("qlcnic"); | ||
4169 | if (qlcnic_wq == NULL) { | ||
4170 | printk(KERN_ERR "qlcnic: cannot create workqueue\n"); | ||
4171 | return -ENOMEM; | ||
4172 | } | ||
4173 | |||
4166 | #ifdef CONFIG_INET | 4174 | #ifdef CONFIG_INET |
4167 | register_netdevice_notifier(&qlcnic_netdev_cb); | 4175 | register_netdevice_notifier(&qlcnic_netdev_cb); |
4168 | register_inetaddr_notifier(&qlcnic_inetaddr_cb); | 4176 | register_inetaddr_notifier(&qlcnic_inetaddr_cb); |
@@ -4174,6 +4182,7 @@ static int __init qlcnic_init_module(void) | |||
4174 | unregister_inetaddr_notifier(&qlcnic_inetaddr_cb); | 4182 | unregister_inetaddr_notifier(&qlcnic_inetaddr_cb); |
4175 | unregister_netdevice_notifier(&qlcnic_netdev_cb); | 4183 | unregister_netdevice_notifier(&qlcnic_netdev_cb); |
4176 | #endif | 4184 | #endif |
4185 | destroy_workqueue(qlcnic_wq); | ||
4177 | } | 4186 | } |
4178 | 4187 | ||
4179 | return ret; | 4188 | return ret; |
@@ -4190,6 +4199,7 @@ static void __exit qlcnic_exit_module(void) | |||
4190 | unregister_inetaddr_notifier(&qlcnic_inetaddr_cb); | 4199 | unregister_inetaddr_notifier(&qlcnic_inetaddr_cb); |
4191 | unregister_netdevice_notifier(&qlcnic_netdev_cb); | 4200 | unregister_netdevice_notifier(&qlcnic_netdev_cb); |
4192 | #endif | 4201 | #endif |
4202 | destroy_workqueue(qlcnic_wq); | ||
4193 | } | 4203 | } |
4194 | 4204 | ||
4195 | module_exit(qlcnic_exit_module); | 4205 | module_exit(qlcnic_exit_module); |