@@ -2365,6 +2365,9 @@ static int bnxt_async_event_process(struct bnxt *bp,
2365
2365
struct bnxt_ptp_cfg * ptp = bp -> ptp_cfg ;
2366
2366
u64 ns ;
2367
2367
2368
+ if (!ptp )
2369
+ goto async_event_process_exit ;
2370
+
2368
2371
spin_lock_bh (& ptp -> ptp_lock );
2369
2372
bnxt_ptp_update_current_time (bp );
2370
2373
ns = (((u64 )BNXT_EVENT_PHC_RTC_UPDATE (data1 ) <<
@@ -4763,6 +4766,9 @@ int bnxt_hwrm_func_drv_rgtr(struct bnxt *bp, unsigned long *bmap, int bmap_size,
4763
4766
if (event_id == ASYNC_EVENT_CMPL_EVENT_ID_ERROR_RECOVERY &&
4764
4767
!(bp -> fw_cap & BNXT_FW_CAP_ERROR_RECOVERY ))
4765
4768
continue ;
4769
+ if (event_id == ASYNC_EVENT_CMPL_EVENT_ID_PHC_UPDATE &&
4770
+ !bp -> ptp_cfg )
4771
+ continue ;
4766
4772
__set_bit (bnxt_async_events_arr [i ], async_events_bmap );
4767
4773
}
4768
4774
if (bmap && bmap_size ) {
@@ -5350,6 +5356,7 @@ static void bnxt_hwrm_update_rss_hash_cfg(struct bnxt *bp)
5350
5356
if (hwrm_req_init (bp , req , HWRM_VNIC_RSS_QCFG ))
5351
5357
return ;
5352
5358
5359
+ req -> vnic_id = cpu_to_le16 (vnic -> fw_vnic_id );
5353
5360
/* all contexts configured to same hash_type, zero always exists */
5354
5361
req -> rss_ctx_idx = cpu_to_le16 (vnic -> fw_rss_cos_lb_ctx [0 ]);
5355
5362
resp = hwrm_req_hold (bp , req );
@@ -8812,6 +8819,9 @@ static int bnxt_init_chip(struct bnxt *bp, bool irq_re_init)
8812
8819
goto err_out ;
8813
8820
}
8814
8821
8822
+ if (BNXT_VF (bp ))
8823
+ bnxt_hwrm_func_qcfg (bp );
8824
+
8815
8825
rc = bnxt_setup_vnic (bp , 0 );
8816
8826
if (rc )
8817
8827
goto err_out ;
@@ -11598,6 +11608,7 @@ static void bnxt_tx_timeout(struct net_device *dev, unsigned int txqueue)
11598
11608
static void bnxt_fw_health_check (struct bnxt * bp )
11599
11609
{
11600
11610
struct bnxt_fw_health * fw_health = bp -> fw_health ;
11611
+ struct pci_dev * pdev = bp -> pdev ;
11601
11612
u32 val ;
11602
11613
11603
11614
if (!fw_health -> enabled || test_bit (BNXT_STATE_IN_FW_RESET , & bp -> state ))
@@ -11611,15 +11622,15 @@ static void bnxt_fw_health_check(struct bnxt *bp)
11611
11622
}
11612
11623
11613
11624
val = bnxt_fw_health_readl (bp , BNXT_FW_HEARTBEAT_REG );
11614
- if (val == fw_health -> last_fw_heartbeat ) {
11625
+ if (val == fw_health -> last_fw_heartbeat && pci_device_is_present ( pdev ) ) {
11615
11626
fw_health -> arrests ++ ;
11616
11627
goto fw_reset ;
11617
11628
}
11618
11629
11619
11630
fw_health -> last_fw_heartbeat = val ;
11620
11631
11621
11632
val = bnxt_fw_health_readl (bp , BNXT_FW_RESET_CNT_REG );
11622
- if (val != fw_health -> last_fw_reset_cnt ) {
11633
+ if (val != fw_health -> last_fw_reset_cnt && pci_device_is_present ( pdev ) ) {
11623
11634
fw_health -> discoveries ++ ;
11624
11635
goto fw_reset ;
11625
11636
}
@@ -13025,26 +13036,37 @@ static void bnxt_cfg_ntp_filters(struct bnxt *bp)
13025
13036
13026
13037
#endif /* CONFIG_RFS_ACCEL */
13027
13038
13028
- static int bnxt_udp_tunnel_sync (struct net_device * netdev , unsigned int table )
13039
+ static int bnxt_udp_tunnel_set_port (struct net_device * netdev , unsigned int table ,
13040
+ unsigned int entry , struct udp_tunnel_info * ti )
13029
13041
{
13030
13042
struct bnxt * bp = netdev_priv (netdev );
13031
- struct udp_tunnel_info ti ;
13032
13043
unsigned int cmd ;
13033
13044
13034
- udp_tunnel_nic_get_port (netdev , table , 0 , & ti );
13035
- if (ti .type == UDP_TUNNEL_TYPE_VXLAN )
13045
+ if (ti -> type == UDP_TUNNEL_TYPE_VXLAN )
13036
13046
cmd = TUNNEL_DST_PORT_FREE_REQ_TUNNEL_TYPE_VXLAN ;
13037
13047
else
13038
13048
cmd = TUNNEL_DST_PORT_FREE_REQ_TUNNEL_TYPE_GENEVE ;
13039
13049
13040
- if (ti .port )
13041
- return bnxt_hwrm_tunnel_dst_port_alloc (bp , ti .port , cmd );
13050
+ return bnxt_hwrm_tunnel_dst_port_alloc (bp , ti -> port , cmd );
13051
+ }
13052
+
13053
+ static int bnxt_udp_tunnel_unset_port (struct net_device * netdev , unsigned int table ,
13054
+ unsigned int entry , struct udp_tunnel_info * ti )
13055
+ {
13056
+ struct bnxt * bp = netdev_priv (netdev );
13057
+ unsigned int cmd ;
13058
+
13059
+ if (ti -> type == UDP_TUNNEL_TYPE_VXLAN )
13060
+ cmd = TUNNEL_DST_PORT_FREE_REQ_TUNNEL_TYPE_VXLAN ;
13061
+ else
13062
+ cmd = TUNNEL_DST_PORT_FREE_REQ_TUNNEL_TYPE_GENEVE ;
13042
13063
13043
13064
return bnxt_hwrm_tunnel_dst_port_free (bp , cmd );
13044
13065
}
13045
13066
13046
13067
static const struct udp_tunnel_nic_info bnxt_udp_tunnels = {
13047
- .sync_table = bnxt_udp_tunnel_sync ,
13068
+ .set_port = bnxt_udp_tunnel_set_port ,
13069
+ .unset_port = bnxt_udp_tunnel_unset_port ,
13048
13070
.flags = UDP_TUNNEL_NIC_INFO_MAY_SLEEP |
13049
13071
UDP_TUNNEL_NIC_INFO_OPEN_ONLY ,
13050
13072
.tables = {
0 commit comments