diff --git a/drivers/net/ethernet/stmicro/stmmac/stmmac_mdio.c b/drivers/net/ethernet/stmicro/stmmac/stmmac_mdio.c index 40c42637ad75..e331f514dbe0 100644 --- a/drivers/net/ethernet/stmicro/stmmac/stmmac_mdio.c +++ b/drivers/net/ethernet/stmicro/stmmac/stmmac_mdio.c @@ -264,7 +264,11 @@ int stmmac_mdio_reset(struct mii_bus *bus) struct net_device *ndev = bus->priv; struct stmmac_priv *priv = netdev_priv(ndev); unsigned int mii_address = priv->hw->mii.addr; + bool active_high = true; +#ifdef CONFIG_DWMAC_QCOM_ETHQOS + active_high = false; +#endif #ifdef CONFIG_OF if (priv->device->of_node) { struct gpio_desc *reset_gpio; @@ -283,11 +287,11 @@ int stmmac_mdio_reset(struct mii_bus *bus) if (delays[0]) msleep(DIV_ROUND_UP(delays[0], 1000)); - gpiod_set_value_cansleep(reset_gpio, 1); + gpiod_set_value_cansleep(reset_gpio, active_high ? 1 : 0); if (delays[1]) msleep(DIV_ROUND_UP(delays[1], 1000)); - gpiod_set_value_cansleep(reset_gpio, 0); + gpiod_set_value_cansleep(reset_gpio, active_high ? 0 : 1); if (delays[2]) msleep(DIV_ROUND_UP(delays[2], 1000)); } diff --git a/drivers/net/ethernet/stmicro/stmmac/stmmac_platform.c b/drivers/net/ethernet/stmicro/stmmac/stmmac_platform.c index 508325cc105d..fe87319fe86e 100644 --- a/drivers/net/ethernet/stmicro/stmmac/stmmac_platform.c +++ b/drivers/net/ethernet/stmicro/stmmac/stmmac_platform.c @@ -212,12 +212,13 @@ static int stmmac_mtl_setup(struct platform_device *pdev, queue++; } +#ifndef CONFIG_DWMAC_QCOM_ETHQOS if (queue != plat->rx_queues_to_use) { ret = -EINVAL; dev_err(&pdev->dev, "Not all RX queues were configured\n"); goto out; } - +#endif /* Processing TX queues common config */ if (of_property_read_u32(tx_node, "snps,tx-queues-to-use", &plat->tx_queues_to_use)) @@ -278,11 +279,13 @@ static int stmmac_mtl_setup(struct platform_device *pdev, queue++; } +#ifndef CONFIG_DWMAC_QCOM_ETHQOS if (queue != plat->tx_queues_to_use) { ret = -EINVAL; dev_err(&pdev->dev, "Not all TX queues were configured\n"); goto out; } +#endif out: of_node_put(rx_node);