]> git.baikalelectronics.ru Git - kernel.git/commitdiff
net: hns3: print out speed info when parsing speed fails
authorHuazhong Tan <tanhuazhong@huawei.com>
Thu, 28 May 2020 13:48:19 +0000 (21:48 +0800)
committerDavid S. Miller <davem@davemloft.net>
Thu, 28 May 2020 23:39:04 +0000 (16:39 -0700)
When calling hclge_parse_speed() fails, printing out the speed is
helpful for debugging.

Signed-off-by: Huazhong Tan <tanhuazhong@huawei.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_main.c

index 1e4f28518d692b5582b5866fdd0626a553135c37..96bfad52630d3d29fd2c13c62d6f727a1210ef22 100644 (file)
@@ -1387,7 +1387,8 @@ static int hclge_configure(struct hclge_dev *hdev)
 
        ret = hclge_parse_speed(cfg.default_speed, &hdev->hw.mac.speed);
        if (ret) {
-               dev_err(&hdev->pdev->dev, "Get wrong speed ret=%d.\n", ret);
+               dev_err(&hdev->pdev->dev, "failed to parse speed %u, ret = %d\n",
+                       cfg.default_speed, ret);
                return ret;
        }