[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <20240917225947.23742-1-ronak.doshi@broadcom.com>
Date: Tue, 17 Sep 2024 15:59:46 -0700
From: Ronak Doshi <ronak.doshi@...adcom.com>
To: <netdev@...r.kernel.org>
CC: Ronak Doshi <ronak.doshi@...adcom.com>, Broadcom internal kernel review
list <bcm-kernel-feedback-list@...adcom.com>, "David S. Miller"
<davem@...emloft.net>, Eric Dumazet <edumazet@...gle.com>, Jakub Kicinski
<kuba@...nel.org>, Paolo Abeni <pabeni@...hat.com>, open list
<linux-kernel@...r.kernel.org>
Subject: [PATCH net-next] vmxnet3: support higher link speeds from vmxnet3 v9
Until now, vmxnet3 was default reporting 10Gbps as link speed.
Vmxnet3 v9 adds support for user to configure higher link speeds.
User can configure the link speed via VMs advanced parameters options
in VCenter. This speed is reported in gbps by hypervisor.
This patch adds support for vmxnet3 to report higher link speeds and
converts it to mbps as expected by Linux stack.
Signed-off-by: Ronak Doshi <ronak.doshi@...adcom.com>
Acked-by: Guolin Yang <guolin.yang@...adcom.com>
---
drivers/net/vmxnet3/vmxnet3_drv.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/drivers/net/vmxnet3/vmxnet3_drv.c b/drivers/net/vmxnet3/vmxnet3_drv.c
index b70654c7ad34..bb514b72c8b5 100644
--- a/drivers/net/vmxnet3/vmxnet3_drv.c
+++ b/drivers/net/vmxnet3/vmxnet3_drv.c
@@ -201,6 +201,8 @@ vmxnet3_check_link(struct vmxnet3_adapter *adapter, bool affectTxQueue)
adapter->link_speed = ret >> 16;
if (ret & 1) { /* Link is up. */
+ if (VMXNET3_VERSION_GE_9(adapter) && adapter->link_speed < 10000)
+ adapter->link_speed = adapter->link_speed * 1000;
netdev_info(adapter->netdev, "NIC Link is Up %d Mbps\n",
adapter->link_speed);
netif_carrier_on(adapter->netdev);
--
2.11.0
Powered by blists - more mailing lists