Skip to content

Commit 8437114

Browse files
praveenkaligineedidavem330
authored andcommitted
gve: Fix gve interrupt names
IRQs are currently requested before the netdevice is registered and a proper name is assigned to the device. Changing interrupt name to avoid using the format string in the name. Interrupt name before change: eth%d-ntfy-block.<blk_id> Interrupt name after change: gve-ntfy-blk<blk_id>@pci:<pci_name> Signed-off-by: Praveen Kaligineedi <[email protected]> Reviewed-by: Jeroen de Borst <[email protected]> Acked-by: Jakub Kicinski <[email protected]> Signed-off-by: David S. Miller <[email protected]>
1 parent d78f8d8 commit 8437114

File tree

1 file changed

+4
-5
lines changed

1 file changed

+4
-5
lines changed

drivers/net/ethernet/google/gve/gve_main.c

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -327,7 +327,6 @@ static int gve_napi_poll_dqo(struct napi_struct *napi, int budget)
327327
static int gve_alloc_notify_blocks(struct gve_priv *priv)
328328
{
329329
int num_vecs_requested = priv->num_ntfy_blks + 1;
330-
char *name = priv->dev->name;
331330
unsigned int active_cpus;
332331
int vecs_enabled;
333332
int i, j;
@@ -371,8 +370,8 @@ static int gve_alloc_notify_blocks(struct gve_priv *priv)
371370
active_cpus = min_t(int, priv->num_ntfy_blks / 2, num_online_cpus());
372371

373372
/* Setup Management Vector - the last vector */
374-
snprintf(priv->mgmt_msix_name, sizeof(priv->mgmt_msix_name), "%s-mgmnt",
375-
name);
373+
snprintf(priv->mgmt_msix_name, sizeof(priv->mgmt_msix_name), "gve-mgmnt@pci:%s",
374+
pci_name(priv->pdev));
376375
err = request_irq(priv->msix_vectors[priv->mgmt_msix_idx].vector,
377376
gve_mgmnt_intr, 0, priv->mgmt_msix_name, priv);
378377
if (err) {
@@ -401,8 +400,8 @@ static int gve_alloc_notify_blocks(struct gve_priv *priv)
401400
struct gve_notify_block *block = &priv->ntfy_blocks[i];
402401
int msix_idx = i;
403402

404-
snprintf(block->name, sizeof(block->name), "%s-ntfy-block.%d",
405-
name, i);
403+
snprintf(block->name, sizeof(block->name), "gve-ntfy-blk%d@pci:%s",
404+
i, pci_name(priv->pdev));
406405
block->priv = priv;
407406
err = request_irq(priv->msix_vectors[msix_idx].vector,
408407
gve_is_gqi(priv) ? gve_intr : gve_intr_dqo,

0 commit comments

Comments
 (0)