Commit 5bffde62 authored by Yonglong Liu's avatar Yonglong Liu Committed by David S. Miller

net: hns3: modify the IRQ name of TQP vector

When rename the net devices, the IRQ number can not be
fetched by the net device name, because the driver request
the IRQ resources only when the vector resource changed, and
the rename operation did not change the vector resources,
so the IRQ name keeps the previous net device name.
So this patch modifies the name of the TQP IRQ as
"pci driver name"-"pci name"-"TxRx"-"index".
Signed-off-by: default avatarYonglong Liu <liuyonglong@huawei.com>
Signed-off-by: default avatarHuazhong Tan <tanhuazhong@huawei.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 08a10068
...@@ -133,18 +133,21 @@ static int hns3_nic_init_irq(struct hns3_nic_priv *priv) ...@@ -133,18 +133,21 @@ static int hns3_nic_init_irq(struct hns3_nic_priv *priv)
continue; continue;
if (tqp_vectors->tx_group.ring && tqp_vectors->rx_group.ring) { if (tqp_vectors->tx_group.ring && tqp_vectors->rx_group.ring) {
snprintf(tqp_vectors->name, HNAE3_INT_NAME_LEN - 1, snprintf(tqp_vectors->name, HNAE3_INT_NAME_LEN,
"%s-%s-%d", priv->netdev->name, "TxRx", "%s-%s-%s-%d", hns3_driver_name,
txrx_int_idx++); pci_name(priv->ae_handle->pdev),
"TxRx", txrx_int_idx++);
txrx_int_idx++; txrx_int_idx++;
} else if (tqp_vectors->rx_group.ring) { } else if (tqp_vectors->rx_group.ring) {
snprintf(tqp_vectors->name, HNAE3_INT_NAME_LEN - 1, snprintf(tqp_vectors->name, HNAE3_INT_NAME_LEN,
"%s-%s-%d", priv->netdev->name, "Rx", "%s-%s-%s-%d", hns3_driver_name,
rx_int_idx++); pci_name(priv->ae_handle->pdev),
"Rx", rx_int_idx++);
} else if (tqp_vectors->tx_group.ring) { } else if (tqp_vectors->tx_group.ring) {
snprintf(tqp_vectors->name, HNAE3_INT_NAME_LEN - 1, snprintf(tqp_vectors->name, HNAE3_INT_NAME_LEN,
"%s-%s-%d", priv->netdev->name, "Tx", "%s-%s-%s-%d", hns3_driver_name,
tx_int_idx++); pci_name(priv->ae_handle->pdev),
"Tx", tx_int_idx++);
} else { } else {
/* Skip this unused q_vector */ /* Skip this unused q_vector */
continue; continue;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment