]> git.baikalelectronics.ru Git - kernel.git/commitdiff
net: hns3: add a print for initializing CMDQ when reset pending
authorHuazhong Tan <tanhuazhong@huawei.com>
Wed, 27 May 2020 00:59:17 +0000 (08:59 +0800)
committerDavid S. Miller <davem@davemloft.net>
Wed, 27 May 2020 21:56:08 +0000 (14:56 -0700)
When initializing CMDQ fails because of reset pending,
there is no hint for debugging, so adds a log for it.

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

index 7f509eff562ee8692b89ce0a2e93f7f624cae456..64a1d0bdd7d1253688d5f1b311259bf02f0719c4 100644 (file)
@@ -426,6 +426,9 @@ int hclge_cmd_init(struct hclge_dev *hdev)
         * reset may happen when lower level reset is being processed.
         */
        if ((hclge_is_reset_pending(hdev))) {
+               dev_err(&hdev->pdev->dev,
+                       "failed to init cmd since reset %#lx pending\n",
+                       hdev->reset_pending);
                ret = -EBUSY;
                goto err_cmd_init;
        }