nvethernet:k5.10 Fix probe defer warning prints

Issue
- Driver probe defer causes failed prints on kernel boot logs
  if clk/reset controller driver module is not initialized
  before nvethernet module probe.

Fix
- The probe defer is part of kernel mechanism to retry module
  initialization and hardware setup. This is not an error
  or failure for software driver.
  Only in case of probe failure, throw error logs in console

Bug 200728771
Bug 200732811

Change-Id: I9c421db6ceedc108553f9f2b33f4f3993d63c02f
Signed-off-by: Sushil Singh <sushilkumars@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvidia/+/2563340
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
This commit is contained in:
Sushil Singh
2021-07-20 19:55:51 +05:30
committed by Revanth Kumar Uppala
parent 451275bea6
commit a955fa087a

View File

@@ -4880,6 +4880,7 @@ static int ether_configure_car(struct platform_device *pdev,
/* get MAC reset */ /* get MAC reset */
pdata->mac_rst = devm_reset_control_get(&pdev->dev, "mac_rst"); pdata->mac_rst = devm_reset_control_get(&pdev->dev, "mac_rst");
if (IS_ERR_OR_NULL(pdata->mac_rst)) { if (IS_ERR_OR_NULL(pdata->mac_rst)) {
if (PTR_ERR(pdata->mac_rst) != -EPROBE_DEFER)
dev_err(&pdev->dev, "failed to get MAC reset\n"); dev_err(&pdev->dev, "failed to get MAC reset\n");
return PTR_ERR(pdata->mac_rst); return PTR_ERR(pdata->mac_rst);
} }
@@ -5036,6 +5037,7 @@ static int ether_init_plat_resources(struct platform_device *pdev,
if (osi_core->use_virtualization == OSI_DISABLE) { if (osi_core->use_virtualization == OSI_DISABLE) {
ret = ether_configure_car(pdev, pdata); ret = ether_configure_car(pdev, pdata);
if (ret < 0) { if (ret < 0) {
if (ret != -EPROBE_DEFER)
dev_err(&pdev->dev, "failed to get clks/reset"); dev_err(&pdev->dev, "failed to get clks/reset");
} }
} }
@@ -5955,7 +5957,9 @@ static int ether_probe(struct platform_device *pdev)
/* get base address, clks, reset ID's and MAC address*/ /* get base address, clks, reset ID's and MAC address*/
ret = ether_init_plat_resources(pdev, pdata); ret = ether_init_plat_resources(pdev, pdata);
if (ret < 0) { if (ret < 0) {
dev_err(&pdev->dev, "failed to allocate platform resources\n"); if (ret != -EPROBE_DEFER)
dev_err(&pdev->dev,
"failed to allocate platform resources\n");
goto err_init_res; goto err_init_res;
} }