1
1
/* Broadcom NetXtreme-C/E network driver.
2
2
*
3
- * Copyright (c) 2014-2015 Broadcom Corporation
3
+ * Copyright (c) 2014-2016 Broadcom Corporation
4
4
*
5
5
* This program is free software; you can redistribute it and/or modify
6
6
* it under the terms of the GNU General Public License as published by
@@ -2763,7 +2763,7 @@ static int bnxt_hwrm_func_drv_rgtr(struct bnxt *bp)
2763
2763
* only checks if it is non-zero to enable async event forwarding
2764
2764
*/
2765
2765
req .async_event_fwd [0 ] |= cpu_to_le32 (1 );
2766
- req .os_type = cpu_to_le16 (1 );
2766
+ req .os_type = cpu_to_le16 (FUNC_DRV_RGTR_REQ_OS_TYPE_LINUX );
2767
2767
req .ver_maj = DRV_VER_MAJ ;
2768
2768
req .ver_min = DRV_VER_MIN ;
2769
2769
req .ver_upd = DRV_VER_UPD ;
@@ -3726,7 +3726,7 @@ int bnxt_hwrm_func_qcaps(struct bnxt *bp)
3726
3726
3727
3727
pf -> fw_fid = le16_to_cpu (resp -> fid );
3728
3728
pf -> port_id = le16_to_cpu (resp -> port_id );
3729
- memcpy (pf -> mac_addr , resp -> perm_mac_address , ETH_ALEN );
3729
+ memcpy (pf -> mac_addr , resp -> mac_address , ETH_ALEN );
3730
3730
memcpy (bp -> dev -> dev_addr , pf -> mac_addr , ETH_ALEN );
3731
3731
pf -> max_rsscos_ctxs = le16_to_cpu (resp -> max_rsscos_ctx );
3732
3732
pf -> max_cp_rings = le16_to_cpu (resp -> max_cmpl_rings );
@@ -3751,7 +3751,7 @@ int bnxt_hwrm_func_qcaps(struct bnxt *bp)
3751
3751
struct bnxt_vf_info * vf = & bp -> vf ;
3752
3752
3753
3753
vf -> fw_fid = le16_to_cpu (resp -> fid );
3754
- memcpy (vf -> mac_addr , resp -> perm_mac_address , ETH_ALEN );
3754
+ memcpy (vf -> mac_addr , resp -> mac_address , ETH_ALEN );
3755
3755
if (is_valid_ether_addr (vf -> mac_addr ))
3756
3756
/* overwrite netdev dev_adr with admin VF MAC */
3757
3757
memcpy (bp -> dev -> dev_addr , vf -> mac_addr , ETH_ALEN );
@@ -3842,6 +3842,8 @@ static int bnxt_hwrm_ver_get(struct bnxt *bp)
3842
3842
3843
3843
memcpy (& bp -> ver_resp , resp , sizeof (struct hwrm_ver_get_output ));
3844
3844
3845
+ bp -> hwrm_spec_code = resp -> hwrm_intf_maj << 16 |
3846
+ resp -> hwrm_intf_min << 8 | resp -> hwrm_intf_upd ;
3845
3847
if (resp -> hwrm_intf_maj < 1 ) {
3846
3848
netdev_warn (bp -> dev , "HWRM interface %d.%d.%d is older than 1.0.0.\n" ,
3847
3849
resp -> hwrm_intf_maj , resp -> hwrm_intf_min ,
@@ -4523,7 +4525,6 @@ static int bnxt_update_link(struct bnxt *bp, bool chng_link_state)
4523
4525
else
4524
4526
link_info -> link_speed = 0 ;
4525
4527
link_info -> force_link_speed = le16_to_cpu (resp -> force_link_speed );
4526
- link_info -> auto_link_speed = le16_to_cpu (resp -> auto_link_speed );
4527
4528
link_info -> support_speeds = le16_to_cpu (resp -> support_speeds );
4528
4529
link_info -> auto_link_speeds = le16_to_cpu (resp -> auto_link_speed_mask );
4529
4530
link_info -> lp_auto_link_speeds =
@@ -4533,8 +4534,8 @@ static int bnxt_update_link(struct bnxt *bp, bool chng_link_state)
4533
4534
link_info -> phy_ver [1 ] = resp -> phy_min ;
4534
4535
link_info -> phy_ver [2 ] = resp -> phy_bld ;
4535
4536
link_info -> media_type = resp -> media_type ;
4536
- link_info -> transceiver = resp -> transceiver_type ;
4537
- link_info -> phy_addr = resp -> phy_addr ;
4537
+ link_info -> transceiver = resp -> xcvr_pkg_type ;
4538
+ link_info -> phy_addr = resp -> eee_config_phy_addr ;
4538
4539
4539
4540
/* TODO: need to add more logic to report VF link */
4540
4541
if (chng_link_state ) {
@@ -4581,7 +4582,7 @@ static void bnxt_hwrm_set_link_common(struct bnxt *bp,
4581
4582
4582
4583
if (autoneg & BNXT_AUTONEG_SPEED ) {
4583
4584
req -> auto_mode |=
4584
- PORT_PHY_CFG_REQ_AUTO_MODE_MASK ;
4585
+ PORT_PHY_CFG_REQ_AUTO_MODE_SPEED_MASK ;
4585
4586
4586
4587
req -> enables |= cpu_to_le32 (
4587
4588
PORT_PHY_CFG_REQ_ENABLES_AUTO_LINK_SPEED_MASK );
@@ -4595,9 +4596,6 @@ static void bnxt_hwrm_set_link_common(struct bnxt *bp,
4595
4596
req -> flags |= cpu_to_le32 (PORT_PHY_CFG_REQ_FLAGS_FORCE );
4596
4597
}
4597
4598
4598
- /* currently don't support half duplex */
4599
- req -> auto_duplex = PORT_PHY_CFG_REQ_AUTO_DUPLEX_FULL ;
4600
- req -> enables |= cpu_to_le32 (PORT_PHY_CFG_REQ_ENABLES_AUTO_DUPLEX );
4601
4599
/* tell chimp that the setting takes effect immediately */
4602
4600
req -> flags |= cpu_to_le32 (PORT_PHY_CFG_REQ_FLAGS_RESET_PHY );
4603
4601
}
0 commit comments