@@ -428,6 +428,36 @@ static void enic_mtu_check(struct enic *enic)
428
428
}
429
429
}
430
430
431
+ static void enic_set_rx_coal_setting (struct enic * enic )
432
+ {
433
+ unsigned int speed ;
434
+ int index = -1 ;
435
+ struct enic_rx_coal * rx_coal = & enic -> rx_coalesce_setting ;
436
+
437
+ /* 1. Read the link speed from fw
438
+ * 2. Pick the default range for the speed
439
+ * 3. Update it in enic->rx_coalesce_setting
440
+ */
441
+ speed = vnic_dev_port_speed (enic -> vdev );
442
+ if (speed > ENIC_LINK_SPEED_10G )
443
+ index = ENIC_LINK_40G_INDEX ;
444
+ else if (speed > ENIC_LINK_SPEED_4G )
445
+ index = ENIC_LINK_10G_INDEX ;
446
+ else
447
+ index = ENIC_LINK_4G_INDEX ;
448
+
449
+ rx_coal -> small_pkt_range_start = mod_range [index ].small_pkt_range_start ;
450
+ rx_coal -> large_pkt_range_start = mod_range [index ].large_pkt_range_start ;
451
+ rx_coal -> range_end = ENIC_RX_COALESCE_RANGE_END ;
452
+
453
+ /* Start with the value provided by UCSM */
454
+ for (index = 0 ; index < enic -> rq_count ; index ++ )
455
+ enic -> cq [index ].cur_rx_coal_timeval =
456
+ enic -> config .intr_timer_usec ;
457
+
458
+ rx_coal -> use_adaptive_rx_coalesce = 1 ;
459
+ }
460
+
431
461
static void enic_link_check (struct enic * enic )
432
462
{
433
463
int link_status = vnic_dev_link_status (enic -> vdev );
@@ -1901,36 +1931,6 @@ static void enic_synchronize_irqs(struct enic *enic)
1901
1931
}
1902
1932
}
1903
1933
1904
- static void enic_set_rx_coal_setting (struct enic * enic )
1905
- {
1906
- unsigned int speed ;
1907
- int index = -1 ;
1908
- struct enic_rx_coal * rx_coal = & enic -> rx_coalesce_setting ;
1909
-
1910
- /* 1. Read the link speed from fw
1911
- * 2. Pick the default range for the speed
1912
- * 3. Update it in enic->rx_coalesce_setting
1913
- */
1914
- speed = vnic_dev_port_speed (enic -> vdev );
1915
- if (ENIC_LINK_SPEED_10G < speed )
1916
- index = ENIC_LINK_40G_INDEX ;
1917
- else if (ENIC_LINK_SPEED_4G < speed )
1918
- index = ENIC_LINK_10G_INDEX ;
1919
- else
1920
- index = ENIC_LINK_4G_INDEX ;
1921
-
1922
- rx_coal -> small_pkt_range_start = mod_range [index ].small_pkt_range_start ;
1923
- rx_coal -> large_pkt_range_start = mod_range [index ].large_pkt_range_start ;
1924
- rx_coal -> range_end = ENIC_RX_COALESCE_RANGE_END ;
1925
-
1926
- /* Start with the value provided by UCSM */
1927
- for (index = 0 ; index < enic -> rq_count ; index ++ )
1928
- enic -> cq [index ].cur_rx_coal_timeval =
1929
- enic -> config .intr_timer_usec ;
1930
-
1931
- rx_coal -> use_adaptive_rx_coalesce = 1 ;
1932
- }
1933
-
1934
1934
static int enic_dev_notify_set (struct enic * enic )
1935
1935
{
1936
1936
int err ;
0 commit comments