Merge branch 'hns3-bug-fixes'

Lipeng says:

====================
net: hns3: Bug fixes & Code improvements in HNS3 driver

This patch-set introduces some bug fixes and code improvements.
As [patch 1/2] depends on the patch {5392902 net: hns3: Consistently using
GENMASK in hns3 driver}, which exists in net-next, not exists in net, so
push this serise to nex-next.
====================

Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
David S. Miller 2017-11-11 15:17:56 +09:00
commit fc98135928
2 changed files with 2 additions and 13 deletions

View File

@ -390,7 +390,7 @@ struct hclge_pf_res_cmd {
#define HCLGE_CFG_TQP_DESC_N_S 16
#define HCLGE_CFG_TQP_DESC_N_M GENMASK(31, 16)
#define HCLGE_CFG_PHY_ADDR_S 0
#define HCLGE_CFG_PHY_ADDR_M GENMASK(4, 0)
#define HCLGE_CFG_PHY_ADDR_M GENMASK(7, 0)
#define HCLGE_CFG_MEDIA_TP_S 8
#define HCLGE_CFG_MEDIA_TP_M GENMASK(15, 8)
#define HCLGE_CFG_RX_BUF_LEN_S 16

View File

@ -2325,18 +2325,7 @@ static int hclge_update_speed_duplex(struct hclge_dev *hdev)
/* get the speed and duplex as autoneg'result from mac cmd when phy
* doesn't exit.
*/
if (mac.phydev)
return 0;
/* update mac->antoneg. */
ret = hclge_query_autoneg_result(hdev);
if (ret) {
dev_err(&hdev->pdev->dev,
"autoneg result query failed %d\n", ret);
return ret;
}
if (!mac.autoneg)
if (mac.phydev || !mac.autoneg)
return 0;
ret = hclge_query_mac_an_speed_dup(hdev, &speed, &duplex);