@@ -692,7 +692,7 @@ static void bnxt_tx_int(struct bnxt *bp, struct bnxt_napi *bnapi, int nr_pkts)
692692
693693 __netif_txq_completed_wake (txq , nr_pkts , tx_bytes ,
694694 bnxt_tx_avail (bp , txr ), bp -> tx_wake_thresh ,
695- READ_ONCE (txr -> dev_state ) ! = BNXT_DEV_STATE_CLOSING );
695+ READ_ONCE (txr -> dev_state ) = = BNXT_DEV_STATE_CLOSING );
696696}
697697
698698static struct page * __bnxt_alloc_rx_page (struct bnxt * bp , dma_addr_t * mapping ,
@@ -2365,6 +2365,9 @@ static int bnxt_async_event_process(struct bnxt *bp,
23652365 struct bnxt_ptp_cfg * ptp = bp -> ptp_cfg ;
23662366 u64 ns ;
23672367
2368+ if (!ptp )
2369+ goto async_event_process_exit ;
2370+
23682371 spin_lock_bh (& ptp -> ptp_lock );
23692372 bnxt_ptp_update_current_time (bp );
23702373 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,
47634766 if (event_id == ASYNC_EVENT_CMPL_EVENT_ID_ERROR_RECOVERY &&
47644767 !(bp -> fw_cap & BNXT_FW_CAP_ERROR_RECOVERY ))
47654768 continue ;
4769+ if (event_id == ASYNC_EVENT_CMPL_EVENT_ID_PHC_UPDATE &&
4770+ !bp -> ptp_cfg )
4771+ continue ;
47664772 __set_bit (bnxt_async_events_arr [i ], async_events_bmap );
47674773 }
47684774 if (bmap && bmap_size ) {
@@ -5350,6 +5356,7 @@ static void bnxt_hwrm_update_rss_hash_cfg(struct bnxt *bp)
53505356 if (hwrm_req_init (bp , req , HWRM_VNIC_RSS_QCFG ))
53515357 return ;
53525358
5359+ req -> vnic_id = cpu_to_le16 (vnic -> fw_vnic_id );
53535360 /* all contexts configured to same hash_type, zero always exists */
53545361 req -> rss_ctx_idx = cpu_to_le16 (vnic -> fw_rss_cos_lb_ctx [0 ]);
53555362 resp = hwrm_req_hold (bp , req );
@@ -8812,6 +8819,9 @@ static int bnxt_init_chip(struct bnxt *bp, bool irq_re_init)
88128819 goto err_out ;
88138820 }
88148821
8822+ if (BNXT_VF (bp ))
8823+ bnxt_hwrm_func_qcfg (bp );
8824+
88158825 rc = bnxt_setup_vnic (bp , 0 );
88168826 if (rc )
88178827 goto err_out ;
@@ -11598,6 +11608,7 @@ static void bnxt_tx_timeout(struct net_device *dev, unsigned int txqueue)
1159811608static void bnxt_fw_health_check (struct bnxt * bp )
1159911609{
1160011610 struct bnxt_fw_health * fw_health = bp -> fw_health ;
11611+ struct pci_dev * pdev = bp -> pdev ;
1160111612 u32 val ;
1160211613
1160311614 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)
1161111622 }
1161211623
1161311624 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 ) ) {
1161511626 fw_health -> arrests ++ ;
1161611627 goto fw_reset ;
1161711628 }
1161811629
1161911630 fw_health -> last_fw_heartbeat = val ;
1162011631
1162111632 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 ) ) {
1162311634 fw_health -> discoveries ++ ;
1162411635 goto fw_reset ;
1162511636 }
@@ -13025,26 +13036,37 @@ static void bnxt_cfg_ntp_filters(struct bnxt *bp)
1302513036
1302613037#endif /* CONFIG_RFS_ACCEL */
1302713038
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 )
1302913041{
1303013042 struct bnxt * bp = netdev_priv (netdev );
13031- struct udp_tunnel_info ti ;
1303213043 unsigned int cmd ;
1303313044
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 )
1303613046 cmd = TUNNEL_DST_PORT_FREE_REQ_TUNNEL_TYPE_VXLAN ;
1303713047 else
1303813048 cmd = TUNNEL_DST_PORT_FREE_REQ_TUNNEL_TYPE_GENEVE ;
1303913049
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 ;
1304213063
1304313064 return bnxt_hwrm_tunnel_dst_port_free (bp , cmd );
1304413065}
1304513066
1304613067static 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 ,
1304813070 .flags = UDP_TUNNEL_NIC_INFO_MAY_SLEEP |
1304913071 UDP_TUNNEL_NIC_INFO_OPEN_ONLY ,
1305013072 .tables = {
0 commit comments