]> www.infradead.org Git - users/hch/misc.git/commitdiff
enic: Obtain the Link speed only after the link comes up
authorJohn Daley <johndale@cisco.com>
Tue, 7 Jan 2025 21:41:58 +0000 (13:41 -0800)
committerJakub Kicinski <kuba@kernel.org>
Thu, 9 Jan 2025 20:27:08 +0000 (12:27 -0800)
The link speed is obtained in the RX adaptive coalescing function. It
was being called at probe time when the link may not be up. Change the
call to run after the Link comes up.

The impact of not getting the correct link speed was that the low end of
the adaptive interrupt range was always being set to 0 which could have
caused a slight increase in the number of RX interrupts.

Co-developed-by: Nelson Escobar <neescoba@cisco.com>
Signed-off-by: Nelson Escobar <neescoba@cisco.com>
Co-developed-by: Satish Kharat <satishkh@cisco.com>
Signed-off-by: Satish Kharat <satishkh@cisco.com>
Signed-off-by: John Daley <johndale@cisco.com>
Reviewed-by: Kalesh AP <kalesh-anakkur.purayil@broadcom.com>
Link: https://patch.msgid.link/20250107214159.18807-3-johndale@cisco.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
drivers/net/ethernet/cisco/enic/enic_main.c

index 957efe73e41ad4d2690d69657e21a384ad3c2d20..8109e9c484f67272f47bc8eb46f008910f917b46 100644 (file)
@@ -466,6 +466,7 @@ static void enic_link_check(struct enic *enic)
        if (link_status && !carrier_ok) {
                netdev_info(enic->netdev, "Link UP\n");
                netif_carrier_on(enic->netdev);
+               enic_set_rx_coal_setting(enic);
        } else if (!link_status && carrier_ok) {
                netdev_info(enic->netdev, "Link DOWN\n");
                netif_carrier_off(enic->netdev);
@@ -3063,7 +3064,6 @@ static int enic_probe(struct pci_dev *pdev, const struct pci_device_id *ent)
        timer_setup(&enic->notify_timer, enic_notify_timer, 0);
 
        enic_rfs_flw_tbl_init(enic);
-       enic_set_rx_coal_setting(enic);
        INIT_WORK(&enic->reset, enic_reset);
        INIT_WORK(&enic->tx_hang_reset, enic_tx_hang_reset);
        INIT_WORK(&enic->change_mtu_work, enic_change_mtu_work);