@@ -6998,7 +6998,6 @@ static int __bnxt_hwrm_func_qcaps(struct bnxt *bp)
6998
6998
6999
6999
pf -> fw_fid = le16_to_cpu (resp -> fid );
7000
7000
pf -> port_id = le16_to_cpu (resp -> port_id );
7001
- bp -> dev -> dev_port = pf -> port_id ;
7002
7001
memcpy (pf -> mac_addr , resp -> mac_address , ETH_ALEN );
7003
7002
pf -> first_vf_id = le16_to_cpu (resp -> first_vf_id );
7004
7003
pf -> max_vfs = le16_to_cpu (resp -> max_vfs );
@@ -7289,6 +7288,7 @@ static int bnxt_hwrm_ver_get(struct bnxt *bp)
7289
7288
bp -> hwrm_max_ext_req_len = HWRM_MAX_REQ_LEN ;
7290
7289
7291
7290
bp -> chip_num = le16_to_cpu (resp -> chip_num );
7291
+ bp -> chip_rev = resp -> chip_rev ;
7292
7292
if (bp -> chip_num == CHIP_NUM_58700 && !resp -> chip_rev &&
7293
7293
!resp -> chip_metal )
7294
7294
bp -> flags |= BNXT_FLAG_CHIP_NITRO_A0 ;
@@ -9064,7 +9064,7 @@ static int bnxt_update_phy_setting(struct bnxt *bp)
9064
9064
/* The last close may have shutdown the link, so need to call
9065
9065
* PHY_CFG to bring it back up.
9066
9066
*/
9067
- if (!netif_carrier_ok ( bp -> dev ) )
9067
+ if (!bp -> link_info . link_up )
9068
9068
update_link = true;
9069
9069
9070
9070
if (!bnxt_eee_config_ok (bp ))
@@ -10041,6 +10041,13 @@ static void bnxt_timer(struct timer_list *t)
10041
10041
bnxt_queue_sp_work (bp );
10042
10042
}
10043
10043
10044
+ #ifdef CONFIG_RFS_ACCEL
10045
+ if ((bp -> flags & BNXT_FLAG_RFS ) && bp -> ntp_fltr_count ) {
10046
+ set_bit (BNXT_RX_NTP_FLTR_SP_EVENT , & bp -> sp_event );
10047
+ bnxt_queue_sp_work (bp );
10048
+ }
10049
+ #endif /*CONFIG_RFS_ACCEL*/
10050
+
10044
10051
if (bp -> link_info .phy_retry ) {
10045
10052
if (time_after (jiffies , bp -> link_info .phy_retry_expires )) {
10046
10053
bp -> link_info .phy_retry = false;
@@ -10051,7 +10058,8 @@ static void bnxt_timer(struct timer_list *t)
10051
10058
}
10052
10059
}
10053
10060
10054
- if ((bp -> flags & BNXT_FLAG_CHIP_P5 ) && netif_carrier_ok (dev )) {
10061
+ if ((bp -> flags & BNXT_FLAG_CHIP_P5 ) && !bp -> chip_rev &&
10062
+ netif_carrier_ok (dev )) {
10055
10063
set_bit (BNXT_RING_COAL_NOW_SP_EVENT , & bp -> sp_event );
10056
10064
bnxt_queue_sp_work (bp );
10057
10065
}
@@ -10569,7 +10577,7 @@ static void bnxt_set_dflt_rss_hash_type(struct bnxt *bp)
10569
10577
VNIC_RSS_CFG_REQ_HASH_TYPE_TCP_IPV4 |
10570
10578
VNIC_RSS_CFG_REQ_HASH_TYPE_IPV6 |
10571
10579
VNIC_RSS_CFG_REQ_HASH_TYPE_TCP_IPV6 ;
10572
- if (BNXT_CHIP_P4 (bp ) && bp -> hwrm_spec_code >= 0x10501 ) {
10580
+ if (BNXT_CHIP_P4_PLUS (bp ) && bp -> hwrm_spec_code >= 0x10501 ) {
10573
10581
bp -> flags |= BNXT_FLAG_UDP_RSS_CAP ;
10574
10582
bp -> rss_hash_cfg |= VNIC_RSS_CFG_REQ_HASH_TYPE_UDP_IPV4 |
10575
10583
VNIC_RSS_CFG_REQ_HASH_TYPE_UDP_IPV6 ;
@@ -11101,6 +11109,7 @@ static int bnxt_rx_flow_steer(struct net_device *dev, const struct sk_buff *skb,
11101
11109
struct ethhdr * eth = (struct ethhdr * )skb_mac_header (skb );
11102
11110
int rc = 0 , idx , bit_id , l2_idx = 0 ;
11103
11111
struct hlist_head * head ;
11112
+ u32 flags ;
11104
11113
11105
11114
if (!ether_addr_equal (dev -> dev_addr , eth -> h_dest )) {
11106
11115
struct bnxt_vnic_info * vnic = & bp -> vnic_info [0 ];
@@ -11140,8 +11149,9 @@ static int bnxt_rx_flow_steer(struct net_device *dev, const struct sk_buff *skb,
11140
11149
rc = - EPROTONOSUPPORT ;
11141
11150
goto err_free ;
11142
11151
}
11143
- if ((fkeys -> control .flags & FLOW_DIS_ENCAPSULATION ) &&
11144
- bp -> hwrm_spec_code < 0x10601 ) {
11152
+ flags = fkeys -> control .flags ;
11153
+ if (((flags & FLOW_DIS_ENCAPSULATION ) &&
11154
+ bp -> hwrm_spec_code < 0x10601 ) || (flags & FLOW_DIS_IS_FRAGMENT )) {
11145
11155
rc = - EPROTONOSUPPORT ;
11146
11156
goto err_free ;
11147
11157
}
@@ -11378,8 +11388,8 @@ int bnxt_get_port_parent_id(struct net_device *dev,
11378
11388
if (!BNXT_PF (bp ) || !(bp -> flags & BNXT_FLAG_DSN_VALID ))
11379
11389
return - EOPNOTSUPP ;
11380
11390
11381
- ppid -> id_len = sizeof (bp -> switch_id );
11382
- memcpy (ppid -> id , bp -> switch_id , ppid -> id_len );
11391
+ ppid -> id_len = sizeof (bp -> dsn );
11392
+ memcpy (ppid -> id , bp -> dsn , ppid -> id_len );
11383
11393
11384
11394
return 0 ;
11385
11395
}
@@ -11435,9 +11445,9 @@ static void bnxt_remove_one(struct pci_dev *pdev)
11435
11445
bnxt_sriov_disable (bp );
11436
11446
11437
11447
bnxt_dl_fw_reporters_destroy (bp , true);
11438
- bnxt_dl_unregister (bp );
11439
11448
pci_disable_pcie_error_reporting (pdev );
11440
11449
unregister_netdev (dev );
11450
+ bnxt_dl_unregister (bp );
11441
11451
bnxt_shutdown_tc (bp );
11442
11452
bnxt_cancel_sp_work (bp );
11443
11453
bp -> sp_event = 0 ;
@@ -11471,6 +11481,9 @@ static int bnxt_probe_phy(struct bnxt *bp, bool fw_dflt)
11471
11481
rc );
11472
11482
return rc ;
11473
11483
}
11484
+ if (!fw_dflt )
11485
+ return 0 ;
11486
+
11474
11487
rc = bnxt_update_link (bp , false);
11475
11488
if (rc ) {
11476
11489
netdev_err (bp -> dev , "Probe phy can't update link (rc: %x)\n" ,
@@ -11484,9 +11497,6 @@ static int bnxt_probe_phy(struct bnxt *bp, bool fw_dflt)
11484
11497
if (link_info -> auto_link_speeds && !link_info -> support_auto_speeds )
11485
11498
link_info -> support_auto_speeds = link_info -> support_speeds ;
11486
11499
11487
- if (!fw_dflt )
11488
- return 0 ;
11489
-
11490
11500
bnxt_init_ethtool_link_settings (bp );
11491
11501
return 0 ;
11492
11502
}
@@ -11860,7 +11870,7 @@ static int bnxt_init_one(struct pci_dev *pdev, const struct pci_device_id *ent)
11860
11870
11861
11871
if (BNXT_PF (bp )) {
11862
11872
/* Read the adapter's DSN to use as the eswitch switch_id */
11863
- bnxt_pcie_dsn_get (bp , bp -> switch_id );
11873
+ rc = bnxt_pcie_dsn_get (bp , bp -> dsn );
11864
11874
}
11865
11875
11866
11876
/* MTU range: 60 - FW defined max */
@@ -11907,11 +11917,14 @@ static int bnxt_init_one(struct pci_dev *pdev, const struct pci_device_id *ent)
11907
11917
bnxt_init_tc (bp );
11908
11918
}
11909
11919
11920
+ bnxt_dl_register (bp );
11921
+
11910
11922
rc = register_netdev (dev );
11911
11923
if (rc )
11912
- goto init_err_cleanup_tc ;
11924
+ goto init_err_cleanup ;
11913
11925
11914
- bnxt_dl_register (bp );
11926
+ if (BNXT_PF (bp ))
11927
+ devlink_port_type_eth_set (& bp -> dl_port , bp -> dev );
11915
11928
bnxt_dl_fw_reporters_create (bp );
11916
11929
11917
11930
netdev_info (dev , "%s found at mem %lx, node addr %pM\n" ,
@@ -11921,7 +11934,8 @@ static int bnxt_init_one(struct pci_dev *pdev, const struct pci_device_id *ent)
11921
11934
11922
11935
return 0 ;
11923
11936
11924
- init_err_cleanup_tc :
11937
+ init_err_cleanup :
11938
+ bnxt_dl_unregister (bp );
11925
11939
bnxt_shutdown_tc (bp );
11926
11940
bnxt_clear_int_mode (bp );
11927
11941
0 commit comments