Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit b618ab45 authored by Heiner Kallweit's avatar Heiner Kallweit Committed by David S. Miller
Browse files

net: stmmac: don't use netdev_[dbg, info, ..] before net_device is registered



Don't use netdev_info and friends before the net_device is registered.
This avoids ugly messages like
"meson8b-dwmac c9410000.ethernet (unnamed net_device) (uninitialized):
Enable RX Mitigation via HW Watchdog Timer"

Signed-off-by: default avatarHeiner Kallweit <hkallweit1@gmail.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent abeffce9
Loading
Loading
Loading
Loading
+10 −9
Original line number Diff line number Diff line
@@ -3326,7 +3326,7 @@ int stmmac_dvr_probe(struct device *device,
	    (priv->plat->maxmtu >= ndev->min_mtu))
		ndev->max_mtu = priv->plat->maxmtu;
	else if (priv->plat->maxmtu < ndev->min_mtu)
		netdev_warn(priv->dev,
		dev_warn(priv->device,
			 "%s: warning: maxmtu having invalid value (%d)\n",
			 __func__, priv->plat->maxmtu);

@@ -3340,7 +3340,8 @@ int stmmac_dvr_probe(struct device *device,
	 */
	if ((priv->synopsys_id >= DWMAC_CORE_3_50) && (!priv->plat->riwt_off)) {
		priv->use_riwt = 1;
		netdev_info(priv->dev, "Enable RX Mitigation via HW Watchdog Timer\n");
		dev_info(priv->device,
			 "Enable RX Mitigation via HW Watchdog Timer\n");
	}

	netif_napi_add(ndev, &priv->napi, stmmac_poll, 64);
@@ -3366,7 +3367,7 @@ int stmmac_dvr_probe(struct device *device,
		/* MDIO bus Registration */
		ret = stmmac_mdio_register(ndev);
		if (ret < 0) {
			netdev_err(priv->dev,
			dev_err(priv->device,
				"%s: MDIO bus (id: %d) registration failed",
				__func__, priv->plat->bus_id);
			goto error_mdio_register;
@@ -3375,7 +3376,7 @@ int stmmac_dvr_probe(struct device *device,

	ret = register_netdev(ndev);
	if (ret) {
		netdev_err(priv->dev, "%s: ERROR %i registering the device\n",
		dev_err(priv->device, "%s: ERROR %i registering the device\n",
			__func__, ret);
		goto error_netdev_register;
	}