From: Yonglong Liu liuyonglong@huawei.com
driver inclusion category: bugfix bugzilla: NA CVE: NA
After rename the net devices, can not grep the irq numbers by the net device name, because the driver request the irq resources only when the vector resource changed, and rename operation did not change the vector resources, so the irq name keeps the previous net device name.
This patch modifies the tqp irq names as "pci driver name"-"pci name" -"TxRx"-"index".
Fixes: ec7fb686187f ("net: hns3: optimize vector handle")
Signed-off-by: Yonglong Liu liuyonglong@huawei.com Reviewed-by: Yunsheng Lin linyunsheng@huawei.com Reviewed-by: Zhong Zhaohui zhongzhaohui@huawei.com Signed-off-by: Yang Yingliang yangyingliang@huawei.com --- drivers/net/ethernet/hisilicon/hns3/hns3_enet.c | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-)
diff --git a/drivers/net/ethernet/hisilicon/hns3/hns3_enet.c b/drivers/net/ethernet/hisilicon/hns3/hns3_enet.c index 6cde7a6..35e8c32 100644 --- a/drivers/net/ethernet/hisilicon/hns3/hns3_enet.c +++ b/drivers/net/ethernet/hisilicon/hns3/hns3_enet.c @@ -134,17 +134,20 @@ static int hns3_nic_init_irq(struct hns3_nic_priv *priv)
if (tqp_vectors->tx_group.ring && tqp_vectors->rx_group.ring) { snprintf(tqp_vectors->name, HNAE3_INT_NAME_LEN, - "%s-%s-%d", priv->netdev->name, "TxRx", - txrx_int_idx++); + "%s-%s-%s-%d", hns3_driver_name, + pci_name(priv->ae_handle->pdev), + "TxRx", txrx_int_idx++); txrx_int_idx++; } else if (tqp_vectors->rx_group.ring) { snprintf(tqp_vectors->name, HNAE3_INT_NAME_LEN, - "%s-%s-%d", priv->netdev->name, "Rx", - rx_int_idx++); + "%s-%s-%s-%d", hns3_driver_name, + pci_name(priv->ae_handle->pdev), + "Rx", rx_int_idx++); } else if (tqp_vectors->tx_group.ring) { snprintf(tqp_vectors->name, HNAE3_INT_NAME_LEN, - "%s-%s-%d", priv->netdev->name, "Tx", - tx_int_idx++); + "%s-%s-%s-%d", hns3_driver_name, + pci_name(priv->ae_handle->pdev), + "Tx", tx_int_idx++); } else { /* Skip this unused q_vector */ continue;