Skip to content

Commit c8e6221

Browse files
praveenkaligineedivijay-suman
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]> (cherry picked from commit 8437114) Orabug: 37356729 Signed-off-by: Yifei Liu <[email protected]> Reviewed-by: Saeed Mirzamohammadi <[email protected]> Signed-off-by: Saeed Mirzamohammadi <[email protected]> Signed-off-by: Vijayendra Suman <[email protected]>
1 parent a746606 commit c8e6221

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
@@ -321,7 +321,6 @@ static int gve_napi_poll_dqo(struct napi_struct *napi, int budget)
321321
static int gve_alloc_notify_blocks(struct gve_priv *priv)
322322
{
323323
int num_vecs_requested = priv->num_ntfy_blks + 1;
324-
char *name = priv->dev->name;
325324
unsigned int active_cpus;
326325
int vecs_enabled;
327326
int i, j;
@@ -365,8 +364,8 @@ static int gve_alloc_notify_blocks(struct gve_priv *priv)
365364
active_cpus = min_t(int, priv->num_ntfy_blks / 2, num_online_cpus());
366365

367366
/* Setup Management Vector - the last vector */
368-
snprintf(priv->mgmt_msix_name, sizeof(priv->mgmt_msix_name), "%s-mgmnt",
369-
name);
367+
snprintf(priv->mgmt_msix_name, sizeof(priv->mgmt_msix_name), "gve-mgmnt@pci:%s",
368+
pci_name(priv->pdev));
370369
err = request_irq(priv->msix_vectors[priv->mgmt_msix_idx].vector,
371370
gve_mgmnt_intr, 0, priv->mgmt_msix_name, priv);
372371
if (err) {
@@ -395,8 +394,8 @@ static int gve_alloc_notify_blocks(struct gve_priv *priv)
395394
struct gve_notify_block *block = &priv->ntfy_blocks[i];
396395
int msix_idx = i;
397396

398-
snprintf(block->name, sizeof(block->name), "%s-ntfy-block.%d",
399-
name, i);
397+
snprintf(block->name, sizeof(block->name), "gve-ntfy-blk%d@pci:%s",
398+
i, pci_name(priv->pdev));
400399
block->priv = priv;
401400
err = request_irq(priv->msix_vectors[msix_idx].vector,
402401
gve_is_gqi(priv) ? gve_intr : gve_intr_dqo,

0 commit comments

Comments
 (0)