提交 6977dc63 编写于 作者: B Ben Hutchings 提交者: David S. Miller

sfc: Generate unique names for per-NIC workqueues

Signed-off-by: NBen Hutchings <bhutchings@solarflare.com>
Signed-off-by: NDavid S. Miller <davem@davemloft.net>
上级 e727149e
...@@ -1929,7 +1929,10 @@ static int efx_init_struct(struct efx_nic *efx, struct efx_nic_type *type, ...@@ -1929,7 +1929,10 @@ static int efx_init_struct(struct efx_nic *efx, struct efx_nic_type *type,
efx->interrupt_mode = max(efx->type->max_interrupt_mode, efx->interrupt_mode = max(efx->type->max_interrupt_mode,
interrupt_mode); interrupt_mode);
efx->workqueue = create_singlethread_workqueue("sfc_work"); /* Would be good to use the net_dev name, but we're too early */
snprintf(efx->workqueue_name, sizeof(efx->workqueue_name), "sfc%s",
pci_name(pci_dev));
efx->workqueue = create_singlethread_workqueue(efx->workqueue_name);
if (!efx->workqueue) if (!efx->workqueue)
return -ENOMEM; return -ENOMEM;
......
...@@ -700,6 +700,7 @@ union efx_multicast_hash { ...@@ -700,6 +700,7 @@ union efx_multicast_hash {
* @legacy_irq: IRQ number * @legacy_irq: IRQ number
* @workqueue: Workqueue for port reconfigures and the HW monitor. * @workqueue: Workqueue for port reconfigures and the HW monitor.
* Work items do not hold and must not acquire RTNL. * Work items do not hold and must not acquire RTNL.
* @workqueue_name: Name of workqueue
* @reset_work: Scheduled reset workitem * @reset_work: Scheduled reset workitem
* @monitor_work: Hardware monitor workitem * @monitor_work: Hardware monitor workitem
* @membase_phys: Memory BAR value as physical address * @membase_phys: Memory BAR value as physical address
...@@ -781,6 +782,7 @@ struct efx_nic { ...@@ -781,6 +782,7 @@ struct efx_nic {
const struct efx_nic_type *type; const struct efx_nic_type *type;
int legacy_irq; int legacy_irq;
struct workqueue_struct *workqueue; struct workqueue_struct *workqueue;
char workqueue_name[16];
struct work_struct reset_work; struct work_struct reset_work;
struct delayed_work monitor_work; struct delayed_work monitor_work;
resource_size_t membase_phys; resource_size_t membase_phys;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册